我想对 u-boot 源代码应用补丁,但是 Linux 不允许我这样做。我有什么:
reg@ubuntu:~/NextGen/trunk/FW/thirdparty/u-boot$ patch -p1 < ../u-boot/u-boot-2013.01-wr.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -uNr u-boot-2013.01/arch/powerpc/cpu/mpc85xx/cpu_init.c u-boot-2013.01.modified/arch/powerpc/cpu/mpc85xx/cpu_init.c
|--- u-boot-2013.01/arch/powerpc/cpu/mpc85xx/cpu_init.c 2013-01-15 13:47:42.000000000 -0800
|+++ u-boot-2013.01.modified/arch/powerpc/cpu/mpc85xx/cpu_init.c 2013-05-16 10:58:08.973906692 -0700
--------------------------
File to patch: ^C
reg@ubuntu:~/NextGen/trunk/FW/thirdparty/u-boot$ ls -l u-boot-2013.01/arch/powerpc/cpu/mpc85xx/cpu_init.c
-rw-r--r-- 1 reg reg 16745 Jan 15 2013 u-boot-2013.01/arch/powerpc/cpu/mpc85xx/cpu_init.c
reg@ubuntu:~/NextGen/trunk/FW/thirdparty/u-boot$
那么为什么当文件完全位于正确的位置时却找不到呢?这是怎么回事?
这里涉及到三个文件路径:
u-boot-2013.01/arch/powerpc/cpu/mpc85xx/cpu_init.c
u-boot-2013.01.modified/arch/powerpc/cpu/mpc85xx/cpu_init.c
-p1
而被剥离的目标文件:arch/powerpc/cpu/mpc85xx/cpu_init.c
Patch查找剥离的目标文件,发现它不存在。
cd u-boot-2013.01
,然后patch -p1 < ../../u-boot/u-boot-2013.01-wr.patch
,你应该会更幸运。
Bitbake 在修补文件时失败。
我可以修补它给出的输出的文件: fayaz@omz-dt-08:~/new/manifest/sdk-sources/sdk/common/common_components/src/product_db$ 补丁 -p1 < patches/0001-update-production_db.patch patching file src/production_db.c Hunk #1 succeeded at 544 with fuzz 1 (offset 296 lines). Hunk #2 succeeded at 2897 with fuzz 2 (offset 336 lines).
但是当我尝试构建食谱时,它显示以下错误。有人可以帮我解决吗?
没有要修补的文件。 跳过补丁。 二分之二的帅哥被忽略了