Subject: Re: SUPPORT_SERIAL=?
To: None <port-i386@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: port-i386
Date: 06/19/2000 21:55:30
[ On Thursday, March 2, 2000 at 13:26:49 (+0100), Matthias Drochner wrote: ]
> Subject: Re: SUPPORT_SERIAL=? 
>
> itojun@iijlab.net said:
> > 	Do people dislike it very much if I add -DSUPPORT_SERIAL=CONSDEV_AUTO
> > 	and friends into default compilation of
> > 	src/sys/arch/i386/stand/biosboot/Makefile? 
> 
> I don't think it's a good idea. That's why biosboot_com0 is there.
> 
> > Does it do something harmful?
> 
> It can pick a serial console in the wrong moment. Eg, if
> you have a serial mouse connected.

That's because it uses completely upside-down and inside-out logic.  The
correct test is not to see if there's a serial port connected (quite the
contrary since there might not actually be anything connected at boot
time, or if it is it might not be powered up or whatever), but rather to
test if a PC keyboard is connected.  For the most part it seems almost
all Suns have been using the lack of a keyboard to default back to the
serial console (even if the EEPROM says to use the keyboard) and there
have been far fewer problems with this scheme.

Now I realize this isn't getting any easier to do with USB connected
keyboards and such, but are not the BIOS' of such machines capable of
using USB-connected keyboards able to provide this information reliably?

In fact if a reliable test (either direct hardware based like the one in
FreeBSD is/was, or based on probing the BIOS for its keyboard test
results if possible) can be implemented then I would still argue that
this be the primary default scheme for console selection on PCs.

> The existance of different biosboot* versions is kind of a workaround
> for the lack of non-volatile storage on PCs.

Is this still true on modern, particularly server-class, machines?

On the other hand it shouldn't be too hard to use disk storage for this
purpose.  Doesn't almost every install reserve as many as 64 sectors
before the start of the first partition, only one of which is used for
the MBR?  I realize this isn't a hard enforced convention, but it
shouldn't be too hard to reserve a single bit flag in the master boot
program to make this determination at runtime.....

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>