Bladeren bron

swupdate: Build out-of-tree

Configure the recipe to build swupdate out-of-tree. This is extra
helpful when building with externalsrc or devtool. A bug fix in swupdate
is required for out-of-tree builds to work, so it is currently only
enabled for the git version, and the fix has been brought in there.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Joshua Watt 5 jaren geleden
bovenliggende
commit
035538a185

+ 7 - 6
recipes-support/swupdate/swupdate.inc

@@ -69,8 +69,9 @@ RDEPENDS_${PN}-tools += "${PN}-client ${PN}-progress ${PN}-tools-hawkbit \
 "
 
 S = "${WORKDIR}/git/"
+B = "${WORKDIR}/build/"
 
-EXTRA_OEMAKE += " HOSTCC="${BUILD_CC}" HOSTCXX="${BUILD_CXX}" LD="${CC}" DESTDIR="${D}" LIBDIR="${libdir}" V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
+EXTRA_OEMAKE += " O=${B} HOSTCC="${BUILD_CC}" HOSTCXX="${BUILD_CXX}" LD="${CC}" DESTDIR="${D}" LIBDIR="${libdir}" V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
 
 DEPENDS += "kern-tools-native"
 
@@ -190,18 +191,18 @@ python () {
 }
 
 do_configure () {
-    cp ${WORKDIR}/defconfig ${S}/.config
-    merge_config.sh -m .config ${@" ".join(find_cfgs(d))}
-    cml1_do_configure
+    cp ${WORKDIR}/defconfig ${WORKDIR}/.config
+    merge_config.sh -O ${B} -m ${WORKDIR}/.config ${@" ".join(find_cfgs(d))}
+    (cd ${S} && cml1_do_configure)
 }
 
 do_compile() {
     unset LDFLAGS
-    oe_runmake
+    (cd ${S} && oe_runmake)
 }
 
 do_install () {
-    oe_runmake install
+    (cd ${S} && oe_runmake install)
 
     install -m 0755 -d ${D}/www
     if [ -d ${S}/web-app ];then

+ 3 - 0
recipes-support/swupdate/swupdate_2019.11.bb

@@ -1,3 +1,6 @@
 require swupdate.inc
 
 SRCREV = "5de3bc30a203ee218f9ebbe256b42e26cf06c74f"
+
+# Building out of tree is broken in this version
+B = "${S}"

+ 3 - 0
recipes-support/swupdate/swupdate_2020.04.bb

@@ -1,3 +1,6 @@
 require swupdate.inc
 
 SRCREV = "1a6dfbb5a0be978ac1a159758e278ab4d44167e2"
+
+# Building out of tree is broken in this version
+B = "${S}"

+ 1 - 1
recipes-support/swupdate/swupdate_git.bb

@@ -2,5 +2,5 @@ require swupdate.inc
 
 DEFAULT_PREFERENCE = "-1"
 
-SRCREV ?= "4ad398cbe137d01180a7094cfdea974a943e1f1e"
+SRCREV ?= "0c672866d4a9fe8f0808b5d8a0afb95c13c4c138"
 PV = "2020.04+git${SRCPV}"