Thursday, November 30, 2017

Recovering a ASUS PRIME B350-PLUS with flashrom

Required Hardware/Software:


*By removing every other (in a checkerboard pattern) plastic shield on a standard female 2.54mm connector, it's possible to fit them onto a 2mm male header. This is not ideal, but may work.

1. Remove the CMOS battery and any other power cables.

2. Probe the flash header with a multimeter to determine the Winbond W25Q128FWSQ pin connections.



3. Using the information obtained above, draw a wiring diagram for the programmer.

New Schematic 2 HeaderP1X17253246516478839NC10W25Q128FWSQU1CS1MISO2WP3GND4VCC8HOLD7SCK6MOSI5

New Schematic 2 HeaderP1X17253246516478839NC10PICKIT2P2MCLR | VPP1VDD2VSS (GND)3ICSPDAT | PGD4ICSPCLK | PGC5NC6

4. Connect the PICKIT2 to the 2mm headers.



5. Make at least two backups with flashrom. This will take about an hour.

[[email protected] mod]$ time sudo flashrom -p pickit2_spi:voltage=1.8V:spispeed=1M -r backup.1.rom
flashrom v0.9.9-90-g22f2dc5 on Linux 4.13.12-1-ARCH (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 Winbond flash chip "W25Q128.W" (16384 kB, SPI) on pickit2_spi.
===
This flash part has status UNTESTED for operations: PROBE READ ERASE WRITE
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to [email protected] if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
Thanks for your help!
Reading flash... done.

real 29m27.664s
user 0m13.302s
sys 0m25.052s

6. Flash a stock ROM three times. (Depending on the wiring, a single pass may not be enough.)

[[email protected] mod]$ sudo flashrom -p pickit2_spi:voltage=1.8V:spispeed=1M -w B350PLUS1002MOD.rom

7. Remove the jumper cables from the flash header.

If everything went well, the system should now be able to boot up again.