Skip to content

Building and usage

Michal Gorlas edited this page Jun 2, 2025 · 4 revisions

The demo image can be build using the LinuxBootSMM Builder script. The script can be also used to generate the images used for integration tests.

Demo image

An example coreboot image with LinuxBootSMM as a payload, targeting QEMU Q35 can be generated and started by running:

cd /tmp
linuxbootsmm-builder --fetch --config q35
cd coreboot-git/
qemu-system-x86_64 -bios build/coreboot.rom -M q35 -serial stdio

Considerations when creating custom configuration files (coreboot)

In general providing custom configs should not introduce and unexpected errors during the compilation (does not apply to the rom image being functional!), as long as the following configuration options are enabled:

  • CONFIG_PAYLOAD_MM_INTERFACE: enables MM payload interface, needed to communicate with Linux driver.
  • CONFIG_PAYLOAD_LINUXBOOT: enables LinuxBoot.
  • CONFIG_LINUXBOOT_KERNEL_PATH="/tmp/coreboot-git/site-local/Image": the builder tool compiles patched Linux kernel separetely and places it under site-local/Image, without this path being specified, coreboot would compile unpatched Linux kernel during the its own compile process.
  • CONFIG_LINUXBOOT_INITRAMFS_PATH="/tmp/coreboot-git/site-local/initramfs_u-root.cpio": similarly as with the kernel, initramfs is build separately from coreboot by the builder.
  • CONFIG_DEBUG_SMI: enables more verbose boot logs with regards to SMIs.

Considerations when creating custom configuration files (Linux)

There are two configs provided: one with CONFIG_SMP enabled and one without. LinuxBoot traditionally does not come with SMP enabled (as there is no need real for SMP support), but it can be enabled if there is a need for sending SMIs in parallel from different CPUs. In general, regardless of SMP, the following options should stay enabled in a custom config:

  • CONFIG_GOOGLE_FIRMWARE: enables drivers/firmware/google module.
  • CONFIG_GOOGLE_COREBOOT_TABLE: enables interface for accessing coreboot table.
  • CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT: enables the kernel to search for a framebuffer in the coreboot table.
  • CONFIG_GOOGLE_MEMCONSOLE_COREBOOT: enables the kernel to search for a firmware log in the coreboot table.
  • CONFIG_COREBOOT_PAYLOAD_MM: enables the support for SMM handling in Linux.
  • CONFIG_DEBUG_KERNEL: (optional) makes kernel more verbose, i.a. enables more logs when issuing SMIs.
Clone this wiki locally