insmod: error inserting 'module.o': -1 Invalid module format
Hi,
I am novice to Linux.I have compiled a hello world module and inserted into Linux kernel (version 2.6.9-22.EL). But when i insert *.o or *.ko it is giving error message as "insmod: error inserting 'module.o': -1 Invalid module format" dmesg: module: disagrees about version of symbol struct_module Can anybody guide me about how to resolve this? Thanks & Regards, Srinivas |
Try using modprobe instead of insmod.
I don't believe that you can use a wildcard in the module name. The module may have to be listed in /lib/modules/*/modules.dep. I don't know. |
Quote:
|
Hi Mara,
Your hint helped to compile but when i am tyring to insert the module, i am getting error and dmesg is giving the following info. tempmodule: Unknown symbol EnableDigit tempmodule: Unknown symbol DisableDigit tempmodule: Unknown symbol DevWrite tempmodule: Unknown symbol DevRead tempmodule: Unknown symbol puts Can you please let me know what could be the reason ? Thanks Srinivas |
They do not look like kernel functions/structures ('puts' is another story). My guess is that you use your own functions (cusom library?) that's not linked with the module. It seems that the functions are simple, so just add source file with them to your module.
But, where and why do you use 'puts'? |
You are right. I have defined the functions locally. But i am not sure from where 'puts' has come. Now i could able to compile and insert.
Thanks for the support. |
All times are GMT -5. The time now is 07:38 AM. |