busybox fixes and cleanups
cover busybox fixes and cleanups
Further busybox recipe cleanups, to be applied on top of:
busybox.inc: remove redundant @DATADIR@ replacement
Andre McCurdy (7):
busybox_git: Enable getopt applet
busybox.inc: don't export EXTRA_OEMAKE
busybox: move common EXTRA_OEMAKE options into busybox.inc busybox.inc: explicitly include CC=${CC} on make command line busybox.inc: don't set .config CROSS_COMPILER_PREFIX busybox.inc: fix CONFIG_EXTRA_CFLAGS configmangle busybox.inc: remove MAKEFLAGS over-ride from EXTRA_OEMAKE
meta/recipes-core/busybox/busybox.inc | 14 +++++++++----- meta/recipes-core/busybox/busybox_1.23.2.bb | 2 -- meta/recipes-core/busybox/busybox_git.bb | 3 +-- 3 files changed, 10 insertions(+), 9 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/7 busybox_git: Enable getopt applet
Keep git recipe in sync with 1.23.2:
http://git.openembedded.org/openembedded-core/commit/?id=10c2c484d5916ad476ad7717c3629f6684f01e6d
--- meta/recipes-core/busybox/busybox_git.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-core/busybox/busybox_git.bb +1 -0
@@ -41,6 +41,7 @@ SRC_URI = "git://busybox.net/busybox.git \ file://mount-via-label.cfg \ file://sha1sum.cfg \ file://sha256sum.cfg \ + file://getopts.cfg \ " EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
Signature · 1 line
1.9.1
PATCH 2/7 busybox.inc: don't export EXTRA_OEMAKE
In reply to Andre McCurdyEXTRA_OEMAKE is private to OE and shouldn't be exported to the busybox build.
--- meta/recipes-core/busybox/busybox.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/busybox/busybox.inc +2 -1
@@ -17,7 +17,8 @@ BUSYBOX_SPLIT_SUID ?= "1" export EXTRA_CFLAGS = "${CFLAGS}" export EXTRA_LDFLAGS = "${LDFLAGS}" -export EXTRA_OEMAKE += "'LD=${CCLD}'" + +EXTRA_OEMAKE += "'LD=${CCLD}'" PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
Signature · 1 line
1.9.1
PATCH 3/7 busybox: move common EXTRA_OEMAKE options into busybox.inc
In reply to Andre McCurdyCurrent EXTRA_OEMAKE options are common to all supported versions of busybox (1.23.2 and git), so move from version specific recipes into busybox.inc.
--- meta/recipes-core/busybox/busybox.inc | 1 + meta/recipes-core/busybox/busybox_1.23.2.bb | 2 -- meta/recipes-core/busybox/busybox_git.bb | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-)
meta/recipes-core/busybox/busybox.inc +1 -0
@@ -19,6 +19,7 @@ export EXTRA_CFLAGS = "${CFLAGS}" export EXTRA_LDFLAGS = "${LDFLAGS}" EXTRA_OEMAKE += "'LD=${CCLD}'" +EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y" PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
meta/recipes-core/busybox/busybox_1.23.2.bb +0 -2
@@ -44,8 +44,6 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ SRC_URI[tarball.md5sum] = "7925683d7dd105aabe9b6b618d48cc73" SRC_URI[tarball.sha256sum] = "05a6f9e21aad8c098e388ae77de7b2361941afa7157ef74216703395b14e319a" -EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y" - do_install_ptest () { cp -r ${B}/testsuite ${D}${PTEST_PATH}/ cp ${B}/.config ${D}${PTEST_PATH}/
meta/recipes-core/busybox/busybox_git.bb +0 -2
@@ -44,8 +44,6 @@ SRC_URI = "git://busybox.net/busybox.git \ file://getopts.cfg \ " -EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y" - do_install_ptest () { cp -r ${B}/testsuite ${D}${PTEST_PATH}/ cp ${B}/.config ${D}${PTEST_PATH}/
Signature · 1 line
1.9.1
PATCH 4/7 busybox.inc: explicitly include CC=${CC} on make command line
In reply to Andre McCurdyThe busybox build currently relies on 'make -e' to over-ride CC and the make command line to over-ride LD. Add CC to the make command line to make the CC over-ride more explicit and consistent with LD.
--- meta/recipes-core/busybox/busybox.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/busybox/busybox.inc +1 -1
@@ -18,7 +18,7 @@ BUSYBOX_SPLIT_SUID ?= "1" export EXTRA_CFLAGS = "${CFLAGS}" export EXTRA_LDFLAGS = "${LDFLAGS}" -EXTRA_OEMAKE += "'LD=${CCLD}'" +EXTRA_OEMAKE += "'CC=${CC}' 'LD=${CCLD}'" EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y" PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
Signature · 1 line
1.9.1
PATCH 5/7 busybox.inc: don't set .config CROSS_COMPILER_PREFIX
In reply to Andre McCurdySetting CROSS_COMPILER_PREFIX via .config is redundant (setting CROSS_COMPILE via the make command line will always over-ride it).
--- meta/recipes-core/busybox/busybox.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
meta/recipes-core/busybox/busybox.inc +2 -4
@@ -81,8 +81,7 @@ def features_to_busybox_del(d): cnf, rem = features_to_busybox_settings(d) return rem -configmangle = '/CROSS_COMPILER_PREFIX/d; \ - /CONFIG_EXTRA_CFLAGS/d; \ +configmangle = '/CONFIG_EXTRA_CFLAGS/d; \ ' OE_FEATURES := "${@features_to_busybox_conf(d)}" OE_DEL := "${@features_to_busybox_del(d)}"
@@ -98,8 +97,7 @@ python () { ("\\n".join((d.expand("${OE_FEATURES}").split("\n"))))) d.setVar('configmangle_append', "/^### CROSS$/a\\\n%s\n" % - ("\\n".join(["CONFIG_CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"", - "CONFIG_EXTRA_CFLAGS=\"${CFLAGS}\" \"${HOST_CC_ARCH}\"" + ("\\n".join(["CONFIG_EXTRA_CFLAGS=\"${CFLAGS}\" \"${HOST_CC_ARCH}\"" ]) )) }
Signature · 1 line
1.9.1
PATCH 6/7 busybox.inc: fix CONFIG_EXTRA_CFLAGS configmangle
In reply to Andre McCurdyWith current busybox Kbuild, setting .config to:
CONFIG_EXTRA_CFLAGS="foo" "bar"
and then running 'make oldconfig' results in .config containing:
CONFIG_EXTRA_CFLAGS="foo"
ie the CONFIG_EXTRA_CFLAGS configmangle in the busybox.inc doesn't currently work as intended. Remove the extra \" \" to ensure that ${HOST_CC_ARCH} gets added to CONFIG_EXTRA_CFLAGS.
--- meta/recipes-core/busybox/busybox.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/busybox/busybox.inc +1 -1
@@ -97,7 +97,7 @@ python () { ("\\n".join((d.expand("${OE_FEATURES}").split("\n"))))) d.setVar('configmangle_append', "/^### CROSS$/a\\\n%s\n" % - ("\\n".join(["CONFIG_EXTRA_CFLAGS=\"${CFLAGS}\" \"${HOST_CC_ARCH}\"" + ("\\n".join(["CONFIG_EXTRA_CFLAGS=\"${CFLAGS} ${HOST_CC_ARCH}\"" ]) )) }
Signature · 1 line
1.9.1
PATCH 7/7 busybox.inc: remove MAKEFLAGS over-ride from EXTRA_OEMAKE
In reply to Andre McCurdyBusybox Kbuild likes to control its own MAKEFLAGS (it adds -rR, etc), so avoid over-riding MAKEFLAGS via EXTRA_OEMAKE.
--- meta/recipes-core/busybox/busybox.inc | 4 ++++ 1 file changed, 4 insertions(+)
meta/recipes-core/busybox/busybox.inc +4 -0
@@ -18,6 +18,10 @@ BUSYBOX_SPLIT_SUID ?= "1" export EXTRA_CFLAGS = "${CFLAGS}" export EXTRA_LDFLAGS = "${LDFLAGS}" +# Busybox Kbuild likes to control its own MAKEFLAGS (it adds -rR, +# etc), so avoid over-riding MAKEFLAGS via EXTRA_OEMAKE. +EXTRA_OEMAKE = "-e" + EXTRA_OEMAKE += "'CC=${CC}' 'LD=${CCLD}'" EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
Signature · 1 line
1.9.1
Quoted 16 lines · Andre McCurdy
Further busybox recipe cleanups, to be applied on top of:
busybox.inc: remove redundant @DATADIR@ replacement
Andre McCurdy (7):
busybox_git: Enable getopt applet
busybox.inc: don't exportEXTRA_OEMAKE
busybox: move commonEXTRA_OEMAKEoptions into busybox.inc busybox.inc: explicitly include CC=${CC} on make command line busybox.inc: don't set .configCROSS_COMPILER_PREFIXbusybox.inc: fixCONFIG_EXTRA_CFLAGSconfigmangle busybox.inc: remove MAKEFLAGS over-ride fromEXTRA_OEMAKE
Quoted 5 lines
meta/recipes-core/busybox/busybox.inc | 14 +++++++++----- meta/recipes-core/busybox/busybox_1.23.2.bb | 2 -- meta/recipes-core/busybox/busybox_git.bb | 3 +-- 3 files changed, 10 insertions(+), 9 deletions(-)
LGTM