Date: Thu, 11 Feb 2010 13:06:07 +0000 From: Andrew Brampton <brampton+freebsd@gmail.com> To: james toy <nil@opensesame.st> Cc: freebsd-hackers <freebsd-hackers@freebsd.org>, David Hemmendinger <hemmendd@union.edu> Subject: Re: KLD hello.ko: depends on kernel - not available or version mismatch Message-ID: <d41814901002110506q4248fe14r3ddd637b2cfcb51f@mail.gmail.com> In-Reply-To: <11dbd75e1002101825u78d90ef0ufe6015045ecf788a@mail.gmail.com> References: <11dbd75e1002101825u78d90ef0ufe6015045ecf788a@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 11, 2010 at 2:25 AM, james toy <nil@opensesame.st> wrote: > Hello Hackers, > > =C2=A0 =C2=A0I am working on learning to write FreeBSD drivers; however, = I have > some practice writing IOKit drivers for MacOSX (they are entirely > different I know!). =C2=A0The code I am working with can be found here: > > http://pastebin.com/m2bbb393c > > and I am getting the error: > > dontpanic# kldload ./hello.ko > kldload: can't load ./hello.ko: Exec format error > > dmesg reads: > > dontpanic# kldload ./hello.ko > kldload: can't load ./hello.ko: Exec format error > > and finally uname -a: > > FreeBSD dontpanic.union.edu 9.0-CURRENT FreeBSD 9.0-CURRENT #1 > r198859: Wed Feb 10 09:59:54 EST 2010 > james@dontpanic.union.edu:/usr/obj/usr/src_klog/sys/DONTPANIC =C2=A0amd64 > > any information pointing me to being able to load this driver would be > greatly appreciated. > > respectfully, > > james toy I just built your code on my FreeBSD 8 box and it compiles and loads fine. How are you compiling your code? I used this makefile http://pastebin.com/f3ab71917 and all I typed was this: make sudo make install sudo make load and I get the "hello, fail" message, and then I typed sudo make unload and I got the "unload fail" message. Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d41814901002110506q4248fe14r3ddd637b2cfcb51f>