aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-core
diff options
context:
space:
mode:
authorAdam Miartus <adam.miartus@softhows.eu>2020-05-28 15:23:43 +0200
committerKhem Raj <raj.khem@gmail.com>2020-06-08 13:58:03 -0700
commitd9a11e5017f3e4727e079324922134dbc670fdc7 (patch)
tree2093d5d22c0dab0cdd81c388c589f519ab4eaf7c /meta-oe/recipes-core
parent50b650bbeff160e236b7e1421052161490e36df6 (diff)
downloadmeta-openembedded-d9a11e5017f3e4727e079324922134dbc670fdc7.tar.gz
meta-oe toybox: enable toybox init when selected as init manager
compile in toybox init binary and rdepend on toybox inittab files Signed-off-by: Adam Miartus <adam.miartus@softhows.eu> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-core')
-rw-r--r--meta-oe/recipes-core/toybox/toybox_0.8.3.bb7
1 files changed, 7 insertions, 0 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 4e72f295d3..5d453219f2 100644
--- a/meta-oe/recipes-core/toybox/toybox_0.8.3.bb
+++ b/meta-oe/recipes-core/toybox/toybox_0.8.3.bb
@@ -15,6 +15,8 @@ SRC_URI[sha256sum] = "eab28fd29d19d4e61ef09704e5871940e6f35fd35a3bb1285e41f20450
SECTION = "base"
+RDEPENDS_${PN} = "${@["", "toybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'toybox')]}"
+
TOYBOX_BIN = "generated/unstripped/toybox"
# Toybox is strict on what CC, CFLAGS and CROSS_COMPILE variables should contain.
@@ -52,6 +54,11 @@ do_configure() {
# Disable swapon as it doesn't handle the '-a' argument used during boot
sed -e 's/CONFIG_SWAPON=y/# CONFIG_SWAPON is not set/' -i .config
+
+ # Enable init if toybox was set as init manager
+ if [[ ${VIRTUAL-RUNTIME_init_manager} == *"toybox"* ]]; then
+ sed -e 's/# CONFIG_INIT is not set/CONFIG_INIT=y/' -i .config
+ fi
}
do_compile() {