Installing Coreboot on the X220

bash
fsf
x220
Autor:in

Johannes Titz

Veröffentlichungsdatum

19. Oktober 2022

I finally did it! I installed coreboot on my old x220. It was much easier than expected and it actually works. Since there is a lot of scattered information on the internet, here I provide some additional notes that will help me in the future when I want to coreboot another device.

First of all you should know that you have to flash your bios chip. This means you need to open your computer and physically attach wires to your bios chip. It is more harmless than it sounds.

Note that there is an option to flash the bios chip via software (1vyrain), but this only works for xx30 thinkpads and has some disadvantages (we’ll discuss this later).

Single board computer versus programmer

There are two ways to flash your bios chip externally. Either with a single board computer (such as the beagle board or the raspberry pi) or with an external programmer (such as the ch341a). I would definitely recommend going for the programmer as it is easier to set up and is affordable. Even if you happen to have a single board computer already, the small investment in the programmer will pay off by the comfort you gain.

To use the programmer you need another computer (in addition to the one you want to put coreboot on) where you can plug in the programmer via USB and run the commands for the programmer.

How to do it

The best guide I could find is this one:

https://garcia.casa/blog/installing-coreboot-on-a-thinkpad-x220

You can follow it step by step, but be aware that:

  • This Guide uses a programmer (ch341a).
  • There are some minor typos when changing the directories (see, for instance, section “Run ifdtool” where x220 becomes x200).
  • I was unable to use the -c option with the suggested chip name for flashrom. I believe the flashrom command can output the correct name, but I simply skipped the -c option altogether, which worked fine.
  • Running on arch, you can install an ada-compiler with the package gcc-ada and me_cleaner with me_cleaner-git from the AUR
  • Attaching the clip to the bios chip worked for me the first time I tried. I did not experience the problems mentioned in the guide.

Correctly aligning pins

Another point that needs some attention is that there are labels on the programmer and the PCB (the thing you put into the programmer), but none on the clip and the bios chip. Most guides have no specific directions how they should align.

  • for the clip, the red wire indicates 1
  • the bios chip has a small dot, indicating 1
  • the PCB has numbers 1 to 8
  • ignore all labels on the programmer itself, they do not refer to the EEPROM pins

According to another helpful guide (https://www.hardwareluxx.de/community/threads/ch341a-usb-programmer-mainboard-uefi-bios-wiederherstellen-windows.1312607/) the pin numbers on the programmer for 25xx (which the x220 has) are:

Simply align all parts at the label 1: the red wire of the clip, the programmer, the PCB (connection between clip and programmer) and the actual BIOS chip.

1vyrain

1vyrain is an interesting alternative, but only for xx30 thinkpads. You do not need to physically flash your bios chip, but can do it via software.

Disadvantages (as far as I understand, correct me if I am wrong):

  • you can only do it once, so updates of coreboot are not possible (you would need to flash externally)
  • if you want to go back to another rom image or if you brick your device during the process, you will need to flash externally
  • Intel Management Engine is disabled via advanced menu, so it will still be there but hopefully be disabled. When you flash externally, you can remove essential parts of Intel Management Engine and soft disable it. For some this is quite an important difference!

Coreboot: original, skulls, heads, osboot, libreboot

There are some projects based on coreboot, of which some require even more work, but some others less work.

Check out skulls, heads, osboot and libreboot for supported devices and instructions.

Skulls is probably the easiest one to get started with as it is precompiled. You just need to flash the downloaded image. But it does not support x220.