My CH341a programmer arrived today. I was able to successfully reflash my Librem 13 v2 to the official Librem coreboot firmware blob.
I found this post on Purism’s website (1) to understand where the flash chip was located (along with @maccelerated’s tip). The linked image (2) shows a remarkably different logic board layout compared to my v2 - my PCB is black, and a lot of minor components are in completely different locations. The flash chip was roughly in the same place, though.
I followed this Youtube video (3) to understand how to connect the SOP-8 clip in the correct orientation, and to connect the clip’s cable to the CH341a USB programmer.
I found the Purism coreboot blob at this location: (4).
Once I had everything connected, I ran this from the computer connected to the CH341a programmer:
$ sudo flashrom --programmer ch341a_spi
flashrom v1.2 on Linux 6.5.4-arch2-1 (x86_64)
flashrom is free software, get the source code at https://flashrom.org
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found GigaDevice flash chip "GD25B128B/GD25Q128B" (16384 kB, SPI) on ch341a_spi.
Found GigaDevice flash chip "GD25Q127C/GD25Q128C" (16384 kB, SPI) on ch341a_spi.
Multiple flash chip definitions match the detected chip(s): "GD25B128B/GD25Q128B", "GD25Q127C/GD25Q128C"
Please specify which chip definition to use with the -c <chipname> option.
I then took a close-up photo of the chip in order to verify that my particular Librem 13 v2 had a “GD25Q128C” flash chip.
I did a test to see if I could read off the current firmware:
$ sudo flashrom --programmer ch341a_spi -c GD25Q127C/GD25Q128C -r test.rom
flashrom v1.2 on Linux 6.5.4-arch2-1 (x86_64)
flashrom is free software, get the source code at https://flashrom.org
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found GigaDevice flash chip "GD25Q127C/GD25Q128C" (16384 kB, SPI) on ch341a_spi.
Reading flash...
done.
It took a couple of minutes after the “Reading flash…” before the “done.” message appeared.
$ strings test.rom | grep MrCh
-MrChromebox-4.20.1
#define COREBOOT_EXTRA_VERSION "-MrChromebox-4.20.1"
-MrChromebox-4.20.1
-MrChromebox-4.20.1
Success!
Writing the official image was as simple as running:
$ sudo flashrom --programmer ch341a_spi -c GD25Q127C/GD25Q128C -w coreboot-librem_13v2-4.21-Purism-2.rom
flashrom v1.2 on Linux 6.5.4-arch2-1 (x86_64)
flashrom is free software, get the source code at https://flashrom.org
Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found GigaDevice flash chip "GD25Q127C/GD25Q128C" (16384 kB, SPI) on ch341a_spi.
Reading old flash chip contents... done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... VERIFIED.
I’m unable to put more than 2 links in this post…
(1): 2015-08-21 Librem 13: Weekly BIOS Progress Update – Purism
(2): h ttps://i.imgur.com/WmKq3Om.jpg
(3): h ttps://www.youtube.com/watch?v=2Y06x1f22B0
(4): h ttps://source.puri.sm/firmware/releases