0

I've followed the steps at Build Your Own Kernel Modules (CentOS) but when I modprobe it fails:

[root@centos7 ~]# modprobe pcnet32
modprobe: ERROR: could not insert 'pcnet32': Exec format error

[root@centos7 ~]# file /lib/modules/3.10.0-123.6.3.el7.x86_64/extra/pcnet32.ko
/lib/modules/3.10.0-123.6.3.el7.x86_64/extra/pcnet32.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), BuildID[sha1]=0xd7399934aef6f736c96175d7b91e570c49a86eda, not stripped

System info:

Linux centos7.testing 3.10.0-123.6.3.el7.x86_64 #1 SMP Wed Aug 6 21:12:36 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

I don't know what could be wrong :(

Could you help me?

  • 1
    Have you complied a 32-bit kernel module instead of a 64-bit kernel module? – mdpc Aug 12 '14 at 23:25
  • I wonder if "make modules_prepare will not build a Module.symvers file even if the parameter CONFIG_MODULEVERSIONING has been set. Therefore a full kernel build will have to have been executed previously to make module versioning work." what's happening. I'm making a full build... – sebelk Aug 13 '14 at 0:07
  • What steps did you follow very precisely? This may depend on your exact configuration. Copy-paste all the commands you ran. Where did you get the sources of the module? What headers did you use? Does anything appear in the kernel logs? – Gilles Aug 13 '14 at 0:32
  • Well, I've solved doing something like that: – sebelk Aug 13 '14 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.