Date: Thu, 24 Jun 1999 17:22:51 -0600 (MDT) From: "John E Hein (work)" <jhein@timing.com> To: freebsd-questions@freebsd.org Subject: lkm support under 3.2-RELEASE Message-ID: <14194.48587.186725.892883@toad.timing.com>
next in thread | raw e-mail | index | archive | help
We have some existing lkm's that I'd like to be able to load on
a 3.2 system. In order to make sure I've done the correct steps
to allow this, I tried the syscall example in
/usr/share/examples/lkm/syscall, but I've been unsuccessful in
getting it to work.
Here's what I tried:
- compiled a new kernel w/'options LKM' (and rebooted)
- compiled the syscall example (cd /usr/share/examples/syscall ; make)
- attempted to load the syscall lkm as follows:
# kldstat
Id Refs Address Size Name
1 4 0xc0100000 1e50b0 kernel
2 1 0xc0f09000 d000 linux.ko
3 1 0xc0f1c000 4000 logo_saver.ko
6 1 0xc1dec000 3000 lkm.ko
# cd /usr/share/examples/lkm/syscall/module
# make load
/sbin/modload -o newsyscall_mod -enewsyscall_mod newsyscall_mod.o
ld: /kernel: malformed input file (not rel or archive)
modload: /usr/bin/ld: return code 1
*** Error code 1
Okay, so I looked through the freebsd mail archives and found that
some people suggested that one should use kldload instead of
modload anymore (why is modload included if it doesn't work at all
anymore? maybe it does and I'm just not using it correctly). So,
I tried kldload and got the following error:
# kldload -v /usr/share/examples/lkm/syscall/module/newsyscall_mod.o
kldload: can't load /usr/share/examples/lkm/syscall/module/newsyscall_mod.o: Exec format error
So then I tried to load the LKM kld ('kldload lkm'). But I get the same
results in both cases. Does anyone have any input on getting existing LKMs
to load under 3.2-RELEASE? Do I need to compile it differently?
Am I trying to run the lkm/syscall example improperly?
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14194.48587.186725.892883>
