Go to file
Ronald G Minnich c127d3c19f pruning broken board
Signed-off-by: Ronald G Minnich <rminnich@gmail.com>
2024-10-25 17:29:13 +02:00
.github/workflows remove unused make targets 2024-10-25 17:29:13 +02:00
bin repack LZMA compressed files so that they are uncompressed 2018-04-10 15:14:04 -04:00
boards boards/x3550m5: remove board; there were only empty files 2022-04-01 15:05:22 -07:00
build reconstruct qemu ROMs 2018-01-26 17:08:20 -05:00
cpu@3285a2d39b Add u-root and cpu as git submodules 2022-04-01 15:06:31 -07:00
dxe Use fiano create-ffs when USE_UTK is specified 2021-11-15 19:10:26 +00:00
lib correct spelling of PEI DEPEX 2018-04-10 15:08:18 -04:00
mainboards pruning broken board 2024-10-25 17:29:13 +02:00
u-root@3ed70c35ac Add u-root and cpu as git submodules 2022-04-01 15:06:31 -07:00
.gitignore Add more file types for .gitignore 2024-01-18 21:54:59 -08:00
.gitmodules Add u-root and cpu as git submodules 2022-04-01 15:06:31 -07:00
CONTRIBUTING.md added CONTRIBUTING.md 2017-12-21 14:15:52 -08:00
COPYING Add GPL license (issue #115) 2017-02-26 10:53:11 -05:00
FAQ.md fix typo, update platform status 2018-02-06 17:12:45 -05:00
LICENSE Initial commit 2017-12-21 09:13:26 -08:00
Makefile Use fiano create-ffs when USE_UTK is specified 2021-11-15 19:10:26 +00:00
Makefile.rules Removed all the of the Heads vestiges, streamlined firmware build. 2018-01-25 18:23:51 -05:00
Makefile.uefi Linux should be an application, not a DXE driver, with the BDS patch 2018-08-09 10:21:13 -04:00
Makefile.utk Use fiano create-ffs when USE_UTK is specified 2021-11-15 19:10:26 +00:00
README.md Add dependency information for building 2018-06-30 00:22:29 +02:00

linuxboot

The LinuxBoot project allows you to replace your server's firmware with Linux.

Supported server mainboards

  • qemu emulated Q35 systems
  • Intel S2600WF
  • Dell R630
  • Winterfell Open Compute node (works well)
  • Leopard Open Compute node (works well)
  • Tioga Pass Open Compute node (works well)
  • Monolake Open Compute node (not tested)

Build instructions

Make sure you have installed the dependencies uuid-dev, nasm, and acpica-tools (or equivalent for your distribution).

You need to provide:

  • The vendor UEFI firmware for the mainboard
  • A Linux kernel built with the CONFIG_EFI_BDS option enabled
  • An initrd.cpio file with enough tools to kexec the rest of the system.

For the initrd, the Heads firmware or u-root systems work well. Both will build minimal runtimes that can fit into the few megabytes of space available.

For everything except qemu, you'll need to copy the vendor ROM dump to boards/$(BOARD)/$(BOARD).rom. Due to copyright restrictions, we can't bundle the ROM images in this tree and you must supply your own ROM from your own machine. qemu can built its own ROM from the edk2 tree, so this is not necessary.

Configure the build system:

cp path/to/s2600wf.rom boards/s2600wf/
make \
	BOARD=s2600wf \
	KERNEL=../path/to/bzImage \
	INITRD=../path/to/initrd.cpio.xz \
	config
make

This will write the values into the .config file so that you don't need to specify them each time. If all goes well you will end up with a file in build/$(BOARD)/linuxboot.rom that can be flashed to your machine. It will take a while since it also clones the LinuxBoot patched version of tianocore/edk2 UDK2018 branch and build it.

Emulating with qemu

If you want to experiment with LinuxBoot you can run it under qemu. No ROM file is necessary, although you still need a Heads or NERF runtime kernel/initrd pair. You can launch the emulator by running:

make run

This will use your current terminal as the serial console, which will likely mess with the settings. After killing qemu by closing the window you will need to run stty sane to restore the terminal settings (echo is likely turned off, so you'll have to type this in the blind).

Adding a new mainboard

Copy Makefile.board from one of the other mainboards and edit it to match your new board's ROM layout. The qemu one is not the best example since it has to match the complex layout of OVMF; most real mainboards are not this messy.

You'll need to figure out which FVs have to be preserved, how much space can be recovered from the ME region, etc. The per-board makefile needs to set the following variables:

  • FVS: an ordered list of IFD, firmware volumes and padding
  • linuxboot-size: the final size of the ROM image in bytes (we should verify this against the real ROM instead)

More info