LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   LINUX kernel modules (https://www.linuxquestions.org/questions/linux-general-1/linux-kernel-modules-382984/)

arunachalam 11-14-2005 06:17 AM

LINUX kernel modules
 
Hi,

I've written a simple kernel module (hello world) program. I've given all the option like -DMODULE -D__KERNEL__ -DLINUX and it was compiled. Means .o file generated. But when inserting the module, the error occured as -1 Invalid module format.

I am working suse 9 (linux 2.6.5)

Help on this.

Regds,
Arunachalam.

mr_demilord 11-14-2005 10:35 AM

kernel 2.6 uses the .ko extension, rename the file to module.ko for example. Hope it helps.
BTW wich version of modul-init tools do you use?

arunachalam 11-14-2005 10:11 PM

Hi,
Still I getting the same problem(after renaming .o to .ko). Means "error -1 invalid module format". You mean I need to see /lib/modules/ for seeing the module init version It is 2.6.5-7.97

Help me here.

Regards,
Arunachalam.


All times are GMT -5. The time now is 10:05 PM.