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!

Baytrail Release

IMG_20150620_153449As some of you on the G+ community are aware, I made a bit of a breakthrough with Baytrail last weekend. I’ve spent a lot of time this week trying to build the BOOT_STUB CBFS in such a way as to get reasonable behaviour, and I’ve gone about as far as I’m going to at this point in time. I think it’s probably best to list the things which are known not working, so you are going in with your eyes wide open:

  • T̶h̶e̶ ̶b̶o̶o̶t̶ ̶m̶e̶n̶u̶ ̶w̶o̶n̶’̶t̶ ̶b̶o̶o̶t̶ ̶a̶n̶y̶t̶h̶i̶n̶g̶ ̶u̶n̶l̶e̶s̶s̶ ̶y̶o̶u̶ ̶p̶r̶e̶s̶s̶ ̶a̶ ̶k̶e̶y̶.̶
  • T̶h̶e̶ ̶p̶a̶y̶l̶o̶a̶d̶ ̶w̶i̶l̶l̶ ̶n̶o̶t̶ ̶r̶e̶c̶o̶g̶n̶i̶s̶e̶ ̶t̶h̶e̶ ̶e̶M̶M̶C̶ ̶d̶e̶s̶p̶i̶t̶e̶ ̶t̶h̶e̶ ̶C̶h̶r̶o̶m̶e̶O̶S̶ ̶S̶e̶a̶B̶I̶O̶S̶ ̶b̶r̶a̶n̶c̶h̶ ̶h̶a̶v̶i̶n̶g̶ ̶p̶a̶t̶c̶h̶e̶s̶ ̶s̶p̶e̶c̶i̶f̶i̶c̶a̶l̶l̶y̶ ̶f̶o̶r̶ ̶e̶M̶M̶C̶/̶S̶D̶.̶
  • O̶n̶ ̶s̶o̶m̶e̶ ̶m̶o̶d̶e̶l̶s̶ ̶b̶o̶o̶t̶i̶n̶g̶ ̶f̶r̶o̶m̶ ̶S̶D̶ ̶d̶o̶e̶s̶ ̶n̶o̶t̶ ̶w̶o̶r̶k̶ ̶a̶t̶ ̶a̶l̶l̶ ̶d̶u̶e̶ ̶t̶o̶ ̶t̶h̶e̶ ̶c̶o̶n̶t̶r̶o̶l̶l̶e̶r̶ ̶b̶e̶i̶n̶g̶ ̶i̶n̶ ̶A̶C̶P̶I̶ ̶m̶o̶d̶e̶ ̶a̶n̶d̶ ̶S̶e̶a̶B̶I̶O̶S̶ ̶n̶o̶t̶ ̶c̶u̶r̶r̶e̶n̶t̶l̶y̶ ̶c̶a̶t̶e̶r̶i̶n̶g̶ ̶f̶o̶r̶ ̶t̶h̶a̶t̶.̶
  • Sound does not yet work in Linux (although the hardware is recognised, possibly a sound “profile” issue).
  • It may have issues with certain models of USB stick, and possibly some SD cards too (although it was happy enough with the 2GB, 8GB MicroSD, and 32GB SD cards I have).

Having said all that, what does work:

  • It will happily boot from many SD/USB cards/sticks.
  • If you’ve kernel >= 4.x  the mouse works OOTB.
  • It’s more or less usable (except for the aforementioned sound).

Go, have fun, but most of all DON’T ask me to fix any of it, because I’m not a coder. Once some more code is added to ChromeOS SeaBIOS (there hasn’t been a commit since December), I will happily update the payload to see if anything’s been fixed.

Script Update

I’ve made a major script update that will just update/restore the BOOT_STUB area of the ROM to load SeaBIOS, as well as flash the full ROM’s of previous, backup/restore your product info (serial no. and hardware ID) and flash a shellball ROM. The main advantage of leaving the majority of the ROM alone is hopefully quality and consistency improvement. However, in some cases this will mean that suspend does not work and VMX is disabled. I will write more, and update the FAQ when people give feedback.

cd; rm -f; curl -k -L -O; sudo -E bash


I’ve spent some time extracting shellball ROM’s for people who have flashed a full ROM, and want to go (semi) back to stock, but have mislaid their backup. For ChromeOS to update, you will need change the HWID to something valid e.g.

gbb_utility –set –hwid="PEPPY A2A-A2E-A5W" bios.bin

You’ll probably also want to download every file in the relevant directory to ensure the GBB script works. You can use lftp’s “mirror” feature to download all those files quickly and easily. Find the shellball ROM’s @