This week I got all the components I needed to replace the Lenovo BIOS with Libreboot on my ThinkPad X200. Here are some pictures and notes about the process.
Here in Argentina is not so easy to get Libreboot-compatible computers, and those that are available tend to be way more expensive than in the US. I got my X200 for about $150, which is a pretty good price for the local market, specially considering it came with 8GB of RAM and a battery in very good shape (6 cells, about 4 hours of normal use). I had a 240GB SSD lying around, so I used it to replace the 500GB HDD it came with.
For the librebooting process I was able to get a CH341A USB programmer. It was $20 and came with a SOIC8 clip I didn’t use. But after reading some articles about the process I found out these programmers could be using 5v instead of the required 3.3v. So I got a volt-meter and checked, and indeed that was my case. I’m not comfortable with electronics to do the suggested changes so I just borrowed a Raspberry Pi for the process.
I also ordered a SOIC16 clip ($20), but it came with soldered cables and pins. So I had to source some female-to-female Arduino cables ($4) to connect it to the Pi.
Updating the Raspberry Pi
To begin with, I started by updating Raspbian on the Pi and installing the required software, while I disassembled the ThinkPad.
sudo apt-get update && sudo apt-get dist-upgrade sudo apt-get install libftdi1 libftdi-dev libusb-dev libpci-dev subversion libusb-1.0-0-dev pciutils, zlib, libusb, build-essentials
I also got a copy of flashrom from their GitHub repository and compiled it.
Connecting the Raspberry to the flash chip
With all the software in place it was time to connect the Pi to the flash chip. I started following a diagram from this Reddit post, but after some trying I couldn’t get it to recognize the chip, so I went with the official documentation from https://libreboot.org/docs/install/rpi_setup.html.
Reading the contents of the chip (Lenovo BIOS)
With the cables in place, I ran my first attempt to get the contents of the Lenovo BIOS:
flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=128 -r factory1 -V
dev=/dev/spidev0.0 was not present on the Raspberry. After some searching, I found this answer from StackExchange’s Raspberry Pi site that got me running. (That’s when I discovered the connection issue, as it printed a “No EEPROM/Flash device found!” message. After changing the connection as per Libreboot’s docs, everything was working.)
I repeated the process a few times and verifying I got consistent results, it was time to write Libreboot to the chip.
Writing Libreboot ROM
The process took about 20 minutes and my terminal looked like this:
When it finished, it printed a success message:
Now it was time to test it!
The moment of truth
That was it! You can hear my sigh of relief =)
It was a daunting process for someone doing it for the first time, but in the end it was easy and straightforward.
Now I own two Librebooted devices, one freed by myself, and I’m writing this post from it!