YOCTO:无法将linux模块插入内核:版本不同

编程入门 行业动态 更新时间:2024-10-28 13:26:32
本文介绍了YOCTO:无法将linux模块插入内核:版本不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用 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模块插入内核:版本不同

本文发布于:2023-07-27 14:22:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1222836.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内核   模块   版本   YOCTO   linux

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!