Payloads: Difference between revisions
(36 intermediate revisions by 14 users not shown) | |||
Line 2: | Line 2: | ||
== Payloads == | == Payloads == | ||
=== Linux-Kernel === | |||
The [[Linux]] kernel can be used as a payload, and, if it fits into the flash ROM chip, even a distribution can be a payload. But it’s more common to let Linux load another Linux kernel using kexec. Several projects exist to build such a Linux kernel and an initramfs image. | |||
# [https://linuxboot.org LinuxBoot] | |||
# [https://trmm.net/Heads Heads] | |||
# [https://github.com/open-power/petitboot Petitboot – A kexec-based bootloader], [https://www.raptorengineering.com/content/kb/1.html How-to] | |||
# [https://github.com/ArthurHeymans/petitboot_for_coreboot Petitboot for coreboot] | |||
# [http://u-root.tk/ u-root] | |||
=== Bootloaders === | === Bootloaders === | ||
Line 7: | Line 17: | ||
==== SeaBIOS ==== | ==== SeaBIOS ==== | ||
[[SeaBIOS]] is an open-source implementation of the standard bootstrap callback layer implemented by an x86 | [[SeaBIOS]] is an open-source implementation of the standard bootstrap callback layer implemented by an x86 BIOS. It enables booting from unmodified CDROMs and hard drives. | ||
SeaBIOS has been tested with Linux, NetBSD, FreeDOS, and Windows XP/Vista/7. Classic GRUB, lilo, and isolinux work well with SeaBIOS. | SeaBIOS has been tested with Linux, NetBSD, OpenBSD, FreeDOS, and Windows XP/Vista/7. Classic GRUB, lilo, and isolinux work well with SeaBIOS. Other x86 bootloaders and operating systems will likely also work. | ||
==== | ==== GRUB 2 ==== | ||
[ | You can use [[GRUB2]] as a coreboot payload, in order to boot an operating system from a hard drive, for instance. You can also boot via an existing GRUB2 on your hard drive by using [[SeaBIOS]] as your coreboot payload. | ||
[[Payloads#GRUB_legacy|GRUB legacy]] is not suitable as coreboot payload, though. | |||
==== | ==== GRUB legacy ==== | ||
The old GRUB 1 (a.k.a. "GRUB legacy") cannot be directly used as a coreboot payload. | |||
However, you can use [[SeaBIOS]] as payload which allows you to boot any OS via a GRUB legacy you might still have installed on your harddrive. | |||
==== FILO ==== | ==== FILO ==== | ||
[[FILO]] is a simple bootloader with filesystem support. | [[FILO]] is a simple bootloader with filesystem support. It can boot from hard drives (among others), and does not require any legacy BIOS callbacks (unlike [[Payloads#GRUB_legacy|GRUB legacy]], for example). | ||
==== Etherboot ==== | ==== Etherboot / GPXE / iPXE ==== | ||
[[Etherboot]] is a network bootloader. It provides a direct replacement for proprietary PXE ROMs, with many extra features such as DNS, HTTP, iSCSI, etc. | [[Etherboot]] is a network bootloader. It provides a direct replacement for proprietary PXE ROMs, with many extra features such as DNS, HTTP, iSCSI, etc. | ||
Line 33: | Line 43: | ||
Older versions of Etherboot included parts of [[FILO]], and thus supported SATA and USB booting. | Older versions of Etherboot included parts of [[FILO]], and thus supported SATA and USB booting. | ||
The new [[GPXE]] is not yet supported directly, various code changes are required before it can work as a coreboot payload. | The new [[GPXE]] is not yet supported directly, various code changes are required before it can work as a coreboot payload. However, GPXE works well when run with [[SeaBIOS]]. | ||
[[iPXE]] is a fork of [[GPXE]] with some of the original developers. iPXE is more active nowadays. | |||
==== Open Firmware ==== | ==== Open Firmware ==== | ||
Line 41: | Line 53: | ||
==== OpenBIOS ==== | ==== OpenBIOS ==== | ||
[[OpenBIOS]] | [[OpenBIOS]], an open-source IEEE1275-1994 Open Firmware implementation, is also usable as a coreboot payload. | ||
==== | ==== TianoCore ==== | ||
[[ | [[Image:Tianocoreboot.png|160px|right]] | ||
[[TianoCore]] is a bootloader providing the UEFI interface. | |||
<br clear="all" /> | |||
=== Operating systems === | === Operating systems === | ||
Line 51: | Line 67: | ||
==== Linux ==== | ==== Linux ==== | ||
coreboot can use a [http://www.kernel.org Linux] kernel as payload directly. That is, the kernel is included in the ROM chip where coreboot resides. | |||
There will be no graphical boot menu. | |||
* To update the kernel you have to build and flash a new image into the ROM chip. | |||
* The change the kernel cmdline you have to build and flash a new image into the ROM chip. | |||
* To use AMD VGA devices built coreboot with VGA Options ROM support. | |||
* Try to minimize the kernel size by removing all features that wont be required on your hardware. | |||
* You are required to give a valid '''bzImage''' | |||
Alternatively, you can also boot a Linux kernel from your hard drive using either the [[FILO]], [[GRUB2]], or [[SeaBIOS]] payloads. | Alternatively, you can also boot a Linux kernel from your hard drive using either the [[FILO]], [[GRUB2]], or [[SeaBIOS]] payloads. | ||
Line 57: | Line 84: | ||
==== FreeBSD ==== | ==== FreeBSD ==== | ||
[[ | [[FreeBSD]] can be booted via coreboot using [[SeaBIOS]] or [[GRUB2]]. | ||
==== OpenBSD ==== | ==== OpenBSD ==== | ||
[http://openbsd.org/ OpenBSD] can also be booted via coreboot | [http://openbsd.org/ OpenBSD] can also be booted via coreboot using [[SeaBIOS]] or [[GRUB2]]. | ||
==== NetBSD ==== | |||
[http://www.netbsd.org/ NetBSD]/x86 boot code is known to work with [[SeaBIOS]] or [[GRUB2]]. | |||
[[User:Jakllsch|jakllsch]] has worked on a partially-complete port of the x86 boot code to the role of native payload. However, with the advent of [[SeaBIOS]], this is likely to become less of a priority. Consult the [[NetBSD]] wiki page for further information. | |||
==== FreeDOS ==== | |||
[[ | [[FreeDOS]] can be booted via coreboot using [[SeaBIOS]]. | ||
==== Windows ==== | ==== Windows ==== | ||
Line 75: | Line 104: | ||
[[Booting Windows using coreboot|Windows]] can be booted with the help of [[SeaBIOS]]. | [[Booting Windows using coreboot|Windows]] can be booted with the help of [[SeaBIOS]]. | ||
We have successfully booted Windows XP, | We have successfully booted Windows XP, Vista, 7, 8 and 8.1. | ||
==== OpenSolaris ==== | ==== OpenSolaris ==== | ||
[[OpenSolaris]] has multiboot compliant kernels, and so it is possible to boot it with GRUB2 | [[OpenSolaris]] has multiboot compliant kernels, and so it is possible to boot it with [[GRUB2]]. | ||
See also [http://blogs.sun.com/szhou/entry/booting_solaris_from_linuxbios this blog entry]. | See also [http://blogs.sun.com/szhou/entry/booting_solaris_from_linuxbios this blog entry] (somewhat outdated). | ||
=== Other === | === Other === | ||
Line 97: | Line 122: | ||
It can be run from within GRUB, but also as a coreboot payload (i.e. included in your ROM chip). | It can be run from within GRUB, but also as a coreboot payload (i.e. included in your ROM chip). | ||
'''Note:''' Current versions of memtest86 may not work anymore due to changes in coreboot. A patch is being worked on. | |||
[[Memtest86+]] is based on memtest86, but provide more up-to-date version of this useful tool. | |||
Current version Memtest86+ v4.20 can be run from within GRUB or as a coreboot payload. | |||
<br clear="all" /> | <br clear="all" /> | ||
==== ADLO ==== | ==== ADLO ==== | ||
[[ | <div style="color:red"> | ||
'''Note:''' ADLO has been superseded by [[SeaBIOS]]. Do not use it anymore. | |||
</div> | |||
Glue layer to 16-bit Bochs BIOS. Allows [[Booting Windows using coreboot|booting Windows]] and [http://openbsd.org/ OpenBSD]. | |||
==== Libpayload ==== | ==== Libpayload ==== | ||
Line 117: | Line 152: | ||
[[Image:Bayou-screenshot-menu.jpg|160px|right]] | [[Image:Bayou-screenshot-menu.jpg|160px|right]] | ||
[[Bayou]] is the working name for a coreboot payload that can choose, load and run other payloads from a LAR archive on the ROM. | [[Bayou]] is the working name for a coreboot payload that can choose, load and run other payloads from a LAR archive on the ROM. | ||
'''Note:''' Bayou may no longer be in a working state right now, it may or may not be fixed and worked on again. In the meantime, [[SeaBIOS]] and [[GRUB2]] also provide a mechanism to include multiple payloads in a ROM image and select either of them at boot-time. | |||
<br clear="all" /> | |||
==== nvramcui ==== | |||
Nvramcui is a coreboot payload which can modify the nvram contents. | |||
It lives at payloads/nvramcui in the coreboot repository. | |||
<br clear="all" /> | <br clear="all" /> | ||
===== Example on the X60 ===== | |||
Mediawiki converted the lines to ???, in reality they are lines on serial and on the display. | |||
??coreboot configuration utility???????????????????????????????????????????????? | |||
? ? | |||
???Press F1 when done?????????????????????????????????????????????????? ? | |||
?? boot_option Normal ? ? | |||
?? ? ? | |||
?? last_boot Fallback ? ? | |||
?? ? ? | |||
?? baud_rate 115200 ? ? | |||
?? ? ? | |||
?? debug_level Spew ? ? | |||
?? ? ? | |||
?? hyper_threading Enable ? ? | |||
?? ? ? | |||
?? nmi Disable ? ? | |||
?? ? ? | |||
?? boot_devices ?^A ? ? | |||
?? ? ? | |||
?? boot_default 12249791007108694080 ? ? | |||
?? ? ? | |||
??????????????????????????????????????????????????????????????????????? ? | |||
? ? | |||
? ? | |||
? ? | |||
? ? | |||
???????????????????????????????????????????????????????????????????????????????? | |||
==== Depthcharge ==== | |||
* [http://review.coreboot.org/gitweb?p=depthcharge.git;a=summary depthcharge] is a payload for the [[Chromebooks|Chromebooks]] | |||
==== Uboot ==== | |||
* [http://en.wikipedia.org/wiki/Das_U-Boot The u-boot bootloader] can be configured as a [http://git.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=tree;f=board/chromebook-x86;h=66bce36a73aad27d2599a0998bbe2f43aaf2701d;hb=HEAD coreboot payload for the chromebooks] | |||
==== Explorer ==== | |||
* [http://review.se-eng.com/gitweb?p=coreboot.git;a=tree;f=payloads/explorer;h=4f98db55d253ab0a10a12bf2b44b733c5eed13a7;hb=HEAD The explorer payload] is a payload for the [http://review.se-eng.com/gitweb?p=coreboot.git;a=tree;f=src/mainboard/gizmosphere/gizmo;h=e8b2f7b14b7c1691fb1e5c992dd3a89ab6332e4a;hb=HEAD Gizmosphere's Gizmo] (not merged yet into coreboot) | |||
=== Games === | === Games === | ||
Line 125: | Line 204: | ||
[[Image:Coreboot invaders.png|160px|right]] | [[Image:Coreboot invaders.png|160px|right]] | ||
[[GRUB invaders]] multi-boot compliant ''space invaders'' game. | [[GRUB invaders]] is a multi-boot compliant ''space invaders'' game. | ||
It can either be started from within GRUB (as a "kernel"), or it can be used as a coreboot payload. | It can either be started from within GRUB (as a "kernel"), or it can be used as a coreboot payload. | ||
Line 142: | Line 221: | ||
* CodeGen's [http://www.openbios.org/SmartFirmware SmartFirmware] — IEEE1275-1994 Open Firmware | * CodeGen's [http://www.openbios.org/SmartFirmware SmartFirmware] — IEEE1275-1994 Open Firmware | ||
* | * Plan 9 — A distributed operating system. | ||
* RedBoot / eCos — Real-time OS for embedded systems; initial port to ELF completed but no longer available. | |||
* | |||
* HelenOS | * HelenOS | ||
* ReactOS | * [http://www.reactos.org/ ReactOS] | ||
* DragonflyBSD | * DragonflyBSD | ||
* MirBSD | * MirBSD | ||
* MidnightBSD | * MidnightBSD | ||
* FreeRTOS | * FreeRTOS | ||
* QNX | * QNX | ||
Line 159: | Line 234: | ||
* NanoVM (small JVM) | * NanoVM (small JVM) | ||
* uip / lwip (small TCP/IP stacks) | * uip / lwip (small TCP/IP stacks) | ||
* MenuetOS | * [http://www.menuetos.net/ MenuetOS] | ||
* [https://kolibrios.org/ KolibriOS] | |||
* Minix | * Minix | ||
== History == | == History == | ||
The payload was originally intended to be a Linux kernel stored in flash. Flash ROM growth rate was anticipated optimistically however, today there are not many mainboards that actually have enough flash ROM room for a kernel. 512KB can be seen here-and-there and a few boards come with 1MB. Recent kernels really want | The '''payload''' was originally intended to be a Linux kernel stored in flash. Flash ROM growth rate was anticipated optimistically however, and today there are not many mainboards that actually have enough flash ROM room for a kernel. 512KB can be seen here-and-there and a few boards come with 1MB or 2MB. Recent kernels really want at least 1MB, and then you'll only have room for 300-400 KB of initial ramdisk, which could be too small too, depending on the application. | ||
you'll only have room for 300-400 KB of initial ramdisk, which could be too small too, depending on the application | |||
So, other payloads are used; the two major ones are [[FILO]] and [[SeaBIOS]]. Also have a look at [[GRUB2]] and [[Etherboot]] (soon to be deprecated in favor of [[GPXE]]). |
Latest revision as of 21:46, 8 February 2018
coreboot in itself is "only" minimal code for initializing a mainboard with peripherals. After the initialization, it jumps to a payload.
Payloads
Linux-Kernel
The Linux kernel can be used as a payload, and, if it fits into the flash ROM chip, even a distribution can be a payload. But it’s more common to let Linux load another Linux kernel using kexec. Several projects exist to build such a Linux kernel and an initramfs image.
Bootloaders
SeaBIOS
SeaBIOS is an open-source implementation of the standard bootstrap callback layer implemented by an x86 BIOS. It enables booting from unmodified CDROMs and hard drives.
SeaBIOS has been tested with Linux, NetBSD, OpenBSD, FreeDOS, and Windows XP/Vista/7. Classic GRUB, lilo, and isolinux work well with SeaBIOS. Other x86 bootloaders and operating systems will likely also work.
GRUB 2
You can use GRUB2 as a coreboot payload, in order to boot an operating system from a hard drive, for instance. You can also boot via an existing GRUB2 on your hard drive by using SeaBIOS as your coreboot payload.
GRUB legacy is not suitable as coreboot payload, though.
GRUB legacy
The old GRUB 1 (a.k.a. "GRUB legacy") cannot be directly used as a coreboot payload.
However, you can use SeaBIOS as payload which allows you to boot any OS via a GRUB legacy you might still have installed on your harddrive.
FILO
FILO is a simple bootloader with filesystem support. It can boot from hard drives (among others), and does not require any legacy BIOS callbacks (unlike GRUB legacy, for example).
Etherboot / GPXE / iPXE
Etherboot is a network bootloader. It provides a direct replacement for proprietary PXE ROMs, with many extra features such as DNS, HTTP, iSCSI, etc.
Older versions of Etherboot included parts of FILO, and thus supported SATA and USB booting.
The new GPXE is not yet supported directly, various code changes are required before it can work as a coreboot payload. However, GPXE works well when run with SeaBIOS.
iPXE is a fork of GPXE with some of the original developers. iPXE is more active nowadays.
Open Firmware
Mitch Bradley's Open Firmware, an IEEE1275-1994 Open Firmware implementation, can also be used as coreboot payload.
OpenBIOS
OpenBIOS, an open-source IEEE1275-1994 Open Firmware implementation, is also usable as a coreboot payload.
TianoCore
![](/images/thumb/c/c3/Tianocoreboot.png/160px-Tianocoreboot.png)
TianoCore is a bootloader providing the UEFI interface.
Operating systems
Linux
coreboot can use a Linux kernel as payload directly. That is, the kernel is included in the ROM chip where coreboot resides. There will be no graphical boot menu.
- To update the kernel you have to build and flash a new image into the ROM chip.
- The change the kernel cmdline you have to build and flash a new image into the ROM chip.
- To use AMD VGA devices built coreboot with VGA Options ROM support.
- Try to minimize the kernel size by removing all features that wont be required on your hardware.
- You are required to give a valid bzImage
Alternatively, you can also boot a Linux kernel from your hard drive using either the FILO, GRUB2, or SeaBIOS payloads.
FreeBSD
FreeBSD can be booted via coreboot using SeaBIOS or GRUB2.
OpenBSD
OpenBSD can also be booted via coreboot using SeaBIOS or GRUB2.
NetBSD
NetBSD/x86 boot code is known to work with SeaBIOS or GRUB2.
jakllsch has worked on a partially-complete port of the x86 boot code to the role of native payload. However, with the advent of SeaBIOS, this is likely to become less of a priority. Consult the NetBSD wiki page for further information.
FreeDOS
FreeDOS can be booted via coreboot using SeaBIOS.
Windows
Windows can be booted with the help of SeaBIOS.
We have successfully booted Windows XP, Vista, 7, 8 and 8.1.
OpenSolaris
OpenSolaris has multiboot compliant kernels, and so it is possible to boot it with GRUB2.
See also this blog entry (somewhat outdated).
Other
Memtest86 / Memtest86+
![](/images/thumb/3/39/Qemu_memtest.png/160px-Qemu_memtest.png)
Memtest86 is a program which checks your RAM modules.
It can be run from within GRUB, but also as a coreboot payload (i.e. included in your ROM chip).
Note: Current versions of memtest86 may not work anymore due to changes in coreboot. A patch is being worked on.
Memtest86+ is based on memtest86, but provide more up-to-date version of this useful tool.
Current version Memtest86+ v4.20 can be run from within GRUB or as a coreboot payload.
ADLO
Note: ADLO has been superseded by SeaBIOS. Do not use it anymore.
Glue layer to 16-bit Bochs BIOS. Allows booting Windows and OpenBSD.
Libpayload
Libpayload is a helper-library for payload-writers.
Coreinfo
![](/images/thumb/5/57/Coreinfo_pci.png/160px-Coreinfo_pci.png)
coreinfo is a coreboot payload which can display various system information.
Bayou
![](/images/thumb/c/cd/Bayou-screenshot-menu.jpg/160px-Bayou-screenshot-menu.jpg)
Bayou is the working name for a coreboot payload that can choose, load and run other payloads from a LAR archive on the ROM.
Note: Bayou may no longer be in a working state right now, it may or may not be fixed and worked on again. In the meantime, SeaBIOS and GRUB2 also provide a mechanism to include multiple payloads in a ROM image and select either of them at boot-time.
nvramcui
Nvramcui is a coreboot payload which can modify the nvram contents.
It lives at payloads/nvramcui in the coreboot repository.
Example on the X60
Mediawiki converted the lines to ???, in reality they are lines on serial and on the display.
??coreboot configuration utility???????????????????????????????????????????????? ? ? ???Press F1 when done?????????????????????????????????????????????????? ? ?? boot_option Normal ? ? ?? ? ? ?? last_boot Fallback ? ? ?? ? ? ?? baud_rate 115200 ? ? ?? ? ? ?? debug_level Spew ? ? ?? ? ? ?? hyper_threading Enable ? ? ?? ? ? ?? nmi Disable ? ? ?? ? ? ?? boot_devices ?^A ? ? ?? ? ? ?? boot_default 12249791007108694080 ? ? ?? ? ? ??????????????????????????????????????????????????????????????????????? ? ? ? ? ? ? ? ? ? ????????????????????????????????????????????????????????????????????????????????
Depthcharge
- depthcharge is a payload for the Chromebooks
Uboot
- The u-boot bootloader can be configured as a coreboot payload for the chromebooks
Explorer
- The explorer payload is a payload for the Gizmosphere's Gizmo (not merged yet into coreboot)
Games
GRUB invaders
![](/images/thumb/3/39/Coreboot_invaders.png/160px-Coreboot_invaders.png)
GRUB invaders is a multi-boot compliant space invaders game.
It can either be started from within GRUB (as a "kernel"), or it can be used as a coreboot payload.
TINT
![](/images/thumb/d/da/Coreboot_libpayload_tint.png/160px-Coreboot_libpayload_tint.png)
tint is a falling blocks game.
Possible future payloads
The following payloads might or might not work (with more or less changes required) with coreboot — their usage hasn't been tested or documented so far.
- CodeGen's SmartFirmware — IEEE1275-1994 Open Firmware
- Plan 9 — A distributed operating system.
- RedBoot / eCos — Real-time OS for embedded systems; initial port to ELF completed but no longer available.
- HelenOS
- ReactOS
- DragonflyBSD
- MirBSD
- MidnightBSD
- FreeRTOS
- QNX
- Windows CE
- Haiku
- NanoVM (small JVM)
- uip / lwip (small TCP/IP stacks)
- MenuetOS
- KolibriOS
- Minix
History
The payload was originally intended to be a Linux kernel stored in flash. Flash ROM growth rate was anticipated optimistically however, and today there are not many mainboards that actually have enough flash ROM room for a kernel. 512KB can be seen here-and-there and a few boards come with 1MB or 2MB. Recent kernels really want at least 1MB, and then you'll only have room for 300-400 KB of initial ramdisk, which could be too small too, depending on the application.
So, other payloads are used; the two major ones are FILO and SeaBIOS. Also have a look at GRUB2 and Etherboot (soon to be deprecated in favor of GPXE).