diff options
| author | Khem Raj <raj.khem@gmail.com> | 2020-09-01 21:49:20 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2020-09-02 08:50:02 -0700 |
| commit | 5482c60353ea2e4bfac55f8b2266f43b56fbbe48 (patch) | |
| tree | e1cff8e0baa3e78f7c69f21bc58d519c9a57cf70 | |
| parent | 759342c9cc62050ca109b649607966e19e55ff28 (diff) | |
| download | meta-openembedded-5482c60353ea2e4bfac55f8b2266f43b56fbbe48.tar.gz | |
toybox: Add packageconfigs for iconv and getconf
iconv and getconf are also provided by glibc-utils which is built along
with glibc and update-alternatives don't work with special packages like
glibc since it causes cyclic dependencies e.g
glibc->opkg-utils->glibc
therefore creating u-a for iconv and getconf gets into trouble when
glibc-utils is added to image along with toybox, usually with ptest
enabled images by default.
Therefore we turn these two applets into packageconfigs and delete them
by default from u-a, if one want toybox to provide them then clear
no-iconv and no-getconf from PACKAGECONFIG via a bbappend e.g.
PACKAGECONFIG_remove = "no-getconf no-iconv"
Remove bashism by enquiring for VIRTUAL-RUNTIME_init_manager from
bitbake datastore
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-core/toybox/toybox_0.8.3.bb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/meta-oe/recipes-core/toybox/toybox_0.8.3.bb b/meta-oe/recipes-core/toybox/toybox_0.8.3.bb index 5d453219f2..1513255c46 100644 --- a/meta-oe/recipes-core/toybox/toybox_0.8.3.bb +++ b/meta-oe/recipes-core/toybox/toybox_0.8.3.bb | |||
| @@ -29,6 +29,11 @@ CFLAGS += "${TOOLCHAIN_OPTIONS} ${TUNE_CCARGS}" | |||
| 29 | COMPILER_toolchain-clang = "clang" | 29 | COMPILER_toolchain-clang = "clang" |
| 30 | COMPILER ?= "gcc" | 30 | COMPILER ?= "gcc" |
| 31 | 31 | ||
| 32 | PACKAGECONFIG ??= "no-iconv no-getconf" | ||
| 33 | |||
| 34 | PACKAGECONFIG[no-iconv] = ",," | ||
| 35 | PACKAGECONFIG[no-getconf] = ",," | ||
| 36 | |||
| 32 | EXTRA_OEMAKE = 'CROSS_COMPILE="${HOST_PREFIX}" \ | 37 | EXTRA_OEMAKE = 'CROSS_COMPILE="${HOST_PREFIX}" \ |
| 33 | CC="${COMPILER}" \ | 38 | CC="${COMPILER}" \ |
| 34 | STRIP="strip" \ | 39 | STRIP="strip" \ |
| @@ -56,7 +61,7 @@ do_configure() { | |||
| 56 | sed -e 's/CONFIG_SWAPON=y/# CONFIG_SWAPON is not set/' -i .config | 61 | sed -e 's/CONFIG_SWAPON=y/# CONFIG_SWAPON is not set/' -i .config |
| 57 | 62 | ||
| 58 | # Enable init if toybox was set as init manager | 63 | # Enable init if toybox was set as init manager |
| 59 | if [[ ${VIRTUAL-RUNTIME_init_manager} == *"toybox"* ]]; then | 64 | if ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','toybox','true','false',d)}; then |
| 60 | sed -e 's/# CONFIG_INIT is not set/CONFIG_INIT=y/' -i .config | 65 | sed -e 's/# CONFIG_INIT is not set/CONFIG_INIT=y/' -i .config |
| 61 | fi | 66 | fi |
| 62 | } | 67 | } |
| @@ -67,6 +72,12 @@ do_compile() { | |||
| 67 | # Create a list of links needed | 72 | # Create a list of links needed |
| 68 | ${BUILD_CC} -I . scripts/install.c -o generated/instlist | 73 | ${BUILD_CC} -I . scripts/install.c -o generated/instlist |
| 69 | ./generated/instlist long | sed -e 's#^#/#' > toybox.links | 74 | ./generated/instlist long | sed -e 's#^#/#' > toybox.links |
| 75 | if ${@bb.utils.contains('PACKAGECONFIG','no-iconv','true','false',d)}; then | ||
| 76 | sed -i -e '/iconv$/d' toybox.links | ||
| 77 | fi | ||
| 78 | if ${@bb.utils.contains('PACKAGECONFIG','no-getconf','true','false',d)}; then | ||
| 79 | sed -i -e '/getconf$/d' toybox.links | ||
| 80 | fi | ||
| 70 | } | 81 | } |
| 71 | 82 | ||
| 72 | do_install() { | 83 | do_install() { |
