Help me test the flashrom v1.7 binary build

@ian In January 2027 we’ll release Flashrom 2.0, dropping a lot of things. Don’t worry, I’ll take care of the Bus Pirate legacy part and the serial part (it was suggested we drop it (serial…), but I’ll keep maintaining it so everything still works…). People from flashrom staff have asked if I want to add support for the new modern Bus Pirate. I can do it no problem…

but do you think it’s worth it? I mean FlatBuffers… Flashrom is a project where things take time and they have to be done right… Maybe the legacy part is enough? What do the rest of you think? Is the effort worth it?

  • Is the legacy part enough?
  • Implement FlatBuffers so we can easily use everything from the outside, specify max current and voltage, and make it all simpler. Dreg! you lazy ass!
  • Legacy part as is enough
  • I’m lactose intolerant
0 voters
1 Like

Defo flat buffers. There is tooling in a lot of languages, and you can use every feature in a systematic way. Legacy is very hackish and extending it in the future is going to be difficult .

2 Likes

seconding that. that would also solve the limit of locking into voltage on entering binmode and not being able to use the “no PSU” mode for stealing the voltage from tharget

2 Likes

I’m now also the official maintainer of flashrom on Windows. Nobody else volunteered, so I did.

Starting with flashrom 2.0, due in early 2027, I’ll make sure the Bus Pirate and all the other programmers work properly on Windows.

4 Likes

Just found this project @Dreg :

…“# Configure chip identity (uses rflasher chip database)
spi-flash-tool configure W25Q128JV --chips-dir ~/src/rflasher/chips/vendors”

And sorry for not yet testing flashrom

3 Likes

Super short DIY cable for SPI flash. BPv3 nostalgia :smiling_face:

3 Likes

@AreYouLoco I don’t think I have enough IQ to do things with FPGAs :smiling_face:

2 Likes

the github explains how to use it. its a ready-to-use project.

3 Likes

It’s not that FPGAs are inherently more difficult, it’s just that they have constraints, and those constraints are hard to understand for us first-timers, and the tools typically are unique for each vendor, resulting in reduced knowledge transfer when changing suppliers.

Plus, most times us “software folk” don’t need the hard-real-time response that an FPGA provides, so it’s just easier to do stuff without real-time constraints.

For emulation of a flash device, the linked project is amazing. Yes, it’s an investment to learn. At the same time, with your expertise in flash device behavior (aka weirdness, protocol bugs, half-baked implementations, …), you might find the project to give long-term value, especially if you create a library of those quirks.

3 Likes

BPV6 Results

WORKING 100%

Bus Pirate Chip JEDEC ID Size Voltage 1 MHz 125 kHz Notes
Bus Pirate 6 GigaDevice GD25Q64(B) C8 4017 8 MiB 3.3 V PASS (w 5:44, r 1:41) PASS (w 43:41, r 10:30)
Bus Pirate 6 Atmel AT25DF021A 1F 4301 256 KiB 3.3 V PASS (w 0:18, r 0:04) PASS (w 1:25, r 0:21) Powers up with all sectors protected; flashrom unprotects it.
Bus Pirate 6 Macronix MX25L1605A/MX25L1606E/MX25L1608E C2 2015 2 MiB 3.3 V PASS (w 1:32, r 0:26) PASS (w 10:56, r 2:38) Four flashrom definitions match this ID; tested with -c.
Bus Pirate 6 Winbond W25Q64BV/W25Q64CV/W25Q64FV EF 4017 8 MiB 3.3 V PASS (w 7:45, r 1:41) PASS (w 43:29, r 10:30) Two flashrom definitions match this ID; tested with -c.
Bus Pirate 6 PUYA P25Q16H 85 6015 2 MiB 3.3 V PASS (w 2:37, r 0:26) PASS (w 12:36, r 2:38) No flashrom definition; detected through SFDP.
Bus Pirate 6 Atmel AT45DB161D 1F 2600 2112 KiB 3.3 V PASS (w 2:00, r 0:27) PASS (w 11:51, r 2:43) DataFlash: different 8-pin pinout, needs its own wiring. 528-byte pages.
Bus Pirate 6 SST SST25VF080B BF 258E 1 MiB 3.3 V PASS (w 4:41, r 0:14) PASS (w 15:57, r 1:20) Programmed with AAI, one 2-byte word per command. Powers up write-protected; flashrom unprotects it.
Bus Pirate 6 Winbond W25Q64.W EF 6017 8 MiB 1.8 V PASS (w 7:55, r 1:41) PASS (w 43:39, r 10:30) 1.8 V part.
Bus Pirate 6 Macronix MX25U4033E C2 2533 512 KiB 1.8 V PASS (w 0:30, r 0:07) PASS (w 2:59, r 0:40) 1.8 V part. No flashrom definition; detected through SFDP.
Bus Pirate 6 Winbond W25Q256JV (marking) EF 4019 32 MiB 3.3 V PASS (w 22:57, r 6:40) PASS (w 2:54:05, r 41:58) Marked W25Q256JV but behaves like a W25Q256FV (ignores 0x12): use the W25Q256FV definition. SOIC-16; /HOLD must not float.
4 Likes

Bus Pirate 5 REV10

WORKING 100%

Chip JEDEC ID Size Voltage 1 MHz 125 kHz Notes
Winbond W25Q256JV (marking) EF 4019 32 MiB 3.3 V PASS (w 49:49, r 10:12) PASS (w 3:11:57, r 45:33) Marked W25Q256JV but behaves like a W25Q256FV (ignores 0x12): use the W25Q256FV definition. SOIC-16; /HOLD must not float.
Atmel AT45DB161D 1F 2600 2112 KiB 3.3 V PASS (w 4:26, r 0:40) PASS (w 13:32, r 2:57) DataFlash: different 8-pin pinout, needs its own wiring. 528-byte pages.
Winbond W25Q80BV/W25Q80DV EF 4014 1 MiB 3.3 V PASS (w 1:34, r 0:20) PASS (w 6:01, r 1:26) Two flashrom definitions match this ID; tested with -c. Only answers with /HOLD held high.
Winbond W25Q64.W EF 6017 8 MiB 1.8 V PASS (w 12:43, r 2:34) PASS (w 48:08, r 11:25) 1.8 V part.
Macronix MX25U4033E C2 2533 512 KiB 1.8 V PASS (w 1:13, r 0:11) PASS (w 3:28, r 0:44) 1.8 V part. No flashrom definition; detected through SFDP.
GigaDevice GD25Q64(B) C8 4017 8 MiB 3.3 V PASS (w 12:41, r 2:34) PASS (w 48:04, r 11:24)
PUYA P25Q16H 85 6015 2 MiB 3.3 V PASS (w 5:22, r 0:39) PASS (w 14:23, r 2:52) No flashrom definition; detected through SFDP.
Winbond W25Q64BV/W25Q64CV/W25Q64FV EF 4017 8 MiB 3.3 V PASS (w 12:31, r 2:34) PASS (w 47:55, r 11:25) Two flashrom definitions match this ID; tested with -c.
SST SST25VF080B BF 258E 1 MiB 3.3 V PASS (w 23:17, r 0:20) PASS (w 26:35, r 1:27) Programmed with AAI, one 2-byte word per command. Powers up write-protected; flashrom unprotects it.
Atmel AT25DF021A 1F 4301 256 KiB 3.3 V PASS (w 0:27, r 0:06) PASS (w 1:34, r 0:23) Powers up with all sectors protected; flashrom unprotects it.
Macronix MX25L1605A/MX25L1606E/MX25L1608E C2 2015 2 MiB 3.3 V PASS (w 3:10, r 0:39) PASS (w 12:01, r 2:52) Four flashrom definitions match this ID; tested with -c.

w: wall time of flashrom -w (read, erase, write and verify). r: wall time of flashrom -r. Times are m:ss or h:mm:ss.

Bus Pirate 5 REV8 (with SD card)

WORKING 100%

Chip JEDEC ID Size Voltage 1 MHz 125 kHz Notes
Winbond W25Q256JV (marking) EF 4019 32 MiB 3.3 V PASS (w 49:04, r 10:08) PASS (w 3:11:19, r 45:28) Marked W25Q256JV but behaves like a W25Q256FV (ignores 0x12): use the W25Q256FV definition. SOIC-16; /HOLD must not float.
Winbond W25Q80BV/W25Q80DV EF 4014 1 MiB 3.3 V PASS (w 1:33, r 0:20) PASS (w 6:00, r 1:26) Two flashrom definitions match this ID; tested with -c. Only answers with /HOLD held high.
Atmel AT45DB161D 1F 2600 2112 KiB 3.3 V PASS (w 4:25, r 0:40) PASS (w 13:29, r 2:57) DataFlash: different 8-pin pinout, needs its own wiring. 528-byte pages.
GigaDevice GD25Q64(B) C8 4017 8 MiB 3.3 V PASS (w 12:30, r 2:33) PASS (w 48:04, r 11:23)
Macronix MX25L1605A/MX25L1606E/MX25L1608E C2 2015 2 MiB 3.3 V PASS (w 3:08, r 0:39) PASS (w 12:00, r 2:51) Four flashrom definitions match this ID; tested with -c.
PUYA P25Q16H 85 6015 2 MiB 3.3 V PASS (w 5:10, r 0:39) PASS (w 14:12, r 2:52) No flashrom definition; detected through SFDP.
Atmel AT25DF021A 1F 4301 256 KiB 3.3 V PASS (w 0:27, r 0:06) PASS (w 1:33, r 0:22) Powers up with all sectors protected; flashrom unprotects it.
SST SST25VF080B BF 258E 1 MiB 3.3 V PASS (w 22:37, r 0:20) PASS (w 25:44, r 1:26) Programmed with AAI, one 2-byte word per command. Powers up write-protected; flashrom unprotects it.
Winbond W25Q64BV/W25Q64CV/W25Q64FV EF 4017 8 MiB 3.3 V PASS (w 12:21, r 2:33) PASS (w 47:54, r 11:23) Two flashrom definitions match this ID; tested with -c.
Macronix MX25U4033E C2 2533 512 KiB 1.8 V PASS (w 1:11, r 0:10) PASS (w 3:26, r 0:44) 1.8 V part. No flashrom definition; detected through SFDP.
Winbond W25Q64.W EF 6017 8 MiB 1.8 V PASS (w 12:32, r 2:33) PASS (w 47:58, r 11:23) 1.8 V part.

w: wall time of flashrom -w (read, erase, write and verify). r: wall time of flashrom -r. Times are m:ss or h:mm:ss.

Bus Pirate 5 and 6 with legacy4third + flashrom: full-chip random write and read-back

Firmware main branch @ 322c452 on all boards, binmode “Legacy Binary Mode for Flashrom and AVRdude” (legacy4third), flashrom v1.7.0 for Windows x64, -p buspirate_spi:dev=COMx,spispeed=<1M|125k>,psus=on.

For each chip and speed: a fresh random image of the full chip size, flashrom -w (erase, write, verify), then flashrom -r of the whole chip compared byte by byte with the image. PASS = -w exits 0 with VERIFIED, -r exits 0 and the read-back is identical.

33 chip tests on three Bus Pirates, all PASS at both 1 MHz and 125 kHz.

Summary (1 MHz / 125 kHz)

Chip JEDEC ID Size Voltage Bus Pirate 6 Bus Pirate 5 REV10 Bus Pirate 5 REV8 Notes
GigaDevice GD25Q64(B) C8 4017 8 MiB 3.3 V PASS / PASS PASS / PASS PASS / PASS
Atmel AT25DF021A 1F 4301 256 KiB 3.3 V PASS / PASS PASS / PASS PASS / PASS Powers up with all sectors protected; flashrom unprotects it.
Macronix MX25L1605A/MX25L1606E/MX25L1608E C2 2015 2 MiB 3.3 V PASS / PASS PASS / PASS PASS / PASS Four flashrom definitions match this ID; tested with -c.
Winbond W25Q64BV/W25Q64CV/W25Q64FV EF 4017 8 MiB 3.3 V PASS / PASS PASS / PASS PASS / PASS Two flashrom definitions match this ID; tested with -c.
PUYA P25Q16H 85 6015 2 MiB 3.3 V PASS / PASS PASS / PASS PASS / PASS No flashrom definition; detected through SFDP.
Atmel AT45DB161D 1F 2600 2112 KiB 3.3 V PASS / PASS PASS / PASS PASS / PASS DataFlash: different 8-pin pinout, needs its own wiring. 528-byte pages.
SST SST25VF080B BF 258E 1 MiB 3.3 V PASS / PASS PASS / PASS PASS / PASS Programmed with AAI, one 2-byte word per command. Powers up write-protected; flashrom unprotects it.
Winbond W25Q64.W EF 6017 8 MiB 1.8 V PASS / PASS PASS / PASS PASS / PASS 1.8 V part.
Macronix MX25U4033E C2 2533 512 KiB 1.8 V PASS / PASS PASS / PASS PASS / PASS 1.8 V part. No flashrom definition; detected through SFDP.
Winbond W25Q256JV (marking) EF 4019 32 MiB 3.3 V PASS / PASS PASS / PASS PASS / PASS Marked W25Q256JV but behaves like a W25Q256FV (ignores 0x12): use the W25Q256FV definition. SOIC-16; /HOLD must not float.
Winbond W25Q80BV/W25Q80DV EF 4014 1 MiB 3.3 V PASS / PASS PASS / PASS PASS / PASS Two flashrom definitions match this ID; tested with -c. Only answers with /HOLD held high.

Times

Chip Bus Pirate 6 1 MHz Bus Pirate 6 125 kHz Bus Pirate 5 REV10 1 MHz Bus Pirate 5 REV10 125 kHz Bus Pirate 5 REV8 1 MHz Bus Pirate 5 REV8 125 kHz
GigaDevice GD25Q64(B) w 5:44, r 1:41 w 43:41, r 10:30 w 12:41, r 2:34 w 48:04, r 11:24 w 12:30, r 2:33 w 48:04, r 11:23
Atmel AT25DF021A w 0:18, r 0:04 w 1:25, r 0:21 w 0:27, r 0:06 w 1:34, r 0:23 w 0:27, r 0:06 w 1:33, r 0:22
Macronix MX25L1605A/MX25L1606E/MX25L1608E w 1:32, r 0:26 w 10:56, r 2:38 w 3:10, r 0:39 w 12:01, r 2:52 w 3:08, r 0:39 w 12:00, r 2:51
Winbond W25Q64BV/W25Q64CV/W25Q64FV w 7:45, r 1:41 w 43:29, r 10:30 w 12:31, r 2:34 w 47:55, r 11:25 w 12:21, r 2:33 w 47:54, r 11:23
PUYA P25Q16H w 2:37, r 0:26 w 12:36, r 2:38 w 5:22, r 0:39 w 14:23, r 2:52 w 5:10, r 0:39 w 14:12, r 2:52
Atmel AT45DB161D w 2:00, r 0:27 w 11:51, r 2:43 w 4:26, r 0:40 w 13:32, r 2:57 w 4:25, r 0:40 w 13:29, r 2:57
SST SST25VF080B w 4:41, r 0:14 w 15:57, r 1:20 w 23:17, r 0:20 w 26:35, r 1:27 w 22:37, r 0:20 w 25:44, r 1:26
Winbond W25Q64.W w 7:55, r 1:41 w 43:39, r 10:30 w 12:43, r 2:34 w 48:08, r 11:25 w 12:32, r 2:33 w 47:58, r 11:23
Macronix MX25U4033E w 0:30, r 0:07 w 2:59, r 0:40 w 1:13, r 0:11 w 3:28, r 0:44 w 1:11, r 0:10 w 3:26, r 0:44
Winbond W25Q256JV (marking) w 22:57, r 6:40 w 2:54:05, r 41:58 w 49:49, r 10:12 w 3:11:57, r 45:33 w 49:04, r 10:08 w 3:11:19, r 45:28
Winbond W25Q80BV/W25Q80DV w 0:45, r 0:14 w 5:27, r 1:20 w 1:34, r 0:20 w 6:01, r 1:26 w 1:33, r 0:20 w 6:00, r 1:26

w: wall time of flashrom -w (read, erase, write and verify). r: wall time of flashrom -r. Times are m:ss or h:mm:ss.

End of the tests, finally! Everything tested and working well. Before the 2027 flashrom release I’ll test everything again to make sure it works on Windows.

1 Like

@Dreg I remember using 6 or 8M spispeed on old buspirate. How fast BPv5+ can go now?

Hey @AreYouLoco With Dupont cables? I always recommend kHz. If you have Duponts of 5cm or less you can go faster with some guarantees… but I prefer to be ULTRA-conservative so they don’t open issues on us later… :wink: With the socket boards you should be able to go faster.

But let’s keep the official number low, because people make really bad setups from a signal integrity point of view.

1 Like

shhould have seen funky stuff that i managed with microsd cards recently :stuck_out_tongue:

2 Likes