mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-16 04:17:25 +00:00
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>
This commit is contained in:
@@ -29,6 +29,11 @@ CFLAGS += "${TOOLCHAIN_OPTIONS} ${TUNE_CCARGS}"
|
|||||||
COMPILER_toolchain-clang = "clang"
|
COMPILER_toolchain-clang = "clang"
|
||||||
COMPILER ?= "gcc"
|
COMPILER ?= "gcc"
|
||||||
|
|
||||||
|
PACKAGECONFIG ??= "no-iconv no-getconf"
|
||||||
|
|
||||||
|
PACKAGECONFIG[no-iconv] = ",,"
|
||||||
|
PACKAGECONFIG[no-getconf] = ",,"
|
||||||
|
|
||||||
EXTRA_OEMAKE = 'CROSS_COMPILE="${HOST_PREFIX}" \
|
EXTRA_OEMAKE = 'CROSS_COMPILE="${HOST_PREFIX}" \
|
||||||
CC="${COMPILER}" \
|
CC="${COMPILER}" \
|
||||||
STRIP="strip" \
|
STRIP="strip" \
|
||||||
@@ -56,7 +61,7 @@ do_configure() {
|
|||||||
sed -e 's/CONFIG_SWAPON=y/# CONFIG_SWAPON is not set/' -i .config
|
sed -e 's/CONFIG_SWAPON=y/# CONFIG_SWAPON is not set/' -i .config
|
||||||
|
|
||||||
# Enable init if toybox was set as init manager
|
# Enable init if toybox was set as init manager
|
||||||
if [[ ${VIRTUAL-RUNTIME_init_manager} == *"toybox"* ]]; then
|
if ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','toybox','true','false',d)}; then
|
||||||
sed -e 's/# CONFIG_INIT is not set/CONFIG_INIT=y/' -i .config
|
sed -e 's/# CONFIG_INIT is not set/CONFIG_INIT=y/' -i .config
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -67,6 +72,12 @@ do_compile() {
|
|||||||
# Create a list of links needed
|
# Create a list of links needed
|
||||||
${BUILD_CC} -I . scripts/install.c -o generated/instlist
|
${BUILD_CC} -I . scripts/install.c -o generated/instlist
|
||||||
./generated/instlist long | sed -e 's#^#/#' > toybox.links
|
./generated/instlist long | sed -e 's#^#/#' > toybox.links
|
||||||
|
if ${@bb.utils.contains('PACKAGECONFIG','no-iconv','true','false',d)}; then
|
||||||
|
sed -i -e '/iconv$/d' toybox.links
|
||||||
|
fi
|
||||||
|
if ${@bb.utils.contains('PACKAGECONFIG','no-getconf','true','false',d)}; then
|
||||||
|
sed -i -e '/getconf$/d' toybox.links
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
|||||||
Reference in New Issue
Block a user