Re: KLD hello.ko: depends on kernel - not available or version mismatch
On Thu, Feb 11, 2010 at 08:06, Andrew Brampton brampton+free...@gmail.com wrote: On Thu, Feb 11, 2010 at 2:25 AM, james toy n...@opensesame.st wrote: Hello Hackers, I am working on learning to write FreeBSD drivers; however, I have some practice writing IOKit drivers for MacOSX (they are entirely different I know!). The 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 ja...@dontpanic.union.edu:/usr/obj/usr/src_klog/sys/DONTPANIC amd64 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 Andrey was correct, param.h and kern.osreldate were not the same. thanks very much for the prompt responses. =jt ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: KLD hello.ko: depends on kernel - not available or version mismatch
On Thu, Feb 11, 2010 at 2:25 AM, james toy n...@opensesame.st wrote: Hello Hackers, I am working on learning to write FreeBSD drivers; however, I have some practice writing IOKit drivers for MacOSX (they are entirely different I know!). The 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 ja...@dontpanic.union.edu:/usr/obj/usr/src_klog/sys/DONTPANIC amd64 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 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: KLD hello.ko: depends on kernel - not available or version mismatch
On 11.02.2010 5:25, james toy wrote: any information pointing me to being able to load this driver would be greatly appreciated. Probably you have source code with different __FreeBSD_version. Check output of these commands: grep __FreeBSD_version /usr/src/sys/param.h sysctl kern.osreldate -- WBR, Andrey V. Elsukov ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: KLD hello.ko: depends on kernel - not available or version mismatch
james toy wrote: Hello Hackers, I am working on learning to write FreeBSD drivers; however, I have some practice writing IOKit drivers for MacOSX (they are entirely different I know!). The 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 ja...@dontpanic.union.edu:/usr/obj/usr/src_klog/sys/DONTPANIC amd64 any information pointing me to being able to load this driver would be greatly appreciated. That error is a sort of catch-all. But the kernel linker should put some more specific information out in the kernel console/dmseg. so 'dmesg' may help you if you have something like a bad symbol. respectfully, james toy ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org