Download, configure, and build coreboot
Step 1 – Install tools and libraries needed for coreboot
$ sudo apt-get install -y bison build-essential curl flex git gnat-5 libncurses5-dev m4 zlib1g-dev
Step 2 – Download coreboot source tree
$ git clone https://review.coreboot.org/coreboot $ cd coreboot
Step 3 – Build the coreboot toolchain
Please note that this can take a significant amount of time
$ make crossgcc-i386 CPUS=$(nproc)
Step 4 – Build the payload – coreinfo
$ make -C payloads/coreinfo olddefconfig $ make -C payloads/coreinfo
Step 5 – Configure the mainboard
$ make menuconfig select 'Mainboard' menu Beside 'Mainboard vendor' should be '(Emulation)' Beside 'Mainboard model' should be 'QEMU x86 i440fx/piix4' select exit select 'Payload' menu select 'Add a Payload' choose 'An Elf executable payload' select 'Payload path and filename' enter 'payloads/coreinfo/build/coreinfo.elf' select exit select exit select yes
check your configuration (optional step):
$ make savedefconfig $ cat defconfig
There should only be two lines:
CONFIG_PAYLOAD_ELF=y CONFIG_PAYLOAD_FILE="payloads/coreinfo/build/coreinfo.elf"
Step 6 – build coreboot
$ make
At the end of the build, you should see:
Build emulation/qemu-i440fx (QEMU x86 i440fx/piix4)
This means your build was successful. The output from the build is in the build directory. build/coreboot.rom is the full rom file.
Test the image using QEMU
Step 7 – Install QEMU
$ sudo apt-get install -y qemu
Step 8 – Run QEMU
Start QEMU, and point it to the ROM you just built:
$ qemu-system-x86_64 -bios build/coreboot.rom -serial stdio
You should see the serial output of coreboot in the original console window, and a new window will appear running the coreinfo payload.
https://blog.yoitsu.moe/tech_misc/x230_with_coreboot_and_me_cleaner.html