Table of Contents

Flashing my Lenovo x200 with Libreboot

This guide is fairly old (2020/2021) and I haven't had time to update it with any changes that Libreboot may require.

Most of the steps will still be relevant but I suggest cross-checking with the Libreboot site for any necessary updates until I can update this guide.

I apologize for any inconveniences this causes.

I accidentally botched my original Libreboot flash during an update, so I decided to take some pictures and type this guide to hopefully help someone else.

Main bit of advice here is to read over the directions once before proceeding then once you start, go slowly!


Disclaimer

While this process worked for me, you may not have the same results. Please do your homework before attempting this and don’t blame me if you mess something up.

I own a Lenovo X200. I haven’t used a X200S or a X200T. Refer to Libreboot’s site for instructions regarding other models.

My X200 has a 16 pin, 8Mb chip. I am unfamiliar with other configurations. Refer to Libreboot’s site for instructions regarding other configurations.

I am using a desktop computer running Debian Stretch, so you may or may not need to change the commands depending on your OS.


Helpful Info

You can click on the images for a larger size.

For the code blocks on this tutorial, pay attention to the command prompt. I made sure to keep the hostname relevant to which system the commands should be run on.

After the hostname, it shows the current directory. Eg:


Gather Supplies

Attention

The BeagleBone Black used in this guide is old.
Head over to the Libreboot site for updated device recommendations:
https://libreboot.org/docs/install/spi.html

First, gather the supplies needed to perform the flash.

 Gather Supplies

Pictured
Not Pictured

Prepare the Files

These instructions are currently for Libreboot 20160907 which has a different gpg signing key than Libreboot 20210522 and newer!

We need to download the necessary files from the Libreboot site and have them all set up and ready to go for when we get the BBB connected to the X200.

From your main computer:

You need to verify what size flash chip your X200 has. That will be done below at the Checking Communication section. If you’re not sure, come back to this section once you know what rom to download.


Verify the Files

Now we can verify that the files we downloaded are the same as what is on the server and that they weren’t tampered with or switched during download.


Extract the Files


Obtain the MAC Address

We need to set the MAC address for our wired interface in the rom. There are a few ways to get it.


Prepare the ROM


Disassemble the x200

Remove the battery then proceed to take the screws out of the bottom of the X200. I circled the nine screws in the image below  Screw locations

After removing the screws, flip the X200 over and open it up. Place your fingers somewhere around the <Ctrl> keys and push towards the screen. You shouldn’t need much pressure for it to slide forward. It won’t go very far, maybe 1/8″. Slide the keyboard forward

Once it slides forward, you can pry it up from the mouse buttons. Be careful not to pull it too far out, it’s still connected to the motherboard. I just laid it on the palm rest. Remove the keyboard

Grab the tab circled in the picture below and pull it away from the motherboard to disconnect the keyboard. After it’s disconnected, set the keyboard aside. Disconnect the keyboard

With the keyboard out of the way, you can now see the connector from the Fingerprint Sensor. On my previous flash a few years ago, I had already disconnected mine and I didn’t think to edit picture to circle it until after I put everything back together. (In the image above, it’s the smaller ribbon cable with black tape on it.)

After you disconnect the Fingerprint Sensor, you can lightly pull from where the keyboard used to be and lift the palm rest away from the X200. Once it’s free, set it aside. Lift the palmrest

Now would be a good time to disconnect the camera, microphone and any other devices if you want to. You could also continue disassembling the laptop so you can apply some fresh thermal paste to the processor but I won’t cover any of that here.

You should now be able to see the chip we need to access in order to flash Libreboot. I have it circled in the image below. I also labeled the pins so you know the order that they are numbered for when it’s time to connect them to the BBB. BIOS Chip

Peel the clear plastic film back to keep it out of the way. I used electrical tape and taped it to the CMOS Battery. Tape the film


Prepare the BeagleBone Black

I chose to do a fresh install of the OS before flashing my X200. I would at least recommend updating the BBB so you can follow along with this tutorial. Somewhere between the time I originally bought the BBB and now, they changed the process of enabling SPI for the pins.

If you would like to update the MMC on the BeagleBone Black, head over there and follow the instructions. I’ll get a guide going soon and will update this post with a link.

After you have a fresh OS installed or updated the existing OS , make sure you can SSH to it from another computer.


Check Voltage

If you’re using an old PSU with a 20 pin connector, I would highly recommend verifying that you’re using the correct pins before connecting it to the flash chip. Applying more than 3.5 Volts to the chip can destroy the chip so proceed with caution!

First we need to make a jumper to go from the green wire to the black wire so the PSU will turn on. The smaller bend of a large paper clip fits perfectly. After the jumper is installed, go ahead and plug in the PSU.

Once the PSU is running, check voltage between any Orange wire and any Black wire. You should have roughly 3.5 Volts DC. I had to bend some pieces of paper clips to hold the test leads while I took a picture.

 Verify Voltage


Make Connections

Here’s the order in how I connected things and was successful. YMMV. I made sure to connect the grounds first as a safety measure. I connected the 3.3 Volts last.

Connect the Wires

  1. PIN 2 on the BBB to BLACK on the PSU
  2. Affix the Ponoma 5252 Clip to the CMOS Chip.
  3. PIN 1 on the BBB to PIN 10 on the X200
  4. PIN 17 on the BBB to PIN 7 on the X200
  5. PIN 18 on the BBB to PIN 15 on the X200
  6. PIN 21 on the BBB to PIN 8 on the X200
  7. PIN 22 on the BBB to PIN 16 on the X200
  8. PIN 2 on the X200 to ORANGE (3.5V) on the PSU

Checking Communication

Now that we’re all connected we need to verify that we can communicate with the chip.

You can see that it found the Macronix flash chip and that it’s 8192kB. That lets us know that we need to use the 8Mb rom from the Libreboot mirror. If you need to, go back to Prepare the Files and download the proper rom and follow the steps up to disassembling the X200.


Backup Factory ROM

We need to make at least two copies of the factory rom, then check the shasums so we can verify that they are the same. If they are different, keep trying. You may want to check the connections between the BBB and the chip and/or the length of the wires. Reducing the spispeed may also help.

I used the time command to show how long it took to complete the transfer. You don’t have to use it if you don’t want to but at least this gives you an idea on what to expect time-wise.


Flashing Libreboot

And now for the moment of truth!

Now you can breathe a sigh of relief. That VERIFIED is a beautiful thing to see!!


WiFi

If you’re planning on using wifi, it is recommended to replace the factory Intel wifi chip. The factory chip requires proprietary software to work correctly, and we’re librebooting to rid our x200 of closed source software!

For reference, I replaced mine with an Atheros 9285G and the Libreboot tutorial shows them using a Atheros AR5B95.


Reassembly

You can now proceed to reassemble the laptop in the reverse order that it was disassembled.

  1. Palmrest
  2. Keyboard - Don’t forget to plug it back in!!
  3. Screws
  4. Battery

Finishing Up

Now you can install your favorite GNU distro!

https://libreboot.org/docs/gnulinux/


Troubleshooting

Here are some of the solutions to common problems that I’ve come across.


Conclusion

This was a fun little project but I didn’t realize how many steps were involved until I started writing this guide. When I was in the process of doing the flash, it didn’t seem so long and complex. I struggled in attempting to give enough information without over complicating things or rambling on. I hope I succeeded in creating an easy to follow tutorial.

Feel free to leave a comment if you have any troubles and I’ll do my best to help.