Hello,
On the 2.4.x kernels, you can indeed register multiple
devices for console (easist done using the "console" boot parameter to
the kernel).
However, for console standard input, the last device registered gets
opened. (so if you use "console=tty0 console=ttyS1,38400" , then ttyS1 is
opened for standard input, but both get output).
I don't recall if this is true for the 2.2.x kernels, though.
George

On Mon, 2 Apr 2001, Jeremy Impson wrote:

> Date: Mon, 02 Apr 2001 16:48:35 -0400 (EDT)
> From: Jeremy Impson <[EMAIL PROTECTED]>
> To: Jay R. Ashworth <[EMAIL PROTECTED]>
> Cc: LinuxEmbeddedMailList <[EMAIL PROTECTED]>
> Subject: Re: Serial Console!!
> 
> On Mon, 2 Apr 2001, Jay R. Ashworth wrote:
> 
> > 
> > Well, if you're skipping init, you're depending on the kernel to get
> > the port right (I assume you're using init=/bin/bash), and I don't know
> > if it's actually that damned smart or not.  You might need to init= a
> > shell script with #!/bin/bash and exec another shell with the
> > appropriate redirects.  This will, *I think*, work on Linux where it
> > might not work on other systems, since #! is handled directly by the
> > exec(2) call, as I understand the thing.
> 
> Good point.  The kernel (in init/main.c:init()) does open "/dev/console"
> and sets it to be stdin and stdout.  Then it execs whatever you've set for
> init (or /bin/sh).
> 
> So if you have your own init, then it should expect to have console as the
> controlling terminal, right?
> 
> > Anyone actually sure on this one, as opposed to my mere speculations?
> 
> So now the question is, when told to use a serial console, does it
> properly map /dev/console to the serial port?  
> 
> [rummages around a 2.2.5 kernel for a moment...]
> 
> drivers/char/serial.c defines a 'struct console sercons' and then calls
> 'register_console(&sercons)'.   register_console() adds it the list of
> registered consoles (console_devices).  (But it might not be the
> "preferred console")
> 
> Looking at drivers/char/tty_io.c:tty_open() suggests yes, /dev/console
> will be properly mapped to the serial port.
> 
> But as I said, if you have multple consoles registered, then the serial
> console may not be preferred.  I can't figure out where you define what
> the preferred console is.  Maybe setting "serial=???" in lilo.conf?
> 
> 
> 
> Jeremy Impson
> Sr. Associate Network Engineer
> Advanced Technologies Department
> Lockheed Martin Systems Integration
> email: [EMAIL PROTECTED]
> phone: 607-751-5618
> fax:   607-751-6025
> 

-- 
George Fouse, President  <[EMAIL PROTECTED]>
Quantum Technology Associates
www.quantumtek.net

--
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the command "unsubscribe linux-embedded" in the message body.
For more information, see <http://waste.org/mail/linux-embedded>.

Reply via email to