Use cases

Any software requiring 16-bit BIOS services benefits from SeaBIOS (eg, Windows and DOS). SeaBIOS also enables booting Linux out of the box (using standard boot-loaders like GRUB and Syslinux).

SeaBIOS supports booting from ATA hard drives, ATAPI cdroms, payloads in flash, and from "Option ROMs" (eg, SCSI or network card). SeaBIOS can initialize and use a ps2 keyboard. SeaBIOS does not currently support booting from USB drives or using USB keyboards.

Windows

However, Windows has a very strict ACPI interpreter, and many coreboot boards do not have a complete ACPI definition. As a result, many coreboot boards will fail during Windows boot (eg, it may fail with a STOP 0xA5 code).

Unfortunately, many boards don't have HAVE_HIGH_TABLES support, yet. If the build fails complaining about this option, one can edit the src/mainboard/<vendor>/<board>/Options.lb file and add a "uses HAVE_HIGH_TABLES" line. Then one can edit src/arch/i386/boot/tables.c and change the lines:

where <memorysize> is the amount of memory (in MiB) available on the target machine, but not more than 3072. So, if you have more than 3GiB of RAM installed, put 3072. Otherwise, put the number of MiB of RAM installed in your machine.

Alternatively, one can add proper support for HAVE_HIGH_TABLES.

Once the above is done, the final image will be in coreboot.rom.

SeaBIOS and CBFS

SeaBIOS can read the coreboot flash filesystem and extract option ROMs and payloads.

When SeaBIOS scans the target machine's PCI devices, it will recognize option ROMs in CBFS that have the form pciVVVV,DDDD.rom. It will also run any file in the directory vgaroms/ as a vga option ROM not specific to a device and files in genroms/ as a generic option ROM not specific to a device. In the above cases, SeaBIOS will recognize files with a .lzma suffix, and automatically decompress them (eg, pci1106,3344.rom.lzma and vgaroms/sgabios.bin.lzma).

SeaBIOS will also load payloads found in the CBFS directory img/.

The examples below show some common uses of this feature.

Adding a VGA option ROM

It is frequently necessary to add a VGA option ROM to CBFS in order to use a VGA adapter that is built-in to a motherboard. Note, VGA adapters on external cards do not require this step as SeaBIOS will automatically extract the VGA bios directly from the card.

The first step is to find the vendor and device ID of the built-in VGA adapter. This information can be found from lspci:

After the above is done, one can write the coreboot.rom file to flash. SeaBIOS will extract the VGA ROM and run it during boot.

Adding gpxe support

A gpxe option ROM can nicely complement SeaBIOS and coreboot by adding network boot support. Adding gpxe is similar to #Adding a VGA option ROM. The first step is to find the Ethernet vendor/device ID. For example:

When using sgabios, all the characters that SeaBIOS writes to the screen will be seen twice - once from SeaBIOS sending the character to the serial port and once from sgabios forwarding the character. To prevent the duplicates one can edit the SeaBIOS src/config.h file and set the following:

#define CONFIG_SCREEN_AND_DEBUG 0

Adding payloads

Most payloads can also be launched from SeaBIOS. To add a payload, build the corresponding .elf file and then add it to the coreboot.rom file in the img/ directory. For example: