Librebooting Thinkpad X200s

Libreboot (LB) is an open source BIOS replacement derived from Coreboot (CB) which I already covered in a recent article. Unlike CB, LB is entirely free (or "libre") from any proprietary code. Getting it to your device is somewhat easier as there are already precompiled BIOS images (albeit only for a limited number of devices). In this article I will describe preparing and flashing an image to a Thinkpad X200s (the even lighter version of the X200 with longer battery life but less CPU power).

Preparing an LB image for Thinkpad X200s

Attention / Disclaimer: The step-by-step howto below is only intended for X200s models with L9300/L9400 CPUs. The procedure can brick your Thinkpad and it is very important to know that migrating to LB has some drawbacks because...

- you will inevitably lose your reseller warranty if you have recently bought your X200s.

- you will lose the F1-BIOS including all its options like setting the time, configuring boot options and so on - it will all be gone.

- you *might* encounter some trade-offs while using your X200s (e.g. during booting or with external displays).

Preparing a Libreboot ROM image

As described in the X200 overview the X200s has a single 8M BIOS flash chip -> the following dmidecode-command used on a root-shell should give you "8192 kB":

dmidecode | grep ROM\ Size

Get the 8M LB image from the mirror of your choice:

If you don´t plan to compile LB from source, you will only need the ROM itself ([latest_version]rom/libreboot_x200_8mb.tar.xz and the LB utilities ([latest_version]/libreboot_util.tar.xz). Extract both files, get to the x200_8mb folder and take the x200_8mb_usqwerty_vesafb.rom file from there (for a standard qwerty-like keyboard layout...or qwertz, too) and copy it to the extracted libreboot_util/ich9deblob/x86_64 folder. cd into this folder.

The ifconfig-command will give you the MAC address of your Thinkpads eth0 ethernet interface card:

eth0      Link encap:Ethernet  Hardware Adresse YO:UR:MA:CA:DD:RE:SS

Now do the following inside the folder libreboot_util/ich9deblob/x86_64:

./ich9gen  --macaddress YO:UR:MA:CA:DD:RE:SS

This will give you a file named ich9fdgbe_8m.bin

Now, write the binary data to the LB ROM:

dd if=ich9fdgbe_8m.bin of=x200_8mb_usqwerty_vesafb.rom bs=1 count=12k conv=notrunc

I recommend renaming the prepared ROM image afterwards:

mv x200_8mb_usqwerty_vesafb.rom x200_8m_libreboot.rom

Flashing Libreboot using "MiniPRO" TL866A EEPROM flasher

I used a MiniPRO by Autoelectric EEPROM flasher to write LB to the Thinkpad´s flash chip. This required to fully disassemble the X200s and to desolder the flash chip.

Getting the flash chip out

I used the X200-series Hardware Maintenance Manual (HMM) to get the mainboard out, here it is:

The board has plastic foils on both sides - remove them without tearing them apart:

The BIOS chip lies next to the RAM sockets (blue circle).

It is a Winbond 25X64VIG in an 8-pin WSON package - that stands for "Very, Very thin Small Outline No leads" package and thin and small it is...

Above, the desoldered chip (might require around 300 °C for some time, as the chip´s underside is fully-soldered to the board). To re-flash it, I shielded the underside with Kapton tape...

...and soldered it to the corresponding MiniPro adapter:

Flashing procedure

Select the Winbond 25X64V (SOIC8) in the MiniPRO software, read its content out - two times just to be sure - and save the resulting files to a secure place (maybe you do not want to keep Libreboot?!).

The original and the new LB ROM image must have the same number of bytes:

Next, program your LB ROM image to the flash chip:

Finally, clean the solder joints underneath the chip from the remaining solder, shield the larger area in the middle with Kapton tape and use lead-containing solder for resoldering (a possible future removal becomes much easier this way).

After a partial reassembly - give it a try: Libreboot should show up like this:

If you want your X200s to be really free, now is a good time to remove the WWAN adapter (always requires proprietary code) and to get an Atheros AR5B95 WiFi card (it has an open source driver).

Getting a "libre" Linux distribution

As an operating system, Trisquel or Parabola should work out of the box with the X200s. Be sure to try them out first using an USB stick with a live system.

greetings noq2