On Wed, 2005-01-26 at 10:20 -0800, anil dahiya wrote: > Hi > this is happening because u have compiled your module > for kernel 2.4.20-8 (redhat 9.0) .now ur installing > that module on kernel 2.4.20 which is different from > kernel 2.4.20-8 (redhat 9.0). > > please compile ur code with following command (for > example i am taking ur source file name as module.c) : > > gcc -c module.c -D__KERNEL__ -DMODULE > -I/usr/src/linux-2.4.20/include > > then to install module give command : > insmod module.o > > notes:- > a> if u have already defined __KERNEL__ & MODULE in ur > source file then u can skip those here. > b> -I/usr/src/linux-2.4.20/include in this > linux-2.4.20 points to ur kernel in /usr/src directory > .If u have some othername for ur kernel in /usr/src > e.g linux then u shld define as > -I/usr/src/linux/include do not use /usr/src/* on RHL/Fedora. It's the WRONG location in that you really should use /lib/modules/<version>/build/include ONLY. And nothing else (again on RHL/Fedora).
Attachment:
signature.asc
Description: This is a digitally signed message part