Loader serial baud rate control
jhb at FreeBSD.org
Tue Aug 16 17:50:40 GMT 2005
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:
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the freebsd-current