博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Verson Magic problem
阅读量:7041 次
发布时间:2019-06-28

本文共 1862 字,大约阅读时间需要 6 分钟。

hot3.png

参考:

The version magic number of the kernel that being used to build the externel module has to be exactly the same as the kernel running on the device. It won’t be a problem if you build the module and kernel, then load both of them to the device. However, in this case, I would like to avoid to build and replace the whole kernel. The wireless driver is the only kernel module that I want to build. Therefore, the kernel version magic has to be modified. The vermagic for the device is “3.1.10-g05b777c SMP preempt mod_unload ARMv7”, while my source code gives “3.1.10-g22b4fcd-dirty SMP preempt mod_unload ARMv7”. So “3.1.10” is the kernel version, it should match with the version of the kernel source. It consists of the following four parts which can be found at the beginning of Makefile:

VERSION = 3PATCHLEVEL = 1SUBLEVEL = 10EXTRAVERSION =

The  indicates that modifying the Makefile as shown below, simply use the VC number as EXTRAVERSION which is originaly omitted will solve the problem. However, you will end up with something like “3.1.10-g05b777c-g22b4fcd-dirty SMP preempt mod_unload ARMv7”.

VERSION = 3PATCHLEVEL = 1SUBLEVEL = 10EXTRAVERSION = -g05b777c

“-g05b777c” is the number of current version generated by the version control system(git, svn, etc.). After a little dig into Makefile, it turns out version number is stored in the file include/config/kernel.release and the local version is generated by the script scripts/setlocalversion. By default, it will check if version control system is available. If so, then it will append “dirty” to local version after the commit number if the commit haven’t been submitted. That is where “-g22b4fcd-dirty” comes from. We could simply supplement a parameter as scripts/setlocalversion --save-scmversion and it won’t generate the local version number.

转载于:https://my.oschina.net/u/584525/blog/484657

你可能感兴趣的文章
当经历所有大厂的实习面试过后
查看>>
从BEC“代币蒸发”事件看智能合约编写注意事项
查看>>
CentOS 7 Minimal 安装 LXQT
查看>>
机器码 指令 汇编语言 的关系
查看>>
摸索 JS 内深拷贝的最佳实践
查看>>
设计师面试会遇到的问题(part1:HR篇)
查看>>
周记_
查看>>
去掉UIPickerView的弯曲弧度
查看>>
使阿里oss实现前端代码自动上传
查看>>
JavaScript中的作用域和闭包
查看>>
暴力破解WiFi密码
查看>>
Zend Studio使用教程:使用Zend Studio和Zend Server进行根本原因分析 (二)
查看>>
golang的fmt包String(),Error(),Format(),GoString()的接口实现
查看>>
Java技术转(兼顾)产品经理——读《快速转行做产品经理》有感
查看>>
成为优秀Java开发人员的10件事
查看>>
Kali Linux安装教程
查看>>
Android缓存处理
查看>>
JavaScript 数据类型检测终极解决方案
查看>>
年赚百万游戏主播!玩转Python后:几行代码轻松“吃鸡” 附源码
查看>>
【python】使用简单的python语句编写爬虫 定时拿取信息并存入txt
查看>>