Liberating my thinkpad x230 laptop, flashing free bios firmware
I know documentations are a bit scattered and hard to follow, so i made this post to help others, but to be safe, read the (non-)friendly manuals first.
1. Disassemble keyboard and palmrest
First, you need to remove some screws and expose the SPI chips.
You should check how many pins they have, and it’s a good idea to look at their datasheets as well.
2. Preparing the flash device
I’ll be using a Raspberry Pi Pico for this. It’s also recommended by Libreboot, they definitely do not advise using the CH341A.
Libreboot SPI flashing docs (Pico):
https://libreboot.org/docs/install/spi.html#raspberry-pi-pico
I used the precompiled pico-serprog binary to prepare my device.
Depending on whether your SPI chip is 8-pin or 16-pin, connect your clip to the Pico accordingly and double-check everything.
On my particular unit (a cheap one), the red wire is pin 1.
To verify that you installed the serprog firmware correctly, connect the Pico to your PC and run:
You can also simply run lsusb. This is what shows up on my system:
3. Preparing the flash environment on your PC
You should download flashprog, or you can use flashrom (which is probably already available in your Linux distribution).
4. Test read & dumping the firmware
Before doing anything, remove all batteries from the device you’re flashing and disconnect all AC power sources.
Connect the clips to your SPI chip and try reading it.
Flashprog can list supported chips using:
Flashprog (or flashrom) should automatically detect your chip, but to speed things up you can pass the -c argument explicitly.
Basic example:
In my case:
I don’t know how this happens, but some chips include a escape char in their identifier.
So instead of -c MX25L6406E, you need to use:
It took me a while to notice this.
It’s a good idea to pass -V for verbose output and --progress so you can see what’s happening. Also, check the flashprog man page.
I made three backups for each chip (bottom.bin and top.bin) and verified that they were consistent.
Once confirmed, the backup was done.
I should point something out here. When I connected everything directly, I couldn’t read the chips.
I don’t know whether this was a flasher issue or some kind of protection on my board.
What worked for me was:
-
Removing the VCC (3.3V) pin connection from the Pico
-
Connecting an Ethernet cable and AC power to the laptop
(do this while the probes are NOT connected)
This caused the laptop to wake up briefly. I then shut it down. You should see the Ethernet port LEDs flashing..jpeg)
!!! Do not connect two power sources together.
You must remove the VCC pin from your probes.
After that, I connected the probes to the chip (carefully, without shorting anything) and tried reading again.
This time, it worked.
5. Flashing Libreboot
First, clone the Libreboot build system (lbmk):
https://codeberg.org/libreboot/lbmk
Then install all build dependencies. Follow the official guide here:
https://libreboot.org/docs/build/#first-install-build-dependencies
I’m on Fedora, so I ran:
Next, download the tarball for the ThinkPad X230. You can find it here:
Look under:
I installed the 12MB version, since one of my SPI chips is 8MB and the other is 4MB:
Next, inject the vendor files:
This modifies the tarball in place. After that, extract it and choose the ROM you want to use.
Since I have two separate SPI chips, the ROM needs to be split. This is done using dd:
Libreboot docs for this step:
https://libreboot.org/docs/install/x230_external.html#splitting-the-rom
Now you’re ready to flash each chip one by one:
sudo flashprog -p serprog:dev=/dev/ttyACM0 \
-c "MX25L6406E/MX25L6408E" -w bottom.rom --progress
sudo flashprog -p serprog:dev=/dev/ttyACM0 \
-c "MX25L3206E/MX25L3208E" -w top.rom --progress
Extra:
Since this process also removed wifi whitelist i then installed ath9k wifi card, to use wifi without binary blobs.


.jpeg)


.jpeg)