Skip to content

Commit

Permalink
meta-oe toybox: enable toybox init when selected as init manager
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
amiartus authored and kraj committed Jun 6, 2020
1 parent 921d9ab commit 690f728
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions meta-oe/recipes-core/toybox/toybox_0.8.3.bb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 690f728

Please sign in to comment.