当前位置:网站首页>嵌入式驱动模块的加载与卸载
嵌入式驱动模块的加载与卸载
2022-04-21 15:26:00 【CinzWS】
最近学习正点原子嵌入式驱动模块加载与卸载的时候,使用命令:modprobe chrdevbase.ko 出现
hrdevbase: version magic '4.1.15 SMP preempt mod_unload modversions ARMv6 p2v8 ’ should be '4.1.15 SMP preempt mod_unload modversions ARMv7 p2v8 ’

问题原因:这种报错是内核版本和模块版本不一致,所以导致加载不成功
温馨提示:这里的内核版本不是ubuntu的内核版本,所以不要花时间给虚拟机里面的ubuntu降版本。
解决步骤:
1 将nfs和tftpboot里面的设备树和zImage都换成同一个源码编译出来的设备树和zImage。我这里用的是教程里的。推荐大家用10、开发板教程对应的uboot和linux源码




2 修改编译驱动配置路径也要是上面源码编译的路径。保证开发板的内核和编译驱动的版本一致


3 将编译好的ko文件复制到/lib/modules/4.1.15路径下,依次执行
depmod
modprobe chrdevbase.ko
如果出现:Disabling lock debugging due to kernel taint
执行:lsmod即可

实际上根据提示是没有加载module license导致的,因此可以再程序下面加入license即可。

版权声明
本文为[CinzWS]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_37619128/article/details/124269235
边栏推荐
猜你喜欢

【C语言进阶】自定义类型:结构体,位段,枚举,联合

红队技术-父进程伪装(MITRE ATT&CK框架:T1134)

What is an email address? Easy to use email registration application

Embedded development: three skills of reusing development board for testing

OpenHarmony3.1 H264视频播放之路

华为电力PON配网解决方案

AcWing 1788. 牛为什么过马路(模拟)

111页精细化工股份公司数据字转型解决方案

AcWing 1812. 方形牧场(枚举)

Installation and uninstallation of MySQL
随机推荐
2的0次方为什么等于1?
What are the websites evaluated by app?
AcWing 1812. 方形牧场(枚举)
MySQL
手把手教你实现手绘风格图形
别紧张,就是聊聊软考
Spark/Scala - 读取 RcFile && OrcFile
78页数字孪生+智慧楼宇解决方案
How to synchronize client email to webmail and how to register email address?
什么是电子邮件的格式?企业邮箱地址是什么?
Smart public security QR code positioning alarm system development of mobile police app
AcWing 1866. 围栏刷漆(区间求交)
50页京东云·睿擎-打造企业数字化转型的敏捷引擎业务中台解决方案
万有导航:简洁实用的综合导航网站
OpenLayers入门(二)
Hand in hand to teach you to realize hand-painted style graphics
105 page digital twin city information model CIM platform construction technical scheme
102页新一代数字化转型信息化总体规划方案
What is an email address? Easy to use email registration application
【二分查找-简单】374. 猜数字大小