插入内核模块失败提示"Invalid module format"

    产品需要编译自己的定制内核+内核模块,下载内核源码定制修改后rpmbuild方式(点击打开链接)编译升级内核,如下方式编译内核模块 make -C $(kernel_source) SUBDIRS=`pwd`  modules;其中 kernel_source直向内核源码,但是insmod插入编译的ko时,提示 “insmod: ERROR: could not insert module xx.ko: Invalid module format”,dmesg查看disagree about version of symbol module_layout ,google+尝试最终发现kernel_source指向的内核源码和运行版本虽然一致,但是配置文件不一样可能导致问题。于是在kernel_source下make oldconfig,再次编译插入OK!google过程中有说make -C /lib/modules/`uname -r`/build M=`pwd`  modules可以,由于已经解决,没有验证这种方式。


参考:http://blog.csdn.net/david_xtd/article/details/7609529

猜你喜欢

转载自blog.csdn.net/kklvsports/article/details/73658244