Subject: serial console
To: None <port-i386@NetBSD.ORG>
From: None <rvb@sicily.odyssey.cs.cmu.edu>
List: port-i386
Date: 06/06/1998 09:29:58
I've been playing with the serial console for a few days --
it's really neat.   But I have a few suggestions.  The problem
was layed out in mail a few months back.  I would really like
"main" to a initio(CONSDEV_AUTO) to look for any serial line
and fall back to the pc keyboard by default if nothing is 
listening on a serial line.  (This is really important since
I don't want to reload biosboot.sym whenever I take my laptop
home.)  Pumping crud out an IR serial line causes no particular
problem, but (as noted) pumping out crud to a line with a
serial mouse is a show stopper.  So the complete probe of all
serial lines (CONSDEV_AUTO) is not safe.  What I did (and would
like to propose) is make a CONSDEV_AUTO_COM{0,1,2,3}.  This
probes one specific serial line and if nothing is listening
defaults to the pc keyboard.  I think that this is a reasonable
compromise;  I keep a com0boot.sym, com1boot.sym, ... in /usr/mdec
and use the right one.

To make this scheme simple to turn on, I set SERIAL_SUPPORT to
CONSDEV_<foo> in the makefile and have modified main to do a
#ifdef	SERIAL_SUPPORT
	initio(SERIAL_SUPPORT)
#else
	initio(CONSDEV_PC
#endif

A few more minor comments:
On my hardware, the automatic sensing of the line to see if
anyone was listening, under the default and under DIRECT_SERIAL
always found something listening.  So I was forced to turn on
the request for a key stroke handshake.

I found it difficult to see the ' ' prompt character on the
serial line and also to respond in 1 second.  So I changed the
prompt to the three characters :-( and moved the delay to 7 seconds.

I think that the code that interprets PF12 as a request to enter
the debugger needs a !pccons_is_console check.  I don't want
to have PF12 drop into the debugger when I am home with the laptop
and have no serial line.

I can post any of these changes if people find them useful.