/etc/inittab : not specifying baud rate and tty device
Rob Landley
rob at landley.net
Wed Aug 2 23:27:49 UTC 2006
On Wednesday 02 August 2006 8:56 am, Stuart Hughes wrote:
>
> Like most people I'm booting linux on my embedded boards connected to a
> serial port and using busybox's init.
>
> One thing that is always a bit annoying is having to know the tty device
> and baud rate of the serial port, especially given that it's already
> setup by the kernel. So in the past I've had a variety of entries
> in /etc/inittab for different boards, for example:
>
> ::respawn:/sbin/getty -L ttyS0 115200 vt100
> ::respawn:/sbin/getty -L ttyS0 38400 vt100
> ::respawn:/sbin/getty -L ttyS1 115200 vt100
> ::respawn:/sbin/getty -L ttyCPM0 38400 vt100
>
> The first thing that is not constant is the serial tty device. To make
> this generic I tried 'console' instead, which seems to work. Does this
> sound like a reasonable thing to do?
Sounds reasonable to me. You've already told the kernel where /dev/console
lives, might as well re-use that information.
> Secondly, I'd like to be able not to specify the baud rate, is there a
> way of telling getty to 'just leave it as it is'?
I haven't touched that code yet. It's moderately icky.
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list