将补丁应用于yocto配方中的文件

时间:2017-09-04 08:37:52

标签: patch yocto bitbake

我有一个yocto配方来编译来自github的代码。我修改了一些文件,并希望将补丁应用于从github获取的代码。以下是我构建代码的方法。

SUMMARY = "Linux NFC stack for NCI based NXP NFC Controllers"
HOMEPAGE = "https://github.com/NXPNFCLinux/linux_libnfc-nci"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://src/include/linux_nfc_api.h;endline=17;md5=42fdb99b3ff2c12f594b22a774cb7308"
SECTION = "libs"

SRC_URI = "git://github.com/NXPNFCLinux/linux_libnfc-nci.git \

file:///home/pratyush/Desktop/custom_board/drivers/PN7150/linux_libnfc-nci/demoapp-main-patch1.patch"
SRCREV = "7cf539d3d9c0d682c8da5968fbf5615ae9993060"
PV = "2.1+git${SRCPV}"
EXTRA_OECONF =" --enable-pn7150"

S = "${WORKDIR}/git"

inherit autotools
FILES_${PN} += "${libdir}/libnfc_nci_linux-1.so"
FILES_SOLIBSDEV = "${libdir}/libnfc_nci_linux.so"

按照我的补丁应用

--- /home/root/PN7150/linux_libnfc-nci/Makefile.am
+++ Makefile.am
@@ -1,7 +1,7 @@
lib_LTLIBRARIES = libnfc_nci_linux.la

-sbin_PROGRAMS = nfcDemoApp 
-nfcDemoApp_DEPENDENCIES = libnfc_nci_linux.la
+sbin_PROGRAMS = readNfc 
+readNfc_DEPENDENCIES = libnfc_nci_linux.la

LDFLAGS = -Bstatic 

@@ -9,13 +9,13 @@
LDFLAGS += -L$(openssldir)/lib -lcrypto -lssl
endif

-nfcDemoApp_FLAGS = -I$(srcdir)/demoapp -I$(srcdir)/src/include 
+readNfc_FLAGS = -I$(srcdir)/demoapp -I$(srcdir)/src/include 

AM_CPPFLAGS = \
-I$(srcdir)/src/include \
$(INCLUDE_PARAMS) \
$(libnfc_nci_linux_la_FLAGS) \
-   $(nfcDemoApp_FLAGS)
+   $(readNfc_FLAGS)

if LLCP1_3
AM_CPPFLAGS += \
@@ -177,7 +177,7 @@
src/service/linux_nfc_api.c \
src/service/linux_nfc_factory_api.c

-nfcDemoApp_SOURCES := \
+readNfc_SOURCES := \
    demoapp/main.c \
    demoapp/tools.c

@@ -231,6 +231,6 @@
libnfc_nci_linux_la_LDFLAGS +=-DPN551C2=3
libnfc_nci_linux_la_LDFLAGS += -shared -pthread -ldl -lrt -fPIC -release 1 -versionnfo 0:0:0

-nfcDemoApp_LDFLAGS = -pthread -ldl -lrt -lnfc_nci_linux
+readNfc_LDFLAGS = -pthread -ldl -lrt -lnfc_nci_linux

因此我想从本地应用补丁到github获取的代码。但是,当我尝试bitbake应用补丁时,我总是得到以下错误 “无法在输入第3行找到要修补的文件”

1 个答案:

答案 0 :(得分:2)

问题在于您如何创建补丁。最简单的方法(如果你习惯于git)是使用git。否则,区分两个完整的源树是一种很好的方法。

解决问题的一种方法是将<form id="form1" data-parsley-validate="true"> <input type="text" name="field1" data-parsley-min3 = ".group1" data-parsley-min3-message = "At least 1 must be filled" class="group1"> <input type="text" name="field2" data-parsley-min3 = ".group1" data-parsley-min3-message = "At least 1 must be filled" class="group1"> <input type="text" name="field3" data-parsley-min3 = ".group1" data-parsley-min3-message = "At least 1 must be filled" class="group1"> <span id="notice"></span> <input type="submit" value="Submit"> </form> 添加到;striplevel=0行。 (bitbake / OE假定条带级别为1)。

另一种方法是修改补丁以开始:

SRC_URI

那应该可以解决你的问题。