diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-01-22 20:49:09 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-24 10:55:44 +0000 |
commit | 75cb4fe38fade382450c5f6f35d5dcf55962143e (patch) | |
tree | a4fe1110757c8b5844adc758c32238b8e0250043 /meta/recipes-core/busybox/busybox.inc | |
parent | 7d6a2856cd89b7233aaaf9b12c75cd8ccf73faa9 (diff) | |
download | openembedded-core-75cb4fe38fade382450c5f6f35d5dcf55962143e.tar.gz |
busybox: Add support for busybox-init
in config metadata we can configure busybox based init and device
initializer ( mdev ) using e.g.
VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
VIRTUAL-RUNTIME_login_manager = "busybox"
VIRTUAL-RUNTIME_init_manager = "busybox"
VIRTUAL-RUNTIME_initscripts = "initscripts"
VIRTUAL-RUNTIME_keymaps = "keymaps"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
busybox can be used to provide init system
combined with mdev it makes it a complete init
system for really tiny systems.
This patch uses above defines to configure features in busybox to enable
the init system and mdev in a configurable manner
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox/busybox.inc')
-rw-r--r-- | meta/recipes-core/busybox/busybox.inc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 95411230b9..e5710f05f4 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -275,6 +275,21 @@ do_install () { install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev fi fi + if grep "CONFIG_INIT=y" ${B}/.config; then + install -D -m 0777 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS + install -D -m 0777 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK + install -D -m 0755 ${WORKDIR}/runlevel ${D}${base_sbindir}/runlevel + if grep "CONFIG_FEATURE_USE_INITTAB=y" ${B}/.config; then + install -D -m 0777 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab + tmp="${SERIAL_CONSOLES}" + for i in $tmp + do + j=`echo ${i} | sed s/\;/\ /g` + label=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'` + echo "tty$label::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab + done + fi + fi if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then |