[英]bbappend patching error for yocto custom receipe
I am newbie to yocto. 我是yocto的新手。 I have create a simple layer and it consist of a simple patch file for wpa_supplicant. 我创建了一个简单的图层,它包含一个用于wpa_supplicant的简单补丁文件。 I want to modify wpa_supplicant.conf-sane file from my own layer. 我想从我自己的图层修改wpa_supplicant.conf-sane文件。 Original wpa_supplicant resides on different layer 原始wpa_supplicant驻留在不同的层上
wpa-supplicant-bbappend
├── wpa-supplicant
│ └── wiress_info.patch
└── wpa-supplicant_2.6.bbappend
I have generated a diff file 我已经生成了一个差异文件
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
Here is my patch file : 这是我的补丁文件:
--- ../../../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
}
Here is my wpa-supplicant_2.6.bbappend file 这是我的wpa-supplicant_2.6.bbappend文件
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append = " file://wiress_info.patch "
Still I am having some error during patch by yocto 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
I am not able to figure out whats wrong I am doing? 我无法弄清楚我在做什么错? Please help 请帮忙
Your patch has wrong source file to patch specified. 您的补丁程序具有错误的源文件,无法指定补丁程序。 Thus the message "No file to patch.". 因此,出现消息“没有要修补的文件”。
The patches are applied with option -p1
(see Patching Code in doc ) in directory in variable S
(ie unpacked source files, see Patching in doc ). 修补程序在变量S
中的目录中带有选项-p1
(请参阅doc中的修补代码 )(即解压缩的源文件,请参阅doc中的修补程序 )应用。
Although you can apply that patch by adding striplevel
option in SRC_URI
, the right way is to fix the patch itself. 尽管可以通过在SRC_URI
添加striplevel
选项来应用该补丁,但正确的方法是修复补丁本身。 Please see Nayfe's comment about devshell, it is convenient way to do it (or fix path in your diff
command). 请参阅Nayfe关于devshell的评论,这是一种方便的方法(或在diff
命令中修复路径)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.