如何为openwrt生成补丁
答:使用quilt工具
步骤如下:
1. 配置quilt
$cat> ~/.quiltrc <<EOF
QUILT_DIFF_ARGS="--no-timestamps --no-index -pab --color=auto"
QUILT_REFRESH_ARGS="--no-timestamps --no-index -pab"
QUILT_PATCH_OPTS="--unified"
QUILT_DIFF_OPTS="-p"
EDITOR="vim"
EOF
注意:EDITOR=”vim”指定默认的编辑器为vim
2. 为内核生成补丁示例
2.1 清空内核
make target/linux/{clean,prepare} V=s QUILT=1
2.2 创建内核补丁
切换到build_dir/target-<arch>/linux-<board>_<arch>/linux-<version>目录下(也就是openwrt的编译内核的目录)
quilt new my-patch.patch
将要修改的文件arch/arm/boot/dts/Makefile 添加进来以便与patch关联起来:quilt add arch/arm/boot/dts/Makefile
修改arch/arm/boot/dts/Makefile: quilt edit arch/arm/boot/dts/Makefile
quilt refresh (更新补丁)
经过以上操作,内核补丁作完毕,可以在build_dir/target-<arch>/linux-<board>_<arch>/linux-<version>/patches目录中找到补丁
2.3 将补丁放置到适当的目录
切换到openwrt的根目录
将patch会写到对应的补丁目录下:make target/linux/update
如何为openwrt生成补丁的更多相关文章
- diff生成补丁与patch打补丁
1.使用diff生成补丁: diff是Linux下的文件比较命令,参数这里就不说了,直接man一下就行了,不仅可以比较文件,也可以比较两个目录,并且可以将不同之处生成补丁文件,其实就是一种打补丁的命令 ...
- 如何为Linux生成和打上patch
通过diff工具生成补丁, patch工具打上补丁. 在使用diff之前, 你需要保留一份未修改过的源码, 然后在其它地方修改源码的一份拷贝. diff对比这两份源码生成patch. 修改过的源码必须 ...
- git diff比较版本差异(生成补丁)
1.git diff [<options>] <commit> <commit> options 使用--name-only(git diff HEAD cd504 ...
- 如何为openwrt中的某个模块生成PKG_MIRROR_HASH
答:介绍两种方法,第一种自动生成(当然使用自动的啦),第二种手动生成 第一种方法: 1.在软件包的Makefile中让此项写成这样PKG_MIRROR_HASH:=skip (如果不加上skip,那 ...
- 记录openwrt下补丁apply的过程中出错,但是可以单独打上该补丁
背景: 在openwrt的编译框架下无法正确打上补丁,而单独使用git却可以成功 这个补丁到底与其它补丁有何不同? 该补丁的生成的过程解析: 旧文件:vi 打开旧文件会提示no newline at ...
- git diff 与git format-patch 生成补丁包
git diff commit_id 会生成最后一次提交到目前修改过的内容补丁 git diff commit_id1 commit_id2 会生成两次提交之间修改过的内容补丁 git format- ...
- git如何在自动生成补丁时指定补丁名的起始编号
答:使用选项--start-number,用法如下: git format-patch 1f43be --start-number=2 这样就可以生成起始编号为2的补丁名,类似0002-me.patc ...
- openwrt生成备份文件
生成备份文件时所使用的脚本中调用的命令为sysgrade local image_tmp = "/tmp/firmware.img" local backup_cmd = & ...
- openwrt生成的交叉编译器在哪里
答:在staging_dir目录下,示例如下: 编译一个arm64架构所生成的编译器在staging_dir/toolchain-aarch64_generic_gcc-7.4.0_musl/bin/ ...
随机推荐
- LeetCode——Happy Number
Description: Write an algorithm to determine if a number is "happy". A happy number is a n ...
- $.when()方法监控ajax请求获取到的数据与普通ajax请求回调获取到的数据的不同
1.$.when(ajax).done(function(data)}); 2.$.ajax().done(function(data){}); 1中的data被封装进一个对象[data, " ...
- 【BZOJ4424】Cf19E Fairy DFS树
[BZOJ4424]Cf19E Fairy Description 给定 n 个点,m 条边的无向图,可以从图中删除一条边,问删除哪些边可以使图变成一个二分图. Input 第 1 行包含两个整数 n ...
- ExecutorService的四种线程池
转自:https://www.cnblogs.com/zhaoyan001/p/7049627.html 1.new Thread的弊端 执行一个异步任务你还只是如下new Thread吗? new ...
- Scala 泛型类型和方法
abstract class Stack[A] { def push(x: A): Stack[A] = new NonEmptyStack[A](x, this) def isEmpty: Bool ...
- 试验性的Numpy教程(译)
Python中Numpy模块学习: 转自:http://my.oschina.net/u/175377/blog/74406
- Composer 添加 Laravel-china 的国内源
不知道由于什么原因,原来的 Composer 的国内镜像 https://pkg.phpcomposer.com/ 不能正常使用,经常连不上. 找了半天,发现还有一个 laravel-china 的国 ...
- SaltStack实现Haproxy Nginx+php MySQL主从
构建图如下 参考文档:https://github.com/unixhot/saltbook-code/tree/master
- This module embeds Lua, via LuaJIT 2.0/2.1, into Nginx and by leveraging Nginx's subrequests, allows the integration of the powerful Lua threads (Lua coroutines) into the Nginx event model.
openresty/lua-nginx-module: Embed the Power of Lua into NGINX HTTP servers https://github.com/openre ...
- Linux自动化部署尝试
Linux自动化部署尝试 最近做一个项目临近测试,购买的是阿里云的服务器,每次部署都是手动打包war,然后上传到服务器,然后修改配置文件,不仅繁琐,而且费时,就思索着找一个一键式的部署方式,今天终 ...