Patchwork Introduce new SERIAL_CONSOLES to add multiple consoles for your MACHINE

login
register
mail settings
Submitter Matthew McClintock
Date Nov. 4, 2011, 9:07 p.m.
Message ID <1320440872-28420-1-git-send-email-msm@freescale.com>
Download mbox | patch
Permalink /patch/14313/
State Accepted
Commit a61b5e980d45df4dc2c83dd13996b0563fddf803
Headers show

Comments

Matthew McClintock - Nov. 4, 2011, 9:07 p.m.
Just define additional serial consoles like so:

SERIAL_CONSOLES="115200;ttyS0 115200;ttyS1 ... 115200;ttySN"

Also be sure to remove SERIAL_CONSOLE (lacking the S) from your
machine as they can conflict.

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
 .../sysvinit/sysvinit-inittab_2.88dsf.bb           |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
Phil Blundell - Nov. 4, 2011, 9:15 p.m.
On Fri, 2011-11-04 at 16:07 -0500, Matthew McClintock wrote:
> +    idx=0
> +    tmp="${SERIAL_CONSOLES}"
> +    for i in $tmp
> +    do
> +	j=`echo ${i} | sed s/\;/\ /g`
> +        echo "${idx}:2345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
> +	idx=`expr $idx + 1`
> +    done
> +
>      if [ "${USE_VT}" = "1" ]; then
>          cat <<EOF >>${D}${sysconfdir}/inittab
>  # ${base_sbindir}/getty invocations for the runlevels.

That looks like it will lose if ${SERIAL_CONSOLES} is not defined at
all.

p.

Patch

diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index ba60c74..3a716d7 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -25,6 +25,16 @@  do_install() {
     if [ ! -z "${SERIAL_CONSOLE}" ]; then
         echo "S:2345:respawn:${base_sbindir}/getty ${SERIAL_CONSOLE}" >> ${D}${sysconfdir}/inittab
     fi
+
+    idx=0
+    tmp="${SERIAL_CONSOLES}"
+    for i in $tmp
+    do
+	j=`echo ${i} | sed s/\;/\ /g`
+        echo "${idx}:2345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
+	idx=`expr $idx + 1`
+    done
+
     if [ "${USE_VT}" = "1" ]; then
         cat <<EOF >>${D}${sysconfdir}/inittab
 # ${base_sbindir}/getty invocations for the runlevels.