summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
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:32:13 +0000
commitccb2a57ad25c98e77f81f8e3bf82e6a1da2d9cd2 (patch)
tree6e27918e99795998ba3676b69a35de26834780ad /meta/recipes-core
parentb7f610d3e98159c40169b518e117fc1776237100 (diff)
downloadpoky-ccb2a57ad25c98e77f81f8e3bf82e6a1da2d9cd2.tar.gz
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] (From OE-Core rev: b93369a7943949f51057e0a704f5524ab7682fe6) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-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 @@
1#!/bin/sh
2if [ -c /dev/$2 ]
3then
4 /sbin/getty -L $1 $2
5fi
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
4 4
5PR = "r10" 5PR = "r10"
6 6
7SRC_URI = "file://inittab" 7SRC_URI = "file://inittab \
8 file://start_getty"
8 9
9S = "${WORKDIR}" 10S = "${WORKDIR}"
10 11
@@ -15,8 +16,10 @@ do_compile() {
15} 16}
16 17
17do_install() { 18do_install() {
18 install -d ${D}${sysconfdir} 19 install -d ${D}${sysconfdir}
20 install -d ${D}${sysconfdir}/init.d
19 install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab 21 install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
22 install -m 0755 ${WORKDIR}/start_getty ${D}${sysconfdir}/init.d/start_getty
20 23
21 set -x 24 set -x
22 tmp="${SERIAL_CONSOLES}" 25 tmp="${SERIAL_CONSOLES}"
@@ -24,7 +27,7 @@ do_install() {
24 do 27 do
25 j=`echo ${i} | sed s/\;/\ /g` 28 j=`echo ${i} | sed s/\;/\ /g`
26 label=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'` 29 label=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`
27 echo "$label:12345:respawn:${base_sbindir}/getty -L ${j}" >> ${D}${sysconfdir}/inittab 30 echo "$label:12345:respawn:${sysconfdir}/init.d/start_getty ${j}" >> ${D}${sysconfdir}/inittab
28 done 31 done
29 32
30 if [ "${USE_VT}" = "1" ]; then 33 if [ "${USE_VT}" = "1" ]; then
@@ -73,7 +76,7 @@ fi
73# Set PACKAGE_ARCH appropriately. 76# Set PACKAGE_ARCH appropriately.
74PACKAGE_ARCH = "${MACHINE_ARCH}" 77PACKAGE_ARCH = "${MACHINE_ARCH}"
75 78
76FILES_${PN} = "${sysconfdir}/inittab" 79FILES_${PN} = "${sysconfdir}/inittab ${sysconfdir}/init.d/start_getty"
77CONFFILES_${PN} = "${sysconfdir}/inittab" 80CONFFILES_${PN} = "${sysconfdir}/inittab"
78 81
79USE_VT ?= "1" 82USE_VT ?= "1"