Cross compiling a kernel module: invalid module format

后端 未结 2 748
予麋鹿
予麋鹿 2021-01-13 12:08

I\'m trying to cross compile a helloworld kernel module with specifications:

  • host: intel x86 32 bit, linux-3.0.0
  • target: ARM machine (Parrot AR.Drone)
2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-13 12:45

    Thanks to the hint of Eugene to use dmesg, I found the error:

    version magic '2.6.37.6 mod_unload modversions ARMv5 ' should be '2.6.27.47-parrot preempt mod_unload ARMv5 '
    

    Conclusion: when compiling a kernel module, not only versions need to match, but also some config-parameters. My problem was solved by using the right version and editing the configuration.

    If you don't want to reconfigure everything, a quick (ugly) fix is to edit include/generated/autoconf.h

提交回复
热议问题