Linux下打补丁
来源:互联网 发布:小公司网络组建 编辑:程序博客网 时间:2024/05/18 00:53
把改好的u-boot-2010.09复制到文件夹patch,将u-boot-2010.09重命名为u-boot-2010.09-fl2440
进入u-boot-2010.09-fl2440,先make distclean
将源码包解压到patch文件夹下
在此路径下
diff -Nuar u-boot-2010.09 u-boot-2010.09-fl2440 > u-boot-2010.09.patch
这样就得到补丁文件
一般参数就用-Nuar
还有要将两个文件放到同一文件夹下
patch打补丁如下
[luminqi@centos6 u-boot-2010.09]$ cd board
[luminqi@centos6 board]$ mkdir -p lingyun/fl2440
[luminqi@centos6 board]$ cp samsung/smdk2410/* lingyun/fl2440/
[luminqi@centos6 board]$ cd lingyun/fl2440/
[luminqi@centos6 fl2440]$ ls
config.mk flash.c lowlevel_init.S Makefile smdk2410.c
[luminqi@centos6 fl2440]$ mv smdk2410.c fl2440.c
[luminqi@centos6 fl2440]$ cd ../../../
[luminqi@centos6 u-boot-2010.09]$ cp include/configs/smdk2410.h include/configs/fl2440.h
[luminqi@centos6 u-boot-2010.09]$ patch -p1 < /home/luminqi/my_svn/fl2440test/trunk/src/u-boot-2010.09.patch
patching file arch/arm/cpu/arm920t/s3c24x0/speed.c
patching file arch/arm/cpu/arm920t/s3c24x0/timer.c
patching file arch/arm/cpu/arm920t/start.S
patching file arch/arm/cpu/arm920t/u-boot.lds
patching file arch/arm/include/asm/arch-s3c24x0/s3c24x0_cpu.h
patching file arch/arm/include/asm/arch-s3c24x0/s3c24x0.h
patching file board/lingyun/fl2440/fl2440.c
patching file board/lingyun/fl2440/lowlevel_init.S
patching file board/lingyun/fl2440/Makefile
patching file board/lingyun/fl2440/nand_read.c
patching file boards.cfg
patching file common/cmd_nand.c
patching file common/serial.c
patching file drivers/mtd/nand/s3c2410_nand.c
patching file drivers/net/dm9000x.c
patching file include/configs/fl2440.h
patching file include/serial.h
patching file Makefile
因为之前对u-boot-2010.09做了一点改动,
如果要用补丁文件为源码的u-boot-2010.09打补丁的话
也要做相应的改动
这里用参数p1,是因为当时路径在u-boot-2010.09目录之下,
若和u-boot-2010.09在同一目录,使用p0也可以
常用命令
diff -nuar 源文件 改动文件 > patch文件
patch -p0(-p1) < patch文件
- linux下如何打补丁
- linux下patch打补丁
- linux下如何打补丁
- Linux下打补丁
- linux下给源码打补丁
- Linux下patch打补丁命令
- Linux下patch打补丁命令
- Linux下patch打补丁命令
- linux下给内核打补丁
- linux下补丁制作及打补丁实例
- Linux下patch打补丁命令实例详解
- Linux下patch打补丁命令实例详解
- linux下打补丁和生成补丁
- Linux下Patch制作(打补丁)
- linux 打补丁
- linux打补丁
- linux下patch命令使用详解---linux打补丁命令
- 【转】Linux下使用diff和patch制作及打补丁
- emmc 通过reset controller 来reset emmc host
- 说说显示器接口那点事!VGA、DVI、HDMI,DP
- 【LeetCode】 237. Delete Node in a Linked List C语言
- LeetCode笔记:386. Lexicographical Numbers
- CentOS 7 安装GitLab
- Linux下打补丁
- Java程序员必须掌握的8大排序算法
- Java虚拟机类加载机制
- 每天一个Linux命令(50):route
- 轻量级操作系统FreeRTOS的内存管理机制(一)
- IP地址的CString型和DWORD型转换
- 青涩的时光写给未来的自己——程序员不能Low
- SICP 1.3
- JS读取/创建本地文件及目录文件夹的方法