Compiling static 32-bit ChromeOS Flashrom on Fedora 22 32-bit

Install gcc and ting’:

dnf groupinstall "C Development Tools and Libraries"

Install some required static library dependencies.

dnf install pciutils-devel-static zlib-static libfdt-devel glibc-static

Clone ChromeOS Flashrom master:

git clone https://chromium.googlesource.com/chromiumos/third_party/flashrom
cd flashrom

Make the damned thing:

make CONFIG_FT2232_SPI=no CONFIG_DEDIPROG=no CONFIG_STATIC=yes CHECK_LIBPCI=no NOWARNERROR=yes

Note:

  • CONFIG_FT2232_SPI=no and CONFIG_DEDIPROG=no are set so that a static libusb dependency isn’t required.
  • CHECK_LIBPCI=no is set because the Makefile seems to have problems detecting where the static version of libpci is.
  • NOWARNERROR=yes is set because of a minor error near the beginning of the compile.

That’s all, she wrote.

New ROM Release – 190915

Apart from automation being an end in itself, I wanted to be able to easily put new SeaBIOS payloads into the firmware mods, and ensure consistency. All the firmware mods now contain the same version of SeaBIOS (from the master branch), the major additional feature (for some models at least) being SD card support.

I expect to make further payload updates as and when salient features become available in SeaBIOS master. When an update is made there will be a small period (probably less than an hour) where the script goes into maintenance mode, and I test the payload on one of each of the last 4 generations of Chromebook (Sandy/Ivybridge, Haswell, Baytrail and Broadwell). Please use the community to direct all feedback.

Patch For linux_recovery.sh

It seems the ChromeOS recovery script isn’t working for me the last few weeks. It fails with:

ERROR: The config file isn't valid.

Looking at the script and config file, it’s because the config file is currently coming in with a line space in each model stanza, which means the script thinks the first and second halves of the stanza are actually separate stanzas.

I fixed it with the following patch:

--- linux_recovery.sh 2014-12-16 04:00:00.000000000 +0000
+++ linux_recovery.new 2015-09-07 14:53:00.771904673 +0100
@@ -381,6 +381,9 @@
 sha1)
 sha1="$val"
 ;;
+ *)
+ skipping=yes
+ ;;
 esac
 else
 # Between paragraphs. Time to check what we've found so far.

Basically what it’s doing here is saying, “if we don’t find a valid recognised key (or indeed we find an empty line ;) skip that line”. Does the job …

Save the above text to linux_recovery.patch and apply it with:

patch -p0 < linux_recovery.patch

Now, if someone can tell me where to find valid HWID’s, I’d appreciate it, as the config file doesn’t have them any more. Note: this doesn’t fix the script as a whole. Seems to be pretty broken ATM.

Donate for Chromebook + SeaBIOS support.

So, you made it here – well done.

All donations towards infrastructure & Chromebooks are gratefully received. You can use one of the buttons in the sidebar to do so.

Please note: regardless of donation, I do not provide support for putting Windows on Chromebooks, as a matter of choice.

Please also note: this website, and my exploits herein, have absolutely no association with my employer.

Thank you & happy computing.