yocto自定义收据的bbappend修补错误

时间:2019-04-14 18:23:45

标签: yocto

我是yocto的新手。我创建了一个简单的图层,它包含一个用于wpa_supplicant的简单补丁文件。我想从我自己的图层修改wpa_supplicant.conf-sane文件。原始的wpa_supplicant驻留在不同的层上

wpa-supplicant-bbappend
        ├── wpa-supplicant
        │   └── wiress_info.patch
        └── wpa-supplicant_2.6.bbappend

我已经生成了一个差异文件

 diff -u ../../../poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa_supplicant.conf-sane wpa-supplicant/wpa_supplicant.conf-sane > wpa-supplicant/wiress_info.patch

这是我的补丁文件:

--- ../../../poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa_supplicant.conf-sane  2019-04-15 02:47:49.379423777 +0900
+++ wpa-supplicant/wpa_supplicant.conf-sane 2019-04-15 03:03:31.765059417 +0900
@@ -3,5 +3,11 @@
 update_config=1

 network={
-        key_mgmt=NONE
+   key_mgmt=NONE
+   ssid="tanmoyc"
+   psk="asdzxcqwe123"
+   proto=RSN
+   key_mgmt=WPA-PSK
+   pairwise=CCMP
+   auth_alg=OPEN
 }

这是我的wpa-supplicant_2.6.bbappend文件

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append = " file://wiress_info.patch "

在yocto修补过程中仍然出现一些错误

Applying patch wiress_info.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- ../../../poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/wpa_supplicant.conf-sane 2019-04-15 02:47:49.379423777 +0900
|+++ wpa-supplicant/wpa_supplicant.conf-sane    2019-04-15 03:03:31.765059417 +0900
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Patch wiress_info.patch does not apply (enforce with -f)
ERROR: wpa-supplicant-2.6-r0 do_patch: Function failed: patch_do_patch

我无法弄清楚我在做什么错?请帮助

1 个答案:

答案 0 :(得分:2)

您的补丁程序有错误的源文件要指定的补丁程序。因此,显示消息“没有要修补的文件。”。

修补程序通过选项-p1(请参阅Patching Code in doc)应用于变量S中的目录(即解压缩的源文件,请参阅Patching in doc)。

尽管您可以通过在striplevel中添加SRC_URI选项来应用该补丁,但是正确的方法是修复补丁本身。请参阅Nayfe关于devshell的评论,这是一种简便的方法(或在diff命令中修复路径)。