2016-12-29 48 views
-1

我想寫一個配方,它可以和我的補丁一起工作,但是當我添加我的配方「inherit native」時,它只是簡單地通過我的補丁而不應用它。yocto do_patch不適用於本地

首先,我想升級一個基地recipe將其文件名更改爲2.8.33(此方法通常適用於其他配方)。我在編譯時遇到了一個錯誤,在發現錯誤之後,我做了一個補丁並將其添加到配方中。當我從配方中刪除原生相關行時,它已成功編譯。我檢查了工作目錄中的代碼,發現我的補丁應用了。但對於本機編譯,我看不到我的補丁應用於提取的代碼。

gsoap_2.8.33.inc:

DESCRIPTION = "The gSOAP toolkit provides a unique SOAP-to-C/C++ language binding \ 
for the development of SOAP Web Services and clients." 
SECTION = "devel" 
LICENSE = "GPLv2" 
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f195e609151c013dcfce95528e2d4c63" 

SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}2/${BPN}_${PV}.zip" 
SRC_URI[md5sum] = "43dade7839252500f7671f8fe6a3739c" 
SRC_URI[sha256sum] = "8534a8bb82ce97544bbb60bf4410ef66f9c328abf62879e499272894019199a4" 

inherit autotools 


PR = "r1" 

S = "${WORKDIR}/gsoap-2.8" 


FILES_${PN}-dev = "${includedir}" 
RRECOMMENDS_${PN}-dev = "${PN}-staticdev" 

FILES_${PN}-staticdev = "${libdir}" 


EXTRA_OECONF_append =" --enable-ipv6 " 


EXTRA_OEMAKE = "SOAP=${STAGING_BINDIR_NATIVE}/soapcpp2" 


PARALLEL_MAKE = "" 

gsoap-native_2.8.33.bb(不工作,不打補丁):

inherit native 
require gsoap_${PV}.inc 

FILESEXTRAPATHS_append := "${THISDIR}/:" 


SRC_URI += "file://conf.patch" 

PARALLEL_MAKE = "" 

DEPENDS = "" 
EXTRA_OEMAKE = "" 

do_patch_append() { 
d.setVar("TEXT", "Hello World") 
print d.getVar("TEXT", True) 
} 

do_install() { 
    oe_runmake DESTDIR=${D} BINDIR=${D}${bindir} install 
} 

gsoap_2.8.33.bb(作品和做修補程序時gSOAP的母語依賴性刪除):

require gsoap_${PV}.inc 
DEPENDS = "gsoap-native openssl zlib flex bison" 

FILESEXTRAPATHS_append := "${THISDIR}/:" 
SRC_URI += "file://conf.patch" 

do_install_append() { 
    install -d ${D}${libdir} 
    for lib in libgsoapssl libgsoapssl++ libgsoap libgsoapck++ libgsoap++ libgsoapck 
    do 
     oe_libinstall -C gsoap $lib ${D}${libdir} 
    done 
} 

FILES_${PN} = "${bindir}/wsdl2h ${bindir}/soapcpp2" 
FILES_${PN} += "${datadir}" 

我的補丁:

diff --git a/configure b/configure 
index a3fade3..8708cad 100755 
--- a/configure 
+++ b/configure 
@@ -6196,7 +6196,7 @@ $as_echo "no" >&6; } 
    WSDL2H_EXTRA_FLAGS="-DWITH_OPENSSL -DWITH_GZIP" 
    # an ugly hack to get httpda and smdevp plugins to conditionally 
    # compile with wsdl2h when OPENSSL is available 
- WSDL2H_EXTRA_LIBS="${WSDL2H_EXTRA_LIBS} ../plugin/httpda.c ../plugin/smdevp.c ../plugin/threads.c -lssl -lcrypto -lz" 
+ #WSDL2H_EXTRA_LIBS="${WSDL2H_EXTRA_LIBS} ../plugin/httpda.c ../plugin/smdevp.c ../plugin/threads.c -lssl -lcrypto -lz" 
    SAMPLE_INCLUDES= 
    SAMPLE_SSL_LIBS="-lssl -lcrypto -lz" 
    WSDL2H_SOAP_CPP_LIB="libgsoapssl++.a" 

如何使我的配方'bitbake'd使用我的補丁進行交叉編譯?

+0

請顯示配方並說明您如何檢查該補丁未應用。 – jku

+0

@jku我對這個問題做了一些改變 – rotringuser

+0

對不起,但這裏還沒有任何可以處理的東西...爲什麼不顯示不工作的配方,而不是鏈接到顯然工作的配方? – jku

回答

1

你還沒有解釋什麼確切地失敗了,你是如何檢查的......我測試了你的gsoap-native配方,並且在刪除破損的do_patch_append()函數後,它的補丁很好:在bitbake -c patch gsoap-native之後,我可以看到補丁來源於gsoap-native工作目錄。

一些注意事項:

  • 你打補丁,將do_configure中得到再生(自動工具類將運行autoreconf)的文件 - 也許這就是爲什麼你認爲打補丁沒有發生。改爲修改configure.ac。
  • 應該不需要分開原生配方和目標配方:元開發的原始配方已經支持構建gsoap和gsoap-native。如果你需要添加一個補丁程序來使新版本工作,那麼做,不要開始寫新的食譜。
相關問題