using coreboot

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
newosdeveloper2021
Posts: 15
Joined: Sat May 01, 2021 8:47 pm

using coreboot

Post 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
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: using coreboot

Post 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
Post Reply