Subject: Re: serial console HOWTO?
To: David Maxwell <david@fundy.ca>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-i386
Date: 01/18/2000 17:45:46
In message <20000118210856.F21588@fundy.ca>, David Maxwell writes:
>On Tue, Jan 18, 2000 at 02:50:17PM -0800, Jonathan Stone wrote:
>> But even so, and after pulling the keyboard and mouse, I cant get the
>> kernel to use the serial port for console output (e.g,. to print
>> boot-time autoconfiguration messages).
>
>Serial bootblocks are needed if you want to be able to select a kernel,
>or boot options (-s) via serial.

That turns out not to be the case. Recent Intel server motherboards
can redirect BIOS I/O to the serial port. Works fine for bootblocks,
too.

>A kernel with serial console is what you need if you want kernel messages
>and the 'console' device on a serial port. See kernel config options
>here:
>
># This option allows you to force a serial console at the specified
># I/O address.   see console(4) for details.
>#options        "CONSDEVNAME=\"com\"",CONADDR=0x2f8,CONSPEED=57600
>#       you don't want the option below ON iff you are using the
>#       serial console option of the new boot strap code.
>#options        CONS_OVERRIDE   # Always use above! independent of boot info


Okay. I built and installed serial console bootblocks. WHere I come from,
"iff" means "if and only if".  So I dont want CONS_OVERRIDE.

And I am sure I built and installboot'ed biosboot_com0.sym, because the 
vbersion string from the bootblocks changed.

So it looks like the darn bootblocks are not properly passing on the
bt_info to the kernel, which is what both UTLSing and the manpage suggest
should happen.

>You can have a kernel with serial console, without having bootblocks, as
>long as you always boot the same kernel, and don't need to recover from
>problems without a keyboard & video. Or, you can have both. And I guess
>you can have bootblocks without kernel, but I can't think of a good 
>reason for that :-)

Acrually, that's exactly what I want. Put the serial config into the
bootblock, have the bootblock pass it onto the krnel via bootinfo, and
then I can build new kernels, or run GENERIC kernels, and the Right
Things happen. That was my reading of how it was suppoed to wrok.
Did I read wrong?  Or is the code totally out of whack with the
commends and the console(4) manpage?

Or is the biosboot_com0 I built getting horribly confused by the BIOS
redirecting "normal" (VGA/kbd) console to the serial port?

In fact, given the funky "bios-console-redirect" feature, what would
be *realy* cool is to have kernel console output go to both serial
port and the graphics card (if present),a nd to accept input from
either keyboard or serial. That'd be wonderful--that's what the BIOS
does.  I can try and find time in Feburary to code that, if we can
agree on how.