本文共 975 字,大约阅读时间需要 3 分钟。
转至元数据起始
openWrt
是用工具
quilt
来对整个工程进行打补丁
下面着重对
kernel
打补丁步骤进行描述:
1.
在
openwrt
目录下对
linux
进行
make cleanmake target/linux/clean V=99
2.
在
openwrt
目录下对
linux
进行
make preparemake target/linux/prepare V=99
会从
dl
目
录
中
解
压
一
个
最
原
始
版
本
的
linux
kernel
,
并
打
上
target/linux/ar71xx/patches-3.3
和
target/linux/generic/patches-3.3
目录下的所有补丁
3.
进入
build_dir
目录下的
linux
目录比如idu:
cd build_dir/linux-ar71xx_generic/linux-
3.3.8/
4.
查看最后一个补丁的名字
quilt push
5.
创建一个
platform
新的补丁名,记住这个新的补丁名要排在刚才最后一个补丁名的后面
(
openwrt
的补丁基本都是以数字开头,所以只要新建的补丁名的数字为最大就行了)
quilt
new platform/9xx-x.patch
6.
用
quilt edit
编辑要修改的
kernel
文件
7.
可以用
quilt diff
查看文件的区别
8.
修改完毕,用命令
quilt
refresh
,在
linux
目录下的
patches/platform
生成刚才创建的补丁名
的文件
9.
回到
openwrt
目录下,把刚才新生成的补丁
update
到
target/linux/ar71xx/patches-3.3
目
录下
make target/linux/update V=99
10.
把
target/linux/ar71xx/patches-3.3/9xx-x.patch
加入到
svn
中,这样打补丁操作就完成了。
注意:只要
kernel
修改后,如果要编译
firmware
,就必须对
linux
kernel
进行
clean
,不然会产生意
想不到的结果。
知道了
kernel
怎么打补丁,其他应用的补丁也是一样的。
转载地址:https://blog.csdn.net/weixin_33178459/article/details/112946041 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!