aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2018-03-02 20:46:50 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-04 21:22:57 +0000
commitafb09abd2f0f7555ba156260a87fd3867f591310 (patch)
tree7640c11fe4a2259d1eb91f09167eeb4f03ba1d2d /meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
parentcefd312541019c1bb0132f41334df58971fd81ef (diff)
downloadopenembedded-core-contrib-afb09abd2f0f7555ba156260a87fd3867f591310.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 Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox/busybox-inittab_1.27.2.bb')
-rw-r--r--meta/recipes-core/busybox/busybox-inittab_1.27.2.bb32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb b/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
new file mode 100644
index 0000000000..a83620e859
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-inittab_1.27.2.bb
@@ -0,0 +1,32 @@
+SUMMARY = "inittab configuration for BusyBox"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+SRC_URI = "file://inittab"
+
+S = "${WORKDIR}"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_compile() {
+ :
+}
+
+do_install() {
+ install -d ${D}${sysconfdir}
+ install -D -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
+ tmp="${SERIAL_CONSOLES}"
+ for i in $tmp
+ do
+ j=`echo ${i} | sed s/\;/\ /g`
+ id=`echo ${i} | sed -e 's/^.*;//' -e 's/;.*//'`
+ echo "$id::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
+ done
+}
+
+# SERIAL_CONSOLES is generally defined by the MACHINE .conf.
+# Set PACKAGE_ARCH appropriately.
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+FILES_${PN} = "${sysconfdir}/inittab"
+CONFFILES_${PN} = "${sysconfdir}/inittab"