Skip to content

Compiling Libreboot with SeaBIOS

Antonizoon edited this page Sep 8, 2014 · 4 revisions

Note: This method is outdated, since Libreboot has integrated a modified SeaBIOS into it's latest builds, so a VGABIOS is no longer required.

Libreboot uses the GRUB2 payload in it's Coreboot image. However, SeaBIOS may be necessary to boot non-Linux operating systems.

  1. Install the packages needed to build Coreboot.

     sudo apt-get install libncurses-dev iasl libc6-dev-i386 svn
    
  2. Grab a copy of the Libreboot source code.

  3. In the coreboot folder, change the entire Payload section in .config to the text shown below. This will embed SeaBIOS into coreboot, rather than GRUB2.

     #
     # Payload
     #
     CONFIG_PAYLOAD_SEABIOS=y
     CONFIG_SEABIOS_STABLE=y
     CONFIG_PAYLOAD_FILE="$(obj)/seabios/out/bios.bin.elf"
     CONFIG_COMPRESSED_PAYLOAD_LZMA=y
    
  4. Then, just run make to build the coreboot.rom file.

     make
    
  5. Copy the compiled coreboot.rom file to the flashrom source code folder.

Sources

Modify Coreboot ROM

This step is REQUIRED if you are flashing Coreboot for the first time. Otherwise, the ROM might overwrite some portions of the BIOS protected by bucts 1.

  1. Copy the coreboot.rom file in X60_source to the flashrom source code folder.

  2. Run the dd command below to shift the first 64K of data from coreboot.rom .

     dd if=coreboot.rom of=top64k.bin bs=1 skip=$[$(stat -c %s coreboot.rom) - 0x10000] count=64k
    
  3. Run the dd command below to display the first 64k of coreboot.rom .

     dd if=coreboot.rom bs=1 skip=$[$(stat -c %s coreboot.rom) - 0x20000] count=64k | hexdump
    
  4. Verify that the complete range is filled with ff bytes before proceeding.

The output of the dd command above must EXACTLY match the text below. If not, the coreboot image needs to be rebuilt with the second-to-last 64kbyte block unused.

    0000000 ffff ffff ffff ffff ffff ffff ffff ffff 
    *
    0010000
  1. Run the dd command below:

     dd if=top64k.bin of=coreboot.rom bs=1 seek=$[$(stat -c %s coreboot.rom) - 0x20000] count=64k conv=notrunc
    

Sources

BA Logo

Bibliotheca Anonoma

Coreboot Laptops

Coreboot is an open source, user configurable BIOS. However, it does use a few proprietary blobs here and there.

ThinkPads

These require hardware flashing. Due to Intel Management Firmware, proprietary blobs are required for newer Intel motherboards to even power up.

Chromebooks

Most Intel Chromebooks come with Coreboot preinstalled. SeaBIOS can optionally be installed to add Windows support.

Just use John Lewis's Installation Script for All Models to autoinstall.

Build Notes

NOTE: The Libreboot components of this wiki was divested into the Official Libreboot Documentation here. Please use that from now on.

Libreboot laptops are certified by the FSF to protect your freedom.

They contain no proprietary blobs of any kind, and have the best support for FSF certified GNU/LInux.

ThinkPads

Macbooks

Other Tutorials

Clone this wiki locally