Re: Loader serial baud rate control

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Tue, 16 Aug 2005 13:44:20 -0400
On Sunday 14 August 2005 12:35 pm, Ian Dowse wrote:
> In message <200508140243.aa50444_at_nowhere.iedowse.com>, Ian Dowse writes:
> >
> >Currently the baud rate used by the i386/amd64 loader for a serial
> >console is hard-coded as 9600 baud and you need to recompile the
> >loader to change it. Below is a patch that adds a "comconsole_speed"
> >loader environment variable so that the speed can be changed from
> >loader.conf or manually from the loader prompt. It doesn't quite
> >do what you want though, since the loader has already printed a
> >number of things by the time it reads loader.conf. Any comments?
> 
> Following a few suggestions, here's a more extensive change that
> allows you to just write "-h -S19200" for example to /boot.config,
> and the setting will propagate to boot2, loader and the kernel.
> The rate can be overridden from the 'boot:' prompt and also via
> the loader "comconsole_speed" variable
> 
> This adds about 50 bytes to the size of boot2, and it required a
> few other boot2 changes to limit the size impact.
> 
> The loader stage now assumes that the baud rate has already been
> set if the previous stage boot loader requested a serial console
> (RB_SERIAL or RB_MULTIPLE). I'm not sure if this is a reasonable
> assumption in all cases?

Very cool!  Since it will work for this case I think it's fine:

/boot/loader.conf:
comconsole_speed=115200
console=comconsole

-- 
John Baldwin <jhb_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Tue Aug 16 2005 - 15:50:40 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:41 UTC