Page 1 of 1

using coreboot

Posted: Tue May 18, 2021 2:00 pm
by newosdeveloper2021
I want to make a coreboot-compatible OS and test it on qemu.. how would it work

also, can you use gnu-efi or posix-efi to make a bootloader?

i dont wanna deal with bios

Re: using coreboot

Posted: Wed May 19, 2021 12:01 pm
by bzt
newosdeveloper2021 wrote:I want to make a coreboot-compatible OS and test it on qemu.. how would it work
There's no such thing as coreboot-compatible OS as far as I know. Coreboot needs a payload, which can be whatever you want. There are several boot loaders which can work as coreboot payloads, like FILO, BOOTBOOT or GRUB (these are all boot loaders and not OSes). BOOTBOOT has a step-by-step compilation how-to as well as pre-compiled coreboot ROM and qemu invocation example in a Makefile too.

These payloads must be linked with libpayload or loaded as a secondary payload which in turn relies on a primary payload that uses libpayload. This means the secondary payload can be anything, because the compatibility layer is provided by the primary payload. Because the size of the coreboot ROM is 256k, usually that's not enough to store an entire OS, so people only implement boot loaders in payloads that can boot the OS from disk or from network etc without size limitation.
newosdeveloper2021 wrote:also, can you use gnu-efi or posix-efi to make a bootloader?
Most definitely. The aforementioned BOOTBOOT has an UEFI port which is implemented using GNU-EFI, and POSIX-UEFI has several examples which cover all the needs of a boot loader (reading from disk, detecting memory, setting up screen resolution etc. etc. etc.).

Cheers,
bzt