Zerocat’s Coreboot Machines  v0.9.0
How to create Zerocat’s Coreboot Machines like the ZC-X200 and others...
Toolchain

Main Page | Related Pages | List of Files

This project comes with a set of bash scripts which should help to easily generate your custom Zerocat ROM.

The toolchain is formed by scripts...

  1. setup-toolbox.sh
  2. gen-payload-seabios.sh
  3. gen-payload-grub.sh
  4. gen-zerocat-rom.sh

Please also make use of get-sysinfo.sh, which is an optional script. It helps you to retrieve useful system information and should be run twice on your target machine: Before and after your successful flash procedure.

See List of Files for a complete overview.

Note that all scripts might be invoked with option --help to display usage information.

The intended order of script invocation is like:

  1. Change into folder src/.
  2. Invoke ./setup-toolbox.sh --check.

    This will check whether required programs and packages are available on your system. If any error is reported, please install the appropriate package.

  3. Switch your internet connection on.
  4. Invoke ./setup-toolbox --toolbox --add-project coreboot libreboot seabios grub.

    This will create a new, unique, empty toolbox folder and will populate it with sources of required external projects as like grub, seabios, coreboot and libreboot. The script also runs apropriate git checkout commands in conjunction with ./configure or make, where applicable. More projects like bios_extract, fcode-utils, UEFITool and flashrom might be specified as well, but they are not yet used by the scripts.

    Regarding grub, the manual installation by the user will be required. The script issues an apropriate message on screen and waits some seconds in order to attract your focus. Please install grub before you proceed with next toolchain scripts.

    Note
    In case of script failure due to network issues, convenient resume options are lacking by the moment. In such a case, please specify the toolbox folder in use along with the broken project and try again. Make sure you will end up with your toolbox folder correctly populated.
  5. Internet connection is not required any more.
  6. Invoke ./gen-payload-seabios.sh --usage.

    This will list detailed usage information. In order to build the SeaBIOS payload for platform i386-coreboot, please pick your use case, e.g.:

    • Invoke ./gen-payload-seabios.sh --toolbox <toolbox-folder> --gen in case you are heading to flash machines that do not require an external VGA Option ROM.
    • Invoke ./gen-payload-seabios.sh --toolbox <toolbox-folder> --gen --novgabios in case you are heading to flash machines that do require an external VGA Option ROM. That external ROM must be passed to script gen-zerocat-rom.sh later on.
  7. Invoke ./gen-payload-grub.sh --usage.

    This will list detailed usage information. Please pick your use case, e.g.:

    • In order to generate the GRUB executable payload file for platform i386-coreboot, you might invoke:

      ./gen-payload-grub.sh --toolbox <toolbox-folder> --clean-all --gen-snippets --pack-minimal.

      This will pack the GRUB executable payload file for platform i386-coreboot, small version. The output’s name is hardcoded to grub-${version_grub}_i386-coreboot-minimal.elf.

    • In order to generate generic GRUB configuration files, you might – as a next step – invoke:

      ./gen-payload-grub.sh --toolbox <toolbox-folder> --clean --gen-config --grub-keymap de

    • In case you are heading for T60 machines, use additional options which remove incompatible menuentries from the GRUB boot menu:

      ./gen-payload-grub.sh --toolbox <toolbox-folder> --clean --gen-config --grub-nocoreinfo --grub-nopoweroff --grub-keymap de

    • In case you are heading for machines like x230, t430 or t430s which do not provide sound output with GRUB, invoke:

      ./gen-payload-grub.sh --toolbox <toolbox-folder> --clean --gen-config --grub-keymap de --grub-nomorse

    • And finally, you might specify a dedicated Zerocat Background, if you like to:

      ./gen-payload-grub.sh --grub-background ../backgrounds/ZC-X230-Coreboot.png

      This option might be used three times more in case you want to provide images of the flash procedure, for instance.

  8. Invoke ./gen-zerocat-rom.sh --usage.

    This will list detailed usage information of the last script to use. Please pick your target, e.g.:

    • In order to build your ROM for a ZC-X200, you might invoke:

      ./gen-zerocat-rom.sh --toolbox <toolbox-folder> --target x200 --chipsize 8mb --ime delete --gbe set_001122334455 --grub-elf grub-2.02_i386-coreboot-minimal.elf

      This will set up Zerocat’s ROM with region ME deleted. The MAC Address of the onboard Ethernet Controller has been set to “00:11:22:33:44:55”. Please specify your device’s hexadecimal number which is located on a sticker close to the second RAM socket. However, you might set an arbitrary address as well. The x200 is known to run fine without CPU microcode updates, hence no option --microcode.

    • In order to build your ROM for a ZC-X230, you might invoke:

      ./gen-zerocat-rom.sh --factory <factory.bin> --toolbox <toolbox-folder> --target x230 --microcode --ime clean --gbe set_001122334455 --grub-elf grub-2.02_i386-coreboot-minimal.elf

      This will set up Zerocat’s ROM with region ME cleaned and shrinked, and region BIOS increased. The GbE Firmware is in use as recompiled by coreboot’s utility bincfg. Note on the X230, option --gbe set_001122334455 seems to work fine and even increases your BIOS region by 4096 bytes – however, this is experimental and therefor not promoted loudly. If in doubt, use --gbe keep instead. The X230 seems to freeze in case CPU microcode updates are not provided, hence option --microcode.

    • In order to build your ROM for a ZC-T430, you might invoke:

      ./gen-zerocat-rom.sh --factory <factory.bin> --toolbox <toolbox-folder> --target t430 --microcode --ime clean --gbe keep --grub-elf grub-2.02_i386-coreboot-minimal.elf

      This will set up Zerocat’s ROM with region ME cleaned and shrinked, and region BIOS increased. The GbE Firmware is in use as extracted from the vendor ROM. The t430 seems to freeze in case CPU microcode updates are not provided, hence option --microcode.

    • In order to build your ROM for a ZC-T420, you might invoke:

      ./gen-zerocat-rom.sh --factory <factory.bin> --toolbox <toolbox-folder> --target t420 --ime clean --gbe keep --grub-elf grub-2.02_i386-coreboot-minimal.elf

      This will set up Zerocat’s ROM with region ME cleaned and shrinked, and region BIOS increased. The GbE Firmware is in use as extracted from the vendor ROM. The t420 seems to run fine without CPU microcode updates, hence no option --microcode.

    • In order to build your ROM for a ZC-T60 with ATI Graphics (Mobility Radeon X1300), you might invoke:

      ./gen-zerocat-rom.sh --vgarom <pci-1002-7149.rom> --toolbox <toolbox-folder> --target t60_ati_mobility_radeon_x1300 --grub-elf grub-2.02_i386-coreboot-minimal.elf

      Note file <pci-1002-7149.rom> is an external, proprietary VGA Option ROM that you should have extracted from memory, before. See the machine’s coreboot configuration template file reference for details. The t60 seems to run fine without CPU microcode updates, hence no option --microcode.

    Upon script start, previously configured GRUB settings will be detected automatically, and secondary payloads will be compiled as required. Please take your time to review the reported settings.

    Occasionally, the script will require some user interaction. You should be safe to enter “yes” if asked to do so.

    If the script succeeds, a new folder has been created. It contains a fully configured zerocat.rom along with more files, checksums, backups and subfolders. The ROM can now be flashed to your target machine’s SPI chip.

    Done, now head for flashing! Good luck!

Main Page | Related Pages | List of Files