From d0ef2f0bf7551383cdb9f9adc3167530d674b22c Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Mon, 21 Sep 2020 17:29:23 -0700 Subject: busybox: add initrd variant Add a busybox variant that inherits almost all of its support from the core busybox recipe, but adds configuration values that are appropriate to be used in an initrd. In particular: - we build busybox statically - we enable runlevel and init functionality - mdev is always enabled - applet install support is enabled Signed-off-by: Bruce Ashfield Signed-off-by: Bruce Ashfield --- recipes-core/busybox/busybox-initrd/initrd.cfg | 14 ++++++++++++++ recipes-core/busybox/busybox-initrd/runx.cfg | 1 + recipes-core/busybox/busybox-initrd_1.32.0.bb | 20 ++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 recipes-core/busybox/busybox-initrd/initrd.cfg create mode 100644 recipes-core/busybox/busybox-initrd/runx.cfg create mode 100644 recipes-core/busybox/busybox-initrd_1.32.0.bb (limited to 'recipes-core') diff --git a/recipes-core/busybox/busybox-initrd/initrd.cfg b/recipes-core/busybox/busybox-initrd/initrd.cfg new file mode 100644 index 00000000..9f64c4c6 --- /dev/null +++ b/recipes-core/busybox/busybox-initrd/initrd.cfg @@ -0,0 +1,14 @@ +CONFIG_INIT=y +CNOFIG_FEATURE_UTMP=y +CONFIG_RUNLEVEL=y +CONFIG_FEATURE_USE_INITTAB=y +CONFIG_HALT=y +CONFIG_POWEROFF=y +CONFIG_FEATURE_KILL_DELAY=0 +CONFIG_TELINIT_PATH="" +CONFIG_INIT_TERMINAL_TYPE="" + +# CONFIG_FEATURE_SHADOWPASSWDS is not set +CONFIG_USE_BB_PWD_GRP=y + +CONFIG_STATIC=y diff --git a/recipes-core/busybox/busybox-initrd/runx.cfg b/recipes-core/busybox/busybox-initrd/runx.cfg new file mode 100644 index 00000000..1f1ac6af --- /dev/null +++ b/recipes-core/busybox/busybox-initrd/runx.cfg @@ -0,0 +1 @@ +CONFIG_FEATURE_INSTALLER=y diff --git a/recipes-core/busybox/busybox-initrd_1.32.0.bb b/recipes-core/busybox/busybox-initrd_1.32.0.bb new file mode 100644 index 00000000..82edb570 --- /dev/null +++ b/recipes-core/busybox/busybox-initrd_1.32.0.bb @@ -0,0 +1,20 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/busybox-initrd:${COREBASE}/meta/recipes-core/busybox/busybox:${COREBASE}/meta/recipes-core/busybox/files:" + +require recipes-core/busybox/busybox_${PV}.bb + +SRC_URI += "file://init.cfg \ + file://mdev.cfg \ + file://runx.cfg \ + file://initrd.cfg" + +S = "${WORKDIR}/busybox-${PV}" + +# override security-flags settings, we have some warnings to ignore +SECURITY_STRINGFORMAT = "" + +# we do this to get the target binary available to recipes that +# depend on busybox +SYSROOT_DIRS += "/bin" +BUSYBOX_SPLIT_SUID = "0" + +FILES_${PN} += "${sysconfdir}/init.d/*" -- cgit v1.2.3-54-g00ecf