#736 Display SeaBIOS Boot Menu Over Serial without Native VGA Init

Open
opened 4 weeks ago by and_who · 0 comments

Apparently serial console support was not added until a few months after the SeaBIOS revision used in release 20160907. As a result the only way to get a serial console is via SGABIOS (Serial Graphics Adapter BIOS) and setting some runtime configuration in CBFS. SeaBIOS' VGA adapter emulation on the serial port (set with runtime config option etc/sercon-port) may be possible for boards with native VGA init but is untested. The following instructions were tested on the KCMA-D8 but should apply to the KGPE-D16 as well.

Instructions for setting up the serial console using SGABIOS are as follows.

Clone the sgabios repo:

$ git clone https://review.coreboot.org/sgabios.git

cd into the directory and examine the sgabios.h file. Specifically, check that the defined serial port IO address and baud rate matches the one for your machine. By default sgabios assumes it is 0x3f8 and 115200, respectively, but you can easily check by examining dmesg(1) output:

$ dmesg | grep -ie ttyS0
[    7.782838] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A

If any changes are necessary, modify the sgabios.h file before building with make all. The only file that's important is sgabios.bin which will be copied to CBFS as a VGA ROM.

$ ./cbfstool yourrom.rom add -f /path/to/sgabios.bin -n vgaroms/sgabios.bin -t optionrom

If you're using a KCMA-D8 or KGPE-D16 remove the VGA ROM already present in the image as it's useless and does nothing (native graphics init does not exist at this time).

$ ./cbfstool yourrom.rom remove -n vgaroms/vgabios.bin

Lastly, add the requisite runtime configuration to display and interact with the boot menu:

$ ./cbfstool yourrom.rom add-int -i 1 -n etc/show-boot-menu
$ ./cbfstool yourrom.rom add-int -i 5000 -n etc/boot-menu-wait
$ ./cbfstool yourrom.rom add-int -i 0 -n etc/screen-and-debug

Pad the image, if necessary, and reflash.

Apparently serial console support was not added until a few months after the SeaBIOS revision used in release 20160907. As a result the only way to get a serial console is via [SGABIOS](https://code.google.com/archive/p/sgabios) (Serial Graphics Adapter BIOS) and setting some runtime configuration in CBFS. SeaBIOS' VGA adapter emulation on the serial port (set with runtime config option `etc/sercon-port`) may be possible for boards with native VGA init but is untested. The following instructions were tested on the KCMA-D8 but should apply to the KGPE-D16 as well. Instructions for setting up the serial console using SGABIOS are as follows. Clone the sgabios repo: ``` $ git clone https://review.coreboot.org/sgabios.git ``` cd into the directory and examine the `sgabios.h` file. Specifically, check that the defined serial port IO address and baud rate matches the one for your machine. By default sgabios assumes it is `0x3f8` and `115200`, respectively, but you can easily check by examining dmesg(1) output: ``` $ dmesg | grep -ie ttyS0 [ 7.782838] 00:02: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A ``` If any changes are necessary, modify the `sgabios.h` file before building with `make all`. The only file that's important is `sgabios.bin` which will be copied to CBFS as a VGA ROM. ``` $ ./cbfstool yourrom.rom add -f /path/to/sgabios.bin -n vgaroms/sgabios.bin -t optionrom ``` If you're using a KCMA-D8 or KGPE-D16 remove the VGA ROM already present in the image as it's useless and does nothing (native graphics init does not exist at this time). ``` $ ./cbfstool yourrom.rom remove -n vgaroms/vgabios.bin ``` Lastly, add the requisite runtime configuration to display and interact with the boot menu: ``` $ ./cbfstool yourrom.rom add-int -i 1 -n etc/show-boot-menu $ ./cbfstool yourrom.rom add-int -i 5000 -n etc/boot-menu-wait $ ./cbfstool yourrom.rom add-int -i 0 -n etc/screen-and-debug ``` Pad the image, if necessary, and reflash.
Sign in to join this conversation.
Loading...
Cancel
Save
There is no content yet.