我正在使用 YOCTO PROJECT 为嵌入式板构建linux操作系统. 我有一个名为 uleds 的模块,我想将其插入到我的内核中,因此我将以下 insmod 命令用磁带录音了:
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
insmod /lib/modules/4.14.73-linux4sam-6.0-dirty/kernel/drivers/leds/uleds.ko
但是出现错误:
uleds:版本Magic'4.14.88-01445-g234c56a01768-dirty mod_unload ARMv7 p2v8'应该是'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 '
uleds:版本Magic'4.14.88-01445-g234c56a01768-dirty mod_unload ARMv7 p2v8'应该是'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:无法插入 '/lib/modules/4.14.73-linux4sam-6.0-dirty/kernel/drivers/leds/uleds.ko': 无效的模块
insmod: can't insert '/lib/modules/4.14.73-linux4sam-6.0-dirty/kernel/drivers/leds/uleds.ko': invalid module
我看到的是我的Linux内核版本和模块版本不相同.我的问题是如何解决此问题,以便可以将模块插入内核?
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 ?
推荐答案该模块未使用与内核相同的版本进行编译(在嵌入式设备上).
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.
您将需要在Yocto的meta中找到您的内核配方,将其下载(将下载的内核的存储库重置为该配方的SRCREV),然后构建您的模块.
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.
更多推荐
YOCTO:无法将linux模块插入内核:版本不同
发布评论