How to change the default baud rate

There are two factors governing the baud rate of the console.

Firstly, there is the default baud rate which is used from the moment the system boots. This value is defined at compile-time and defaults to a value of 115200 baud.

To change this value you can specify

DEFS   += -DCONSOLE_BAUD=9600

in the Makefile for your particular board. The actual changes are done in the cons.c kernel routine.

Secondly, the console TTY has a baud rate associated with it. This baud rate gets selected as soon as you enter a login name into the login: prompt. If this value differs from the console default baud rate the rate will change and you will not be able to log in unless you then change the baud rate to match.

This value is stored in the file /etc/ttys in the RetroBSD filesystem. It defaults to:

console "/libexec/getty std.115200"     vt100   on secure       #special

Change the “std.115200” part to the baud rate of your choice, such as “std.9600”, so the whole line reads:

console "/libexec/getty std.9600"     vt100   on secure       #special