Build Your Own Baytrail BOOT_STUB

You’ll need git, gcc, ncurses-devel, iasl and possibly other tools installed.

Presumably from your home directory, run:

git clone -b baytrail-testing baytrail-seabios

to download Kevin O’Connor’s Baytrail specific SeaBIOS sources. Change into the baytrail-seabios directory:

cd baytrail-seabios

Create a valid .config, and build:

echo -e 'CONFIG_COREBOOT=y\n# CONFIG_HARDWARE_IRQ is not set' > .config
make olddefconfig

and download the shellball for your device:

export MODEL=your_model_name
mkdir ${MODEL}
cd ${MODEL}

Now we are going to prepare a new CBFS and download a statically linked cbfstool:

cp bios.bin
chmod +x cbfstool
./cbfstool print

to confirm everything has gone okay so far. Now we have to remove the existing payloads, add a new one, plus config files, and write out the CBFS:

./cbfstool remove -n fallback/vboot
./cbfstool remove -n fallback/payload
./cbfstool add-payload -n fallback/payload -f ../out/bios.bin.elf -c lzma
./cbfstool add -n etc/boot-menu-message -f ../chromeos/etc/boot-menu-message -t raw
./cbfstool add -n etc/boot-menu-key -f ../chromeos/etc/boot-menu-key -t raw
./cbfstool add -n bootorder -f ../chromeos/bootorder -t raw
./cbfstool add-int -i 0xd091f000 -n etc/sdcard0
./cbfstool add-int -i 0xd091c000 -n etc/sdcard1
dd bs=1M skip=7

Time to get flashy:

chmod +x flashrom
sudo ./flashrom -w -i

Assuming you haven’t received any errors thus far, it may be safe to reboot. Didn’t work? Something went wrong? Get yourself a RPi/BBB, suitable jumper wires, and Pomona 5250 SOIC clip!