summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/sysvinit
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2015-11-24 13:33:02 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-01 21:31:02 +0000
commitb93369a7943949f51057e0a704f5524ab7682fe6 (patch)
treed81af49fe573aa521331e4f5a111b0c6913ef9ad /meta/recipes-core/sysvinit
parent2b6a6cad90bfef3afd5a721ec985f71336914fa7 (diff)
downloadopenembedded-core-contrib-b93369a7943949f51057e0a704f5524ab7682fe6.tar.gz
openembedded-core-contrib-b93369a7943949f51057e0a704f5524ab7682fe6.tar.bz2
openembedded-core-contrib-b93369a7943949f51057e0a704f5524ab7682fe6.zip
sysvinit-inittab: Add wrapper script to verify console exists
Add a wrapper script around getty to check if a given console exists, this allows for multiple Console ttys to be specified for various boards without having additional BSP types just for different console types. [YOCTO #8689] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/sysvinit')
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab/start_getty5
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb11
2 files changed, 12 insertions, 4 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
new file mode 100644
index 0000000000..6eaeb7a2b0
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
@@ -0,0 +1,5 @@
+#!/bin/sh
+if [ -c /dev/$2 ]
+then
+ /sbin/getty -L $1 $2
+fi
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index 49b1326a26..f539da8dda 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -4,7 +4,8 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=80
PR = "r10"
-SRC_URI = "file://inittab"
+SRC_URI = "file://inittab \
+ file://start_getty"
S = "${WORKDIR}"
@@ -15,8 +16,10 @@ do_compile() {
}
do_install() {
- install -d ${D}${sysconfdir}
+ install -d ${D}${sysconfdir}
+ install -d ${D}${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
+ install -m 0755 ${WORKDIR}/start_getty ${D}${sysconfdir}/init.d/start_getty
set -x
tmp="${SERIAL_CONSOLES}"
@@ -24,7 +27,7 @@ do_install() {
do
j=`echo ${i} | sed s/\;/\ /g`
label=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`
- echo "$label:12345:respawn:${base_sbindir}/getty -L ${j}" >> ${D}${sysconfdir}/inittab
+ echo "$label:12345:respawn:${sysconfdir}/init.d/start_getty ${j}" >> ${D}${sysconfdir}/inittab
done
if [ "${USE_VT}" = "1" ]; then
@@ -73,7 +76,7 @@ fi
# Set PACKAGE_ARCH appropriately.
PACKAGE_ARCH = "${MACHINE_ARCH}"
-FILES_${PN} = "${sysconfdir}/inittab"
+FILES_${PN} = "${sysconfdir}/inittab ${sysconfdir}/init.d/start_getty"
CONFFILES_${PN} = "${sysconfdir}/inittab"
USE_VT ?= "1"