How to compile custom SeaBIOS with Coreboot?

I see here how to create custom Coreboot .rom files, but I don’t see documentation on how to use the SeaBIOS repository with it’s own .sh files to build custom SeaBIOS .bin files. Can someone help me understand how to build the SeaBIOS repository with the .sh files?

what exactly are you trying to do?

The script files in my SeaBIOS repo are for building SeaBIOS as a RW_LEGACY payload, mostly for devices which are now EOL. There is nothing useful at all there.

1 Like

I represent an undergraduate research group at Georgia Tech. We are working in integrating security features into the BIOS of a computer and using SeaBIOS as our open-source BIOS of choice. We are trying to flash an RW_LEGACY compatible chromebook (Acer Chromebook 315 [CB315-4H/4HT]: MAGMA) with our custom SeaBIOS. We have non-custom SeaBIOS working in RW_LEGACY mode and the custom version working in QEMU, but we are now trying to get our custom SeaBIOS running with the build scripts in the MrChromebox fork of the SeaBIOS repo.

Jasperlake Chromebooks don’t support SeaBIOS as an AltFw payload. I don’t have any scripts to assist with that.

It’s not necessarily impossible, but would require a bit of work, and I’d have to spend some time thinking of all the things you’d need to account for.

1 Like

Any help would be greatly appreciated. If you don’t have time to work on this we would greatly appreciate any documentation you have for previous generations using SeaBIOS. Thank you for your time.

Disclaimer: This is on your own risk. YMMV

  1. Run the build_uefi.sh <your-boardname-here> script once
  2. make nconfig
  3. U wanna select seabios as a payload in the Payload menu. Also set your fork here.
  4. Save and quit
  5. make -j$(nproc)
  6. You’ll find your built firmware under build/coreboot.rom

Do note that the build_uefi.sh script incorporates make distclean, which will wipe your config if it exists

This might be a stupid question, but does coreboot.rom include the SeaBIOS payload or is that a separate .bin file that I load in? Also, does building coreboot also build the SeaBIOS Fork?

Yes its included in the rom, yes it will be cloned and built

However one mistake on my side: the seabios git url is hardcoded in payloads/external/SeaBIOS/Makefile and needs to be changed there

SeaBIOS built as the single/primary payload for a coreboot image will not work for RW_LEGACY, for multiple reasons - payload offset in CBFS, display init type, and other board-specific bits.