BOOT_CONSOLE(8)

NAME
boot_console - selection of a console device in the i386 bootloader

DESCRIPTION
The i386 bootloader selects a console device for its user interaction and passes information about it to the NetBSD kernel. The selection process is controlled by bootloader compile-time options and system setup at the bootloader startup time.

The compile-time options (to set in the bootloader's “Makefile” ) are:

SUPPORT_SERIAL
enables support for serial input / output. If not set, the standard PC keyboard / display is always used as console device and the following options are meaningless.

DIRECT_SERIAL
causes direct hardware access to be used for serial input / output. With this option, software handshake (XON/XOFF) is used for flow control. Without this option, BIOS functions are employed for serial port handling, which require hardware handshake lines to be completely wired.

CONSPEED=integer
sets the baudrate for the serial console. This option has only an effect together with the “DIRECT_SERIAL” option above. Otherwise, the default setting of 9600 baud is used.

COMCONS_KEYPRESS
If console autoselection is used (see below), require a character input within 1 second after a space character is sent to the serial line for a serial console device to be selected. If not set, only a simple function check is done (and the hardware handshake is checked if “DIRECT_SERIAL” is not defined).
The actual policy for the console selection is determined by the argument to the console initialization function initio(int) which is called early in the bootloader's main() function. The following are available:

CONSDEV_PC
Use the standard PC keyboard / display as console.

CONSDEV_COM0 ... CONSDEV_COM3
Use the serial port with the corresponding BIOS number as console. If the port is not known to the BIOS, it falls back to “CONSDEV_PC” . (Note1: This feature can be deliberately used for console selection if the BIOS allows to disable serial ports.) (Note2: This works with the “DIRECT_SERIAL” option too.)

CONSDEV_AUTO
Auto-select the console. First the serial ports known to the BIOS are probed. If output of a (space) character to the port succeeds, and the conditions described under “COMCONS_KEYPRESS” above are fulfilled, the port is used as console. If no serial port passes the check, “CONSDEV_PC” is used. The progress of the selection process is shown at the PC display as digits corresponding to the serial port number currently probed.

FILES

/src/sys/arch/i386/stand/{bios,dos,net}boot/Makefile

/src/sys/arch/i386/stand/{bios,dos,net}boot/main.c

SEE ALSO
console(4)

BUGS
There is generally no non-volatile storage available on the PC platform. This requires autoselection methods which can be inconvinient and / or unstable in some situations. The selection policy should be adapted to the local hardware configuration, which might require code changes.

The serial communication parameters (bytesize, parity, stopbits) are not setable. In any case, “8N1” is used.