summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorMatthew McClintock <msm@freescale.com>2012-07-11 23:15:27 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-21 10:16:41 (GMT)
commit3cf5fc2272acddc61f05f01cc4799c3b2f9866c5 (patch)
treece5543b5d64af014789b60b8e5b97f3e1c939fcd /meta/recipes-core
parentffd554d2ff3324ba10c3eb66a3d7acdd4d6aa235 (diff)
downloadpoky-3cf5fc2272acddc61f05f01cc4799c3b2f9866c5.tar.gz
sysvinit-inittab_2.88dsf.bb: Allow multiple serial port consoles to be defined
Set SERIAL_CONSOLES if you want to define multiple serial consoles, also if you need to check for the presence of the serial consoles you can also define SERIAL_CONSOLES_CHECK to determine if these are present when you boot. This will prevent error message that pop up when the serial port is not present. SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyEHV0" SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" The above lines in machine.conf or elsewhere will have the effect of having two serial consoles and removing any that are not present at boot (From OE-Core rev: 2e7dddfce4a40a56f671116a2001b13c57667c70) Signed-off-by: Saul Wold <sgw@linux.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_2.88dsf.bb22
1 files changed, 20 insertions, 2 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index 9bd087c..1089edb 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Inittab for sysvinit"
2LICENSE = "GPLv2" 2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" 3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
4 4
5PR = "r6" 5PR = "r7"
6 6
7SRC_URI = "file://inittab" 7SRC_URI = "file://inittab"
8 8
@@ -26,7 +26,8 @@ do_install() {
26 for i in $tmp 26 for i in $tmp
27 do 27 do
28 j=`echo ${i} | sed s/\;/\ /g` 28 j=`echo ${i} | sed s/\;/\ /g`
29 echo "${idx}:2345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab 29 echo "${idx}:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
30
30 idx=`expr $idx + 1` 31 idx=`expr $idx + 1`
31 done 32 done
32 33
@@ -51,6 +52,23 @@ EOF
51 fi 52 fi
52} 53}
53 54
55pkg_postinst_${PN} () {
56# run this on the target
57if [ "x$D" == "x" ]; then
58 tmp="${SERIAL_CONSOLES_CHECK}"
59 for i in $tmp
60 do
61 j=`echo ${i} | sed s/^.*\;//g`
62 if [ -z "`cat /proc/consoles | grep ${j}`" ]; then
63 sed -i /^.*${j}$/d /etc/inittab
64 fi
65 done
66 kill -HUP 1
67else
68 exit 1
69fi
70}
71
54# USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf. 72# USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf.
55# Set PACKAGE_ARCH appropriately. 73# Set PACKAGE_ARCH appropriately.
56PACKAGE_ARCH = "${MACHINE_ARCH}" 74PACKAGE_ARCH = "${MACHINE_ARCH}"