All of lore.kernel.org
 help / color / mirror / Atom feed
From: grinberg@compulab.co.il (Igor Grinberg)
To: linux-arm-kernel@lists.infradead.org
Subject: serial tty name
Date: Wed, 14 Dec 2011 17:10:10 +0200	[thread overview]
Message-ID: <4EE8BC52.5060905@compulab.co.il> (raw)
In-Reply-To: <20111214144344.GA2090@richard-laptop>

Hi Richard,

On 12/14/11 16:43, Richard Zhao wrote:
> How to map different uart port to ttymxc0 (take imx for example)?
> 
> In rootfs, it usually "getty ttymxc0"  to get
> serial console. And the rootfs may be shared by different boards.
> Traditionaly way is to set right platform device ID.
> 
> But with DT, UART2 always generate ttymxc1, UART3 for ttymxc2. You
> always needs to modify the getty command when your change another board.
> 
> Is there a way to fix it?

As for fix in userspace, you can spawn getty on every ttymxc*,
so you will get it always.

Another (userspace) fix would be:
Instead of getty, add a script (say getty.sh) which will do something like:
-----------
CONSOLE=`cat /proc/cmdline | tr " " "\n" | grep console= | tr "=" " " | tr "," " "`
TTY=`echo $CONSOLE | cut -d' ' -f 2`
SPEED=`echo $CONSOLE | cut -d' ' -f 3`

/sbin/getty -L $TTY $SPEED vt100
--------------

I use the above, because I have not just multiple boards,
but multiple platforms each with its own tty name...

-- 
Regards,
Igor.

  reply	other threads:[~2011-12-14 15:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 14:43 serial tty name Richard Zhao
2011-12-14 15:10 ` Igor Grinberg [this message]
2011-12-14 18:33   ` Uwe Kleine-König
2011-12-15  0:44     ` Richard Zhao
2011-12-14 15:31 ` Rob Herring
2011-12-15  0:31   ` Richard Zhao
2011-12-19  4:08   ` Shawn Guo
2011-12-19  4:49     ` Jason Liu
2011-12-19  5:41       ` Richard Zhao
2011-12-19  3:56 ` Shawn Guo
2011-12-19  5:40   ` Richard Zhao
2011-12-19  6:05     ` Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EE8BC52.5060905@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.