YOCTO : can't insert linux module to the kernel : versions are different

对着背影说爱祢 提交于 2019-12-23 02:52:58

问题


I'm using YOCTO PROJECT to build a linux os for my embedded board. I have a module named uleds which i want insert to my kernel so i taped this insmod command:

insmod /lib/modules/4.14.73-linux4sam-6.0-dirty/kernel/drivers/leds/uleds.ko

But an errors comes out :

uleds: version magic '4.14.88-01445-g234c56a01768-dirty mod_unload ARMv7 p2v8 ' should be '4.14.73-linux4sam-6.0-dirty mod_unload ARMv7 p2v8 '

uleds: version magic '4.14.88-01445-g234c56a01768-dirty mod_unload ARMv7 p2v8 ' should be '4.14.73-linux4sam-6.0-dirty mod_unload ARMv7 p2v8 '

insmod: can't insert '/lib/modules/4.14.73-linux4sam-6.0-dirty/kernel/drivers/leds/uleds.ko': invalid module

What i see that my linux kernel version and the module version are not the same. My question is How can I fix this problem so I can insert the module to the kernel ?


回答1:


The module is not compiled with the same version as your kernel (on the embedded device).

You need to simply compile the module with the right kernel.

You will need to find your kernel recipe in the meta of Yocto, download it (reset the repository of the downloaded kernel to the SRCREV of the recipe), then build your module.



来源:https://stackoverflow.com/questions/57670786/yocto-cant-insert-linux-module-to-the-kernel-versions-are-different

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!