Subject: Re: Problem with loading LKMs
To: Bang Jun-Young <firstname.lastname@example.org>
From: Jaromír <email@example.com>
Date: 07/04/2001 22:17:44
Bang Jun-Young wrote:
> # modload -d compat_linux.o
> ld -R /netbsd -e compat_linux_lkmentry -o compat_linux -Ttext 0x0 compat_linux.o
> compat_linux.o: In function `linux_sys_ioctl':
> compat_linux.o(.text+0x1b98): undefined reference to `oss_ioctl_mixer'
> compat_linux.o(.text+0x1ba8): undefined reference to `oss_ioctl_audio'
> compat_linux.o(.text+0x1c32): undefined reference to `oss_ioctl_sequencer'
> modload: can't prelink `compat_linux.o' creating `compat_linux'
The problem here is that compat_linux has some implicit dependencies.
If your kernel doesn't include oss stuff (i.e. you don't have e.g.
FreeBSD emulation compiled in), you'd have to compile the OSS stuff
into the compat_linux.o module itself. That's basically what the
# XXXX - temporary, not applicable for kernel with COMPAT_43, OSSAUDIO
#.PATH: $S/compat/common $S/compat/ossaudio
#SRCS+= vfs_syscalls_43.c kern_resource_43.c kern_info_43.c ossaudio.c
stuff is about. This is not very flexible, but a working sidestep until
Ragge's LKM improvements would come.
> # modload -d exec_linux_elf.o
exec_linux_elf.o won't load if compat_linux is not already present.
> modload: error initializing module: No such file or directory
The rule of thumb here is that exec module is always dependant
upon some emulation subsystem. If the emulation subsystem is not
already in kernel, the exec module can't be loaded.
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
NetBSD - just plain best OS! -=*=- Got spare MCA cards or docs? Hand me them!