diff options
author | jmbills <42755197+jmbills@users.noreply.github.com> | 2019-10-25 19:18:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-25 19:18:16 +0300 |
commit | 0dbb60593ebb5a62190c0e6cff7f1770493303a2 (patch) | |
tree | 0df2ce67404dbca3ddc4ee063dbfd9ae455be682 /poky/meta/recipes-core/busybox | |
parent | 34a3942845ac3264ce27c648ae5486d302c3e6d8 (diff) | |
parent | cc9cea46d74d280de03c713c8b555153fd811f09 (diff) | |
download | openbmc-0dbb60593ebb5a62190c0e6cff7f1770493303a2.tar.xz |
Merge branch 'intel' into intel2
Diffstat (limited to 'poky/meta/recipes-core/busybox')
-rw-r--r-- | poky/meta/recipes-core/busybox/busybox-inittab_1.31.0.bb (renamed from poky/meta/recipes-core/busybox/busybox-inittab_1.30.1.bb) | 19 | ||||
-rw-r--r-- | poky/meta/recipes-core/busybox/busybox.inc | 71 | ||||
-rw-r--r-- | poky/meta/recipes-core/busybox/busybox/0001-dc.tests-fix-two-test-case-to-also-depend-on-DC_BIG.patch | 39 | ||||
-rw-r--r-- | poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch | 60 | ||||
-rw-r--r-- | poky/meta/recipes-core/busybox/busybox/unicode.cfg | 10 | ||||
-rw-r--r-- | poky/meta/recipes-core/busybox/busybox_1.31.0.bb (renamed from poky/meta/recipes-core/busybox/busybox_1.30.1.bb) | 9 | ||||
-rwxr-xr-x | poky/meta/recipes-core/busybox/files/mount.busybox | 3 | ||||
-rw-r--r-- | poky/meta/recipes-core/busybox/files/syslog | 22 | ||||
-rwxr-xr-x | poky/meta/recipes-core/busybox/files/umount.busybox | 3 |
9 files changed, 114 insertions, 122 deletions
diff --git a/poky/meta/recipes-core/busybox/busybox-inittab_1.30.1.bb b/poky/meta/recipes-core/busybox/busybox-inittab_1.31.0.bb index c347daf50..61fb8cbad 100644 --- a/poky/meta/recipes-core/busybox/busybox-inittab_1.30.1.bb +++ b/poky/meta/recipes-core/busybox/busybox-inittab_1.31.0.bb @@ -13,15 +13,16 @@ do_compile() { } do_install() { - install -d ${D}${sysconfdir} - install -D -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab - tmp="${SERIAL_CONSOLES}" - for i in $tmp - do - j=`echo ${i} | sed s/\;/\ /g` - id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'` - echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab - done + install -d ${D}${sysconfdir} + install -D -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab + tmp="${SERIAL_CONSOLES}" + [ -n "$tmp" ] && echo >> ${D}${sysconfdir}/inittab + for i in $tmp + do + j=`echo ${i} | sed s/\;/\ /g` + id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'` + echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab + done } # SERIAL_CONSOLES is generally defined by the MACHINE .conf. diff --git a/poky/meta/recipes-core/busybox/busybox.inc b/poky/meta/recipes-core/busybox/busybox.inc index 174ce5a8c..d08fa8d3d 100644 --- a/poky/meta/recipes-core/busybox/busybox.inc +++ b/poky/meta/recipes-core/busybox/busybox.inc @@ -128,7 +128,9 @@ do_prepare_config () { ${S}/.config.oe-tmp > ${S}/.config fi sed -i 's/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"/CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -b"/' ${S}/.config - sed -i 's|${DEBUG_PREFIX_MAP}||g' ${S}/.config + if [ -n "${DEBUG_PREFIX_MAP}" ]; then + sed -i 's|${DEBUG_PREFIX_MAP}||g' ${S}/.config + fi } # returns all the elements from the src uri that are .cfg files @@ -142,6 +144,7 @@ def find_cfgs(d): return sources_list do_configure () { + set -x do_prepare_config merge_config.sh -m .config ${@" ".join(find_cfgs(d))} cml1_do_configure @@ -316,8 +319,8 @@ do_install () { fi fi if grep -q "CONFIG_INIT=y" ${B}/.config; then - install -D -m 0777 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS - install -D -m 0777 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK + install -D -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS + install -D -m 0755 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK fi if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then @@ -392,34 +395,40 @@ python do_package_prepend () { set_alternative_vars("${sysconfdir}/busybox.links.suid", "${base_bindir}/busybox.suid") } -pkg_postinst_${PN} () { - # This part of code is dedicated to the on target upgrade problem. - # It's known that if we don't make appropriate symlinks before update-alternatives calls, - # there will be errors indicating missing commands such as 'sed'. - # These symlinks will later be updated by update-alternatives calls. - test -n 2 > /dev/null || alias test='busybox test' - if test "x$D" = "x"; then - # Remove busybox.nosuid if it's a symlink, because this situation indicates - # that we're installing or upgrading to a one-binary busybox. - if test -h ${base_bindir}/busybox.nosuid; then - rm -f ${base_bindir}/busybox.nosuid - fi - for suffix in "" ".nosuid" ".suid"; do - if test -e ${sysconfdir}/busybox.links$suffix; then - while read link; do - if test ! -e "$link"; then - # we can use busybox here because even if we are using splitted busybox - # we've made a symlink from /bin/busybox to /bin/busybox.nosuid. - busybox rm -f $link - busybox ln -s "${base_bindir}/busybox$suffix" $link - fi - done < ${sysconfdir}/busybox.links$suffix - fi - done - fi - if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links*; then - grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells - fi +# This part of code is dedicated to the on target upgrade problem. It's known +# that if we don't make appropriate symlinks before update-alternatives calls, +# there will be errors indicating missing commands such as 'sed'. +# These symlinks will later be updated by update-alternatives calls. +# The update-alternatives.bbclass' postinst script runs firstly before other +# postinst, but this part of code needs run firstly, so add this funtion. +python populate_packages_updatealternatives_append() { + postinst = """ +test -n 2 > /dev/null || alias test='busybox test' +if test "x$D" = "x"; then + # Remove busybox.nosuid if it's a symlink, because this situation indicates + # that we're installing or upgrading to a one-binary busybox. + if test -h ${base_bindir}/busybox.nosuid; then + rm -f ${base_bindir}/busybox.nosuid + fi + for suffix in "" ".nosuid" ".suid"; do + if test -e ${sysconfdir}/busybox.links$suffix; then + while read link; do + if test ! -e "$link"; then + # we can use busybox here because even if we are using splitted busybox + # we've made a symlink from /bin/busybox to /bin/busybox.nosuid. + busybox rm -f $link + busybox ln -s "${base_bindir}/busybox$suffix" $link + fi + done < ${sysconfdir}/busybox.links$suffix + fi + done +fi +if grep -q "^${base_bindir}/bash$" $D${sysconfdir}/busybox.links*; then + grep -q "^${base_bindir}/bash$" $D${sysconfdir}/shells || echo ${base_bindir}/bash >> $D${sysconfdir}/shells +fi + +""" + d.prependVar('pkg_postinst_%s' % pkg, postinst) } pkg_prerm_${PN} () { diff --git a/poky/meta/recipes-core/busybox/busybox/0001-dc.tests-fix-two-test-case-to-also-depend-on-DC_BIG.patch b/poky/meta/recipes-core/busybox/busybox/0001-dc.tests-fix-two-test-case-to-also-depend-on-DC_BIG.patch deleted file mode 100644 index d22db4a66..000000000 --- a/poky/meta/recipes-core/busybox/busybox/0001-dc.tests-fix-two-test-case-to-also-depend-on-DC_BIG.patch +++ /dev/null @@ -1,39 +0,0 @@ -From a4e03fbb4d82f91069d96005405f89c45b8fd157 Mon Sep 17 00:00:00 2001 -From: Chen Qi <Qi.Chen@windriver.com> -Date: Wed, 17 Apr 2019 09:24:37 +0800 -Subject: [PATCH] dc.tests: fix two test case to also depend on DC_BIG - -Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2019-April/087205.html] - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - testsuite/dc.tests | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/testsuite/dc.tests b/testsuite/dc.tests -index 1708a48..8c3af41 100755 ---- a/testsuite/dc.tests -+++ b/testsuite/dc.tests -@@ -41,6 +41,9 @@ testing "dc complex without spaces (multiple args)" \ - "16\n" \ - "" "" - -+optional FEATURE_DC_BIG -+# All tests below depend on FEATURE_DC_BIG -+ - testing "dc read" \ - "dc -finput" \ - "2\n9\n1\n" \ -@@ -51,9 +54,6 @@ testing "dc read string" \ - "2\nstr\n1\n" \ - "1?2\nf" "[str]\n" - --optional FEATURE_DC_BIG --# All tests below depend on FEATURE_DC_BIG -- - testing "dc '>a' (conditional execute string) 1" \ - "dc" \ - "1\n9\n" \ --- -2.7.4 - diff --git a/poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch b/poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch index 76daaf1f0..2a0a40c51 100644 --- a/poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch +++ b/poky/meta/recipes-core/busybox/busybox/busybox-udhcpc-no_deconfig.patch @@ -31,10 +31,10 @@ Signed-off-by: Andreas Oberritter <obi@opendreambox.org> networking/udhcp/dhcpc.c | 29 ++++++++++++++++------ 1 file changed, 21 insertions(+), 8 deletions(-) -Index: busybox-1.29.1/networking/udhcp/dhcpc.c +Index: busybox-1.31.0/networking/udhcp/dhcpc.c =================================================================== ---- busybox-1.29.1.orig/networking/udhcp/dhcpc.c -+++ busybox-1.29.1/networking/udhcp/dhcpc.c +--- busybox-1.31.0.orig/networking/udhcp/dhcpc.c ++++ busybox-1.31.0/networking/udhcp/dhcpc.c @@ -48,6 +48,8 @@ }; #endif @@ -42,21 +42,21 @@ Index: busybox-1.29.1/networking/udhcp/dhcpc.c +/* option whether to down the interface when reconfiguring */ +static int allow_deconfig = 1; - /* "struct client_config_t client_config" is in bb_common_bufsiz1 */ + /* "struct client_data_t client_data" is in bb_common_bufsiz1 */ -@@ -103,8 +105,9 @@ +@@ -103,8 +105,10 @@ OPT_x = 1 << 18, OPT_f = 1 << 19, OPT_B = 1 << 20, + OPT_D = 1 << 21, /* The rest has variable bit positions, need to be clever */ -- OPTBIT_B = 20, + OPTBIT_B = 20, + OPTBIT_D = 21, USE_FOR_MMU( OPTBIT_b,) IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,) IF_FEATURE_UDHCP_PORT( OPTBIT_P,) -@@ -1116,7 +1119,8 @@ - state = RENEW_REQUESTED; +@@ -1124,7 +1128,8 @@ + client_data.state = RENEW_REQUESTED; break; case RENEW_REQUESTED: /* impatient are we? fine, square 1 */ - udhcp_run_script(NULL, "deconfig"); @@ -65,7 +65,7 @@ Index: busybox-1.29.1/networking/udhcp/dhcpc.c case REQUESTING: case RELEASED: change_listen_mode(LISTEN_RAW); -@@ -1152,7 +1156,8 @@ +@@ -1160,7 +1165,8 @@ * Users requested to be notified in all cases, even if not in one * of the states above. */ @@ -74,8 +74,8 @@ Index: busybox-1.29.1/networking/udhcp/dhcpc.c + udhcp_run_script(NULL, "deconfig"); change_listen_mode(LISTEN_NONE); - state = RELEASED; -@@ -1265,7 +1270,7 @@ + client_data.state = RELEASED; +@@ -1278,7 +1284,7 @@ /* Parse command line */ opt = getopt32long(argv, "^" /* O,x: list; -T,-t,-A take numeric param */ @@ -84,7 +84,7 @@ Index: busybox-1.29.1/networking/udhcp/dhcpc.c USE_FOR_MMU("b") IF_FEATURE_UDHCPC_ARPING("a::") IF_FEATURE_UDHCP_PORT("P:") -@@ -1376,6 +1381,10 @@ +@@ -1389,6 +1395,10 @@ logmode |= LOGMODE_SYSLOG; } @@ -92,52 +92,52 @@ Index: busybox-1.29.1/networking/udhcp/dhcpc.c + allow_deconfig = 0; + } + - /* Make sure fd 0,1,2 are open */ - bb_sanitize_stdio(); /* Create pidfile */ -@@ -1388,7 +1397,8 @@ + write_pidfile(client_data.pidfile); + /* Goes to stdout (unless NOMMU) and possibly syslog */ +@@ -1397,7 +1407,8 @@ srand(monotonic_us()); - state = INIT_SELECTING; + client_data.state = INIT_SELECTING; - udhcp_run_script(NULL, "deconfig"); + if (allow_deconfig) + udhcp_run_script(NULL, "deconfig"); change_listen_mode(LISTEN_RAW); packet_num = 0; timeout = 0; -@@ -1555,7 +1565,8 @@ +@@ -1570,7 +1581,8 @@ } /* Timed out, enter init state */ - bb_error_msg("lease lost, entering init state"); + bb_info_msg("lease lost, entering init state"); - udhcp_run_script(NULL, "deconfig"); + if (allow_deconfig) + udhcp_run_script(NULL, "deconfig"); - state = INIT_SELECTING; - client_config.first_secs = 0; /* make secs field count from 0 */ + client_data.state = INIT_SELECTING; + client_data.first_secs = 0; /* make secs field count from 0 */ /*timeout = 0; - already is */ -@@ -1748,8 +1759,10 @@ +@@ -1762,8 +1774,10 @@ "(got ARP reply), declining"); send_decline(/*xid,*/ server_addr, packet.yiaddr); -- if (state != REQUESTING) +- if (client_data.state != REQUESTING) - udhcp_run_script(NULL, "deconfig"); -+ if (state != REQUESTING) { ++ if (client_data.state != REQUESTING) { + if (allow_deconfig) + udhcp_run_script(NULL, "deconfig"); + } change_listen_mode(LISTEN_RAW); - state = INIT_SELECTING; - client_config.first_secs = 0; /* make secs field count from 0 */ -@@ -1818,8 +1831,10 @@ + client_data.state = INIT_SELECTING; + client_data.first_secs = 0; /* make secs field count from 0 */ +@@ -1832,8 +1846,10 @@ /* return to init state */ - bb_error_msg("received %s", "DHCP NAK"); + bb_info_msg("received %s", "DHCP NAK"); udhcp_run_script(&packet, "nak"); -- if (state != REQUESTING) +- if (client_data.state != REQUESTING) - udhcp_run_script(NULL, "deconfig"); -+ if (state != REQUESTING) { ++ if (client_data.state != REQUESTING) { + if (allow_deconfig) + udhcp_run_script(NULL, "deconfig"); + } change_listen_mode(LISTEN_RAW); sleep(3); /* avoid excessive network traffic */ - state = INIT_SELECTING; + client_data.state = INIT_SELECTING; diff --git a/poky/meta/recipes-core/busybox/busybox/unicode.cfg b/poky/meta/recipes-core/busybox/busybox/unicode.cfg new file mode 100644 index 000000000..ecb5a64f2 --- /dev/null +++ b/poky/meta/recipes-core/busybox/busybox/unicode.cfg @@ -0,0 +1,10 @@ +CONFIG_UNICODE_SUPPORT=y +# CONFIG_UNICODE_USING_LOCALE is not set +CONFIG_FEATURE_CHECK_UNICODE_IN_ENV=y +CONFIG_SUBST_WCHAR=63 +CONFIG_LAST_SUPPORTED_WCHAR=767 +CONFIG_UNICODE_COMBINING_WCHARS=y +CONFIG_UNICODE_WIDE_WCHARS=y +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set diff --git a/poky/meta/recipes-core/busybox/busybox_1.30.1.bb b/poky/meta/recipes-core/busybox/busybox_1.31.0.bb index ba76755d7..34b1f2cc9 100644 --- a/poky/meta/recipes-core/busybox/busybox_1.30.1.bb +++ b/poky/meta/recipes-core/busybox/busybox_1.31.0.bb @@ -9,7 +9,6 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://default.script \ file://simple.script \ file://hwclock.sh \ - file://mount.busybox \ file://syslog \ file://syslog-startup.conf \ file://syslog.conf \ @@ -17,7 +16,6 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://mdev \ file://mdev.conf \ file://mdev-mount.sh \ - file://umount.busybox \ file://defconfig \ file://busybox-syslog.service.in \ file://busybox-klogd.service.in \ @@ -37,16 +35,15 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]} \ ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager') == 'busybox-mdev')]} \ file://syslog.cfg \ - file://inittab \ + file://unicode.cfg \ file://rcS \ file://rcK \ file://makefile-libbb-race.patch \ file://0001-testsuite-check-uudecode-before-using-it.patch \ file://0001-testsuite-use-www.example.org-for-wget-test-cases.patch \ file://0001-du-l-works-fix-to-use-145-instead-of-144.patch \ - file://0001-dc.tests-fix-two-test-case-to-also-depend-on-DC_BIG.patch \ " SRC_URI_append_libc-musl = " file://musl.cfg " -SRC_URI[tarball.md5sum] = "4f72fc6abd736d5f4741fc4a2485547a" -SRC_URI[tarball.sha256sum] = "3d1d04a4dbd34048f4794815a5c48ebb9eb53c5277e09ffffc060323b95dfbdc" +SRC_URI[tarball.md5sum] = "cdba5d4458f944ceec5cdcf7c4914b69" +SRC_URI[tarball.sha256sum] = "0e4925392fd9f3743cc517e031b68b012b24a63b0cf6c1ff03cce7bb3846cc99" diff --git a/poky/meta/recipes-core/busybox/files/mount.busybox b/poky/meta/recipes-core/busybox/files/mount.busybox deleted file mode 100755 index fef945b7b..000000000 --- a/poky/meta/recipes-core/busybox/files/mount.busybox +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec /bin/busybox mount $@ diff --git a/poky/meta/recipes-core/busybox/files/syslog b/poky/meta/recipes-core/busybox/files/syslog index 89c4d12e9..2208613e8 100644 --- a/poky/meta/recipes-core/busybox/files/syslog +++ b/poky/meta/recipes-core/busybox/files/syslog @@ -51,6 +51,22 @@ else SYSLOG_ARGS="-C" fi +waitpid () +{ + pid=$1 + # Give pid a chance to exit before we restart with a 5s timeout in 1s intervals + if [ -z "$pid" ]; then + return + fi + timeout=5; + while [ $timeout -gt 0 ] + do + timeout=$(( $timeout-1 )) + kill -0 $pid 2> /dev/null || break + sleep 1 + done +} + case "$1" in start) echo -n "Starting syslogd/klogd: " @@ -65,7 +81,11 @@ case "$1" in echo "done" ;; restart) - $0 stop + pid1=`pidof syslogd` + pid2=`pidof klogd` + $0 stop + waitpid $pid1 + waitpid $pid2 $0 start ;; *) diff --git a/poky/meta/recipes-core/busybox/files/umount.busybox b/poky/meta/recipes-core/busybox/files/umount.busybox deleted file mode 100755 index f3731626e..000000000 --- a/poky/meta/recipes-core/busybox/files/umount.busybox +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec /bin/busybox umount $@ |