4

I am interested in investing in hardware that supports libreboot, and I understand that it's a fork of coreboot with firmware blobs removed, however I do not understand what seabios is.

I did some research, however could not find information (that I understand) about where exactly seabios stands in all this. It has been explained that seabios is a payload, however an OS kernel (say Linux) can instead be the 'payload'. I've seen mention of seabios when trying to tweak a Chromebook, and also on qemu, and on Purism's products, however from what I understood; seabios is not necessary when using coreboot.

Is seabios on a higher level (as the term 'payload' suggests) or is it on a lower level (as the name 'seabios' itself suggests).

I'm guessing that its similar to an open source video driver stack in Linux in which you have GPU firmware > kernel driver > userspace driver/API layer (like mesa, SDL,...), then the application.

From what I understood, Coreboot/Libreboot is the hardware initialization program, and Seabios would be something that loads the bootloader (GRUB or ISOLINUX), and it goes from there, however the details are still unclear to me.

I've been using GNU/Linux full-time for over a decade now, however my knowledge ends beyond systemd and GRUB scripts. Never looked into libre BIOS/UEFI alternatives until now.

I'd greatly appreciate clarification on this prior to committing to buying hardware (even though the list of supported hardware is highly limited)!

2

I don't know what kind of complicated answer you are looking for, here is my simple, but lengthy and anecdotal, attempt:

Consumers have been using IBM PC clones for a long time. These had a firmware for platform initialization called BIOS, which at some point was reverse engineered so that other manufacturers than IBM could start to produce compatible machines. Other computer systems use different firmware, like Itanium, where EFI was developed which later became the new standard for Macs and PCs with Intel processors (TianoCore). Coreboot, initially named LinuxBIOS is an attempt to remove most, or all if possible, proprietary code to boot your Linux kernel, which was the initial goal. At some point members of the project at the time thought that it would be more flexible to support mechanisms other than just loading a Linux kernel. Replacing the original firmware of your computer with Coreboot seemed difficult, even among Linux users, and if you are successful you would be stuck with only booting Linux. Running Windows on Coreboot may not be what most have in mind, but it has its niche. A better example would be users who are more familiar with BSD. And of course there are many more: Minix, Haiku and so forth. If you want to boot any of these you must choose a "payload" that provides an interface that these operating systems expect.

Further reading and materials:

I'm not a firmware engineer and I don't work or contribute to any of these projects. I'm just someone else with over a decade of Linux experience.

If you want to ask an engineer you could ask MrChromebook on Reddit or ask at the respective mailing lists.

1
  • Thanks a lot, this is a great answer because its simple but explains everything and even beyond (with BIOS and EFI hisory) so itll be useful for others! Jun 8 '20 at 22:50
2

A normal BIOS does more than just set up your hardware, it also implements a large amount of functions that can be called by 16-bit real-mode code to perform various low-level actions and retrieve low-level information about the system. The BIOS can provide this low-level functionality because your BIOS by design is very low level (it initializes your system after all) and must be intimately familiar with your platform (chipset and other hardware).

For instance, the BIOS provides an e820 function that can be used to retrieve the system physical memory map, because it's the BIOS that set that memory map up during initialization by programming your chipset registers.

You can see a whole list of these standard functions provided by the BIOS in the table here: https://en.wikipedia.org/wiki/BIOS_interrupt_call

Coreboot does not provide this functionality, because Coreboot is not a BIOS. There is no "Input Output System" with Coreboot. It simply initializes your system and runs your payload. If you want the BIOS interface, you must use SeaBIOS as your payload.

Avoiding the BIOS interface works with Linux because Linux doesn't rely on BIOS functions anyway, it has it's own routines for handling your hardware, and leaves the BIOS alone. Some things, like getting the physical memory map, are still needed, and for that reason Coreboot passes this information to the Linux kernel in the Linux header as part of the Linux boot protocol: https://github.com/coreboot/coreboot/blob/7128063ecc8099932a4bef8d2e28101b7f652804/util/cbfstool/linux.h

Coreboot isn't a BIOS. It exists in a category separate from BIOS and UEFI. If your payload needs a BIOS, it won't work. You need to go Coreboot->SeaBIOS->Whatever you want to boot.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.