Skip to content
No description, website, or topics provided.
Makefile Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
buildroot @ ef26ffd buildroot: Update to 2018.05.1 Jul 25, 2018
pfc package/petitboot: Bump version to 1.8.0 Jul 25, 2018
LICENSE initial commit Oct 21, 2016
NOTICE initial commit Oct 21, 2016 Update to buildroot 2017.11.2 Jan 28, 2018
petitboot-env Update to buildroot 2017.11.2 Jan 28, 2018

Petitboot for coreboot

About petitboot

Petitboot is a platform independent bootloader based on the Linux kexec warm reboot mechanism. Petitboot supports loading kernel, initrd and device tree files from any Linux mountable filesystem, plus can load files from the network using the FTP, SFTP, TFTP, NFS, HTTP and HTTPS protocols. Petitboot can boot any operating system that includes kexec boot support.

Petitboot includes graphical and command line user interface programs. The command line programs can be used to boot the system remotely via telnet or ssh sessions. Multiple user interface programs can run simultaneously.

Petitboot is licensed under the GPLv2.

See Petitboot website for more information.

About petitboot for coreboot

This builds a bzImage with a linked initramfs that contains petitboot. Currently, the kernel is trimmed down to fit in a the 8MB of a thinkpad x200, while maintaining essential functionality. This is done using an industry standard tool for building embedded linux distributions, buildroot.

It is inspired by the op-build package which builds openpower boot firmware, also containing petitboot

How to build

First get buildroot:

git submodule update --init

Then source petitboot-env

source petitboot-env

Configure and let buildroot do its thing

pfc-build petitboot_defconfig

The resulting bzImage will be in output/images/bzImage

How to integrate with coreboot

The simplest way is it add it as img/petitboot and load it from SeaBIOS. That way you have a fallback mechanism in case something is wrong with petitboot.

cbfstool coreboot.rom add-payload -f bzImage -n img/petitboot -C [command line arguments]

Another way is to use linux as a payload in coreboot.

Known problems

You can sometimes only see a part of the petitboot tui. Hitting CTRL + l to clear the screen fixes this. Adding console=ttyS1 to the linux command line arguments also fixes this problem, by having the boot messages on a different, unused console.

When calling kexec to load a new kernel, the new kernel does not necesseraly have an available framebuffer. If you set up disk encryption this might be a problem since you cannot see the password prompt. To work around this you can add a KMS module like i915 to you distro's bzImage or initrd.

Customize buildroot, linux

To customize buildroot, run in the petitboot_for_coreboot directory:

make -C buildroot/ menuconfig

To customize linux, run:

make -C buildroot/ linux-menuconfig
You can’t perform that action at this time.