Message ID | 20200706213713.31846-1-JPEWhacker@gmail.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [meta-swupdate] swupdate: Build out-of-tree | expand |
On 06.07.20 23:37, Joshua Watt wrote: > Configure the recipe to build swupdate out-of-tree. This is extra > helpful when building with externalsrc or devtool. > > Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> > --- > recipes-support/swupdate/swupdate.inc | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc > index 9ea0a8a..2de2d7d 100644 > --- a/recipes-support/swupdate/swupdate.inc > +++ b/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 > Reviewed-by: Stefano Babic <sbabic@denx.de> Best regards, Stefano Babic
Hi Joshua, On 07.07.20 12:52, Stefano Babic wrote: > On 06.07.20 23:37, Joshua Watt wrote: >> Configure the recipe to build swupdate out-of-tree. This is extra >> helpful when building with externalsrc or devtool. >> >> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> >> --- >> recipes-support/swupdate/swupdate.inc | 13 +++++++------ >> 1 file changed, 7 insertions(+), 6 deletions(-) >> >> diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc >> index 9ea0a8a..2de2d7d 100644 >> --- a/recipes-support/swupdate/swupdate.inc >> +++ b/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 >> > > Reviewed-by: Stefano Babic <sbabic@denx.de> > My build is broken (do_install) with this - can you take a look ? Best regards, Stefano Babic
On Tue, Jul 7, 2020, 6:02 AM Stefano Babic <sbabic@denx.de> wrote: > Hi Joshua, > > On 07.07.20 12:52, Stefano Babic wrote: > > On 06.07.20 23:37, Joshua Watt wrote: > >> Configure the recipe to build swupdate out-of-tree. This is extra > >> helpful when building with externalsrc or devtool. > >> > >> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> > >> --- > >> recipes-support/swupdate/swupdate.inc | 13 +++++++------ > >> 1 file changed, 7 insertions(+), 6 deletions(-) > >> > >> diff --git a/recipes-support/swupdate/swupdate.inc > b/recipes-support/swupdate/swupdate.inc > >> index 9ea0a8a..2de2d7d 100644 > >> --- a/recipes-support/swupdate/swupdate.inc > >> +++ b/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 > >> > > > > Reviewed-by: Stefano Babic <sbabic@denx.de> > > > > My build is broken (do_install) with this - can you take a look ? > Yes sorry. I forgot this only works with a fix to swupdate. I'll change the patch so that it only applies to the git version for now and update it's SHA-1 to include the fix > Best regards, > Stefano Babic > > -- > ===================================================================== > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de > ===================================================================== >
diff --git a/recipes-support/swupdate/swupdate.inc b/recipes-support/swupdate/swupdate.inc index 9ea0a8a..2de2d7d 100644 --- a/recipes-support/swupdate/swupdate.inc +++ b/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
Configure the recipe to build swupdate out-of-tree. This is extra helpful when building with externalsrc or devtool. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> --- recipes-support/swupdate/swupdate.inc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)