Hello everybody, I just successfully compiled and build simple kernel module. but when i am trying to insert the kernel module by using insmod command, it gives following error
insmod: error inserting 'fcc.ko': -1 Invalid module format
and /var/log/messages has the following statement
kernel: fcc: version magic '2.6.18-1.2798.fc6 SMP mod_unload 686 REGPARM 4KSTACKS gcc-4.1' should be '2.6.18-1.2798.fc6 SMP mod_unload 586 REGPARM 4KSTACKS gcc-4.1'
Is this error due to the 686 & 586 mismatch? How should I fix it?
-- Nilesh V Mahajan
--------------------------------- Download prohibited? No problem. CHAT from any browser, without download.
On 6/22/07, nilesh mahajan nvmahajan03@yahoo.co.in wrote:
Hello everybody, I just successfully compiled and build simple kernel module. but when i am trying to insert the kernel module by using insmod command, it gives following error
insmod: error inserting 'fcc.ko': -1 Invalid module format
and /var/log/messages has the following statement
kernel: fcc: version magic '2.6.18-1.2798.fc6 SMP mod_unload 686 REGPARM 4KSTACKS gcc-4.1' should be '2.6.18-1.2798.fc6 SMP mod_unload 586 REGPARM 4KSTACKS gcc-4.1'
Is this error due to the 686 & 586 mismatch? How should I fix it?
-- Nilesh V Mahajan
You should be running the kernel you compiled the module for. That is, your kernel seems to be configured for 586 and you may have compiled your kernel for 686. To be safe, you can pick up the config file for your running kernel (seems to be a distro kernel) and use it to configure your kernel tree and then build/insert the module.
It wouldn't harm to take the distro's modified tree from the repos as well. Please CMIIW: Is this essential? Seems to be.
Regards, Mohan S N
You should be running the kernel you compiled the module for. That is, your kernel seems to be configured for 586 and you may have compiled your kernel for 686. To be safe, you can pick up the config file for your running kernel (seems to be a distro kernel) and use it to configure your kernel tree and then build/insert the module.
It wouldn't harm to take the distro's modified tree from the repos as well. Please CMIIW: Is this essential? Seems to be.
Regards, Mohan S N
Ya Mr. Mohan you are right. After configuring and building kernel I am now able to insert the module. Thanks for help. Have a good day.
--------------------------------- Heres a new way to find what you're looking for - Yahoo! Answers
You should be running the kernel you compiled the module for. That is, your kernel seems to be configured for 586 and you may have compiled your kernel for 686. To be safe, you can pick up the config file for your running kernel (seems to be a distro kernel) and use it to configure your kernel tree and then build/insert the module.
It wouldn't harm to take the distro's modified tree from the repos as well. Please CMIIW: Is this essential? Seems to be.
Regards, Mohan S N
Ya Mr. Mohan you are right. After configuring and building kernel I am now able to insert the module. Thanks for help. Have a good day.
--------------------------------- Heres a new way to find what you're looking for - Yahoo! Answers