diff options
author | Matthew McClintock <msm@freescale.com> | 2012-07-11 18:15:27 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-17 10:53:56 +0100 |
commit | 5e7d4ca3f34ef2eded0605327feed1f4611fe232 (patch) | |
tree | ee0a40c8ac57e985fc28c0e4ce7bd6ee27a72c8b | |
parent | 9e5bce826abe2e50dd7395c2b26d84fe0edaf45c (diff) | |
download | poky-5e7d4ca3f34ef2eded0605327feed1f4611fe232.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: eecd65f188ba2c924626b7e1bf5c8e2eb51e9b59)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb | 22 |
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 9bd087cbcb..1089edbcb4 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" | |||
2 | LICENSE = "GPLv2" | 2 | LICENSE = "GPLv2" |
3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" | 3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" |
4 | 4 | ||
5 | PR = "r6" | 5 | PR = "r7" |
6 | 6 | ||
7 | SRC_URI = "file://inittab" | 7 | SRC_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 | ||
55 | pkg_postinst_${PN} () { | ||
56 | # run this on the target | ||
57 | if [ "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 | ||
67 | else | ||
68 | exit 1 | ||
69 | fi | ||
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. |
56 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 74 | PACKAGE_ARCH = "${MACHINE_ARCH}" |