xref: /aosp_15_r20/external/coreboot/Documentation/payloads.md (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1*b9411a12SAndroid Build Coastguard Worker# Payloads
2*b9411a12SAndroid Build Coastguard Worker
3*b9411a12SAndroid Build Coastguard Workercoreboot doesn't try to mandate how the boot process should look, it merely
4*b9411a12SAndroid Build Coastguard Workerdoes hardware init and then passes on control to another piece of software
5*b9411a12SAndroid Build Coastguard Workerthat we carry along in firmware storage, the _payload_.
6*b9411a12SAndroid Build Coastguard Worker
7*b9411a12SAndroid Build Coastguard WorkerThere is various software in that space that is either explicitly written as
8*b9411a12SAndroid Build Coastguard Workerpayload or can be made to work as one.
9*b9411a12SAndroid Build Coastguard Worker
10*b9411a12SAndroid Build Coastguard Worker## SeaBIOS
11*b9411a12SAndroid Build Coastguard Worker
12*b9411a12SAndroid Build Coastguard Worker[SeaBIOS](https://www.seabios.org) is an open source implementation of
13*b9411a12SAndroid Build Coastguard Workerthe PCBIOS API that exists since the original IBM PC and was extended
14*b9411a12SAndroid Build Coastguard Workersince. While originally written for emulators such as QEMU, it can be built
15*b9411a12SAndroid Build Coastguard Workeras a coreboot payload. It supports executing Option ROMs in a more complete
16*b9411a12SAndroid Build Coastguard Workerfashion than coreboot. It also supports Multiboot.
17*b9411a12SAndroid Build Coastguard Worker
18*b9411a12SAndroid Build Coastguard WorkerWhen chainloaded from GRUB2, the following menuentry could be used:
19*b9411a12SAndroid Build Coastguard Worker
20*b9411a12SAndroid Build Coastguard Worker    menuentry "SeaBIOS" --unrestricted {
21*b9411a12SAndroid Build Coastguard Worker        root=(cbfsdisk)
22*b9411a12SAndroid Build Coastguard Worker        multiboot /img/seabios
23*b9411a12SAndroid Build Coastguard Worker        module /vgaroms/seavgabios.bin
24*b9411a12SAndroid Build Coastguard Worker    }
25*b9411a12SAndroid Build Coastguard Worker
26*b9411a12SAndroid Build Coastguard Worker## edk2
27*b9411a12SAndroid Build Coastguard Worker
28*b9411a12SAndroid Build Coastguard Worker[edk2](https://github.com/tianocore/tianocore.github.io/wiki/Getting-Started-with-EDK-II) is an open-source modern, feature-rich,
29*b9411a12SAndroid Build Coastguard Workercross-platform firmware development environment for the UEFI and UEFI
30*b9411a12SAndroid Build Coastguard WorkerPlatform Initialization (PI) specifications.
31*b9411a12SAndroid Build Coastguard Worker
32*b9411a12SAndroid Build Coastguard Worker## GRUB2
33*b9411a12SAndroid Build Coastguard Worker
34*b9411a12SAndroid Build Coastguard WorkerGRUB2 was originally written as a bootloader and that's its most popular
35*b9411a12SAndroid Build Coastguard Workerpurpose, but it can also be compiled as a coreboot payload.
36*b9411a12SAndroid Build Coastguard Worker
37*b9411a12SAndroid Build Coastguard Worker## Linux
38*b9411a12SAndroid Build Coastguard Worker
39*b9411a12SAndroid Build Coastguard WorkerThere are several projects using Linux as a payload (which was the
40*b9411a12SAndroid Build Coastguard Workerconfiguration that gave coreboot its original name, LinuxBIOS). That kernel is
41*b9411a12SAndroid Build Coastguard Workeroften rather small and serves to load a current kernel from somewhere, e.g.
42*b9411a12SAndroid Build Coastguard Workerdisk or network, and run that through the kexec mechanism.
43*b9411a12SAndroid Build Coastguard Worker
44*b9411a12SAndroid Build Coastguard WorkerTwo aspects emphasized by proponents of Linux-as-a-payload are the
45*b9411a12SAndroid Build Coastguard Workeravailability of well-tested, battle-hardened drivers (as compared to
46*b9411a12SAndroid Build Coastguard Workerfirmware project drivers that often reinvent the wheel) and the ability to
47*b9411a12SAndroid Build Coastguard Workerdefine boot policy with familiar tools, no matter if those are shell scripts
48*b9411a12SAndroid Build Coastguard Workeror compiled userland programs written in C, Go or other programming languages.
49*b9411a12SAndroid Build Coastguard Worker
50*b9411a12SAndroid Build Coastguard Worker## Heads
51*b9411a12SAndroid Build Coastguard Worker
52*b9411a12SAndroid Build Coastguard Worker[Heads] is a distribution that bundles coreboot, Linux, busybox and custom
53*b9411a12SAndroid Build Coastguard Workertools to provide reproducible ROMs. [Heads] aims to provide a secure and
54*b9411a12SAndroid Build Coastguard Workerflexible boot environment for laptops and servers.
55*b9411a12SAndroid Build Coastguard WorkerIt supports features like measured boot, kexec, GPG, OTP, TLS, firmware
56*b9411a12SAndroid Build Coastguard Workerupdates, but only works on a limited amount of mainboards.
57*b9411a12SAndroid Build Coastguard WorkerFor more details have a look at [heads-wiki].
58*b9411a12SAndroid Build Coastguard Worker
59*b9411a12SAndroid Build Coastguard Worker[Heads]: https://github.com/osresearch/heads
60*b9411a12SAndroid Build Coastguard Worker[heads-wiki]: http://osresearch.net/
61