How to write a BIOS chip with a RaspberryPi and flashrom

From my experiments with Coreboot and a Lenovo X220, and my recent use of a Machinist X99Z v102a, I have to write/rewrite the BIOS chip. I don't want to buy another USB dongle just for this. I also knew that a RaspberyPi (model b, like 3) can do the work through the GPIO with flashrom with a DIP8 clip (take a look on eBay).

The pinout for these BIOS chips seems to be the same 1(standardised ??). The pinout for the RaspberryPi is well documented on the flashrom wiki 2 3.

From the shell :
pi@raspberrypi:~ $ sudo flashrom -p linux_spi:dev=/dev/spidev0.0 # just for guessing the chip, and the driver with -p option must be specified
flashrom v0.9.9-r1954 on Linux 4.4.13+ (armv6l)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... delay loop is unreliable, trying to continue OK.
Found Winbond flash chip "W25Q128.V" (16384 kB, SPI) on linux_spi.
No operations were specified.

My BIOS chip is supported and detected as a W25Q128.V. Now, let's go flashing (the write take a lot of time, and just few things happen on the screen, be patient) :

pi@raspberrypi:~ $ sudo flashrom -c "W25Q128.V" -p linux_spi:dev=/dev/spidev0.0 -w Downloads/C612RD23.BIN
flashrom v0.9.9-r1954 on Linux 4.4.13+ (armv6l)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... delay loop is unreliable, trying to continue OK.
Found Winbond flash chip "W25Q128.V" (16384 kB, SPI) on linux_spi.
Reading old flash chip contents...
done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... VERIFIED.

That's it. Just reboot. As usual, you will follow this guide with your own responsibility, and I can't be responsible far any damage/loss etc...

1 Datasheet for the BIOS chip(Winbond 25q128jvsq) on the X99z v102a : https://www.winbond.com/resource-files/w25q128jv%20revf%2003272018%20plus.pdf
2 https://www.flashrom.org/index.php?title=RaspberryPi
3 http://www.marcelpost.com/wiki/images/9/90/Raspberry-pi-pinout.jpg

Add a comment

HTML code is displayed as text and web addresses are automatically converted.

Add ping

Trackback URL : https://blog.crasse.fr/index.php?trackback/18

Page top