diff options
| author | Denys Dmytriyenko <denys@ti.com> | 2018-03-04 17:58:12 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-19 15:56:16 +0000 |
| commit | 95ecae14a8867bdbb45b7c9d8b3b66d20f4a4672 (patch) | |
| tree | cf1c40c11cca023f7318e8356cd1812381ac62da | |
| parent | 22ce3c120613660feadd30ea1fcc0758f82e8252 (diff) | |
| download | poky-95ecae14a8867bdbb45b7c9d8b3b66d20f4a4672.tar.gz | |
busybox: separate inittab into own package, due to SERIAL_CONSOLES being machine-specific
* Create busybox-inittab recipe to produce machine-specific package with /etc/inittab
and necessary getty calls for a machine, based on SERIAL_CONSOLES, similar to how
sysvinit-inittab was done
* Since CONFIG_FEATURE_USE_INITTAB is controlled by VIRTUAL-RUNTIME_init_manager, make
main busybox package RDEPENDS on busybox-inittab when init_manager is set to busybox
(From OE-Core rev: afb09abd2f0f7555ba156260a87fd3867f591310)
(From OE-Core rev: b96bc3d6e575dab3a39634f5b22a199c4f9fc892)
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/busybox/busybox-inittab_1.24.1.bb | 32 | ||||
| -rw-r--r-- | meta/recipes-core/busybox/busybox.inc | 12 |
2 files changed, 34 insertions, 10 deletions
diff --git a/meta/recipes-core/busybox/busybox-inittab_1.24.1.bb b/meta/recipes-core/busybox/busybox-inittab_1.24.1.bb new file mode 100644 index 0000000000..a83620e859 --- /dev/null +++ b/meta/recipes-core/busybox/busybox-inittab_1.24.1.bb | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | SUMMARY = "inittab configuration for BusyBox" | ||
| 2 | LICENSE = "GPLv2" | ||
| 3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" | ||
| 4 | |||
| 5 | SRC_URI = "file://inittab" | ||
| 6 | |||
| 7 | S = "${WORKDIR}" | ||
| 8 | |||
| 9 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 10 | |||
| 11 | do_compile() { | ||
| 12 | : | ||
| 13 | } | ||
| 14 | |||
| 15 | do_install() { | ||
| 16 | install -d ${D}${sysconfdir} | ||
| 17 | install -D -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab | ||
| 18 | tmp="${SERIAL_CONSOLES}" | ||
| 19 | for i in $tmp | ||
| 20 | do | ||
| 21 | j=`echo ${i} | sed s/\;/\ /g` | ||
| 22 | id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'` | ||
| 23 | echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab | ||
| 24 | done | ||
| 25 | } | ||
| 26 | |||
| 27 | # SERIAL_CONSOLES is generally defined by the MACHINE .conf. | ||
| 28 | # Set PACKAGE_ARCH appropriately. | ||
| 29 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 30 | |||
| 31 | FILES_${PN} = "${sysconfdir}/inittab" | ||
| 32 | CONFFILES_${PN} = "${sysconfdir}/inittab" | ||
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index 48910ca33a..a6bfd46b67 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc | |||
| @@ -48,6 +48,8 @@ CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" | |||
| 48 | 48 | ||
| 49 | RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" | 49 | RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" |
| 50 | 50 | ||
| 51 | RDEPENDS_${PN} = "${@["", "busybox-inittab"][(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'busybox')]}" | ||
| 52 | |||
| 51 | inherit cml1 systemd update-rc.d ptest | 53 | inherit cml1 systemd update-rc.d ptest |
| 52 | 54 | ||
| 53 | # internal helper | 55 | # internal helper |
| @@ -292,16 +294,6 @@ do_install () { | |||
| 292 | install -D -m 0777 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS | 294 | install -D -m 0777 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS |
| 293 | install -D -m 0777 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK | 295 | install -D -m 0777 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK |
| 294 | install -D -m 0755 ${WORKDIR}/runlevel ${D}${base_sbindir}/runlevel | 296 | install -D -m 0755 ${WORKDIR}/runlevel ${D}${base_sbindir}/runlevel |
| 295 | if grep "CONFIG_FEATURE_USE_INITTAB=y" ${B}/.config; then | ||
| 296 | install -D -m 0777 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab | ||
| 297 | tmp="${SERIAL_CONSOLES}" | ||
| 298 | for i in $tmp | ||
| 299 | do | ||
| 300 | j=`echo ${i} | sed s/\;/\ /g` | ||
| 301 | id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'` | ||
| 302 | echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab | ||
| 303 | done | ||
| 304 | fi | ||
| 305 | fi | 297 | fi |
| 306 | 298 | ||
| 307 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 299 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
