-
Notifications
You must be signed in to change notification settings - Fork 52
Description
I tried this one and flashrom couldn't even communicate with the programmer -- I think its pio related (not sure entirely, I later tried in my own implementation the pio but couldn't get it to work either) -- in the version I forked (https://codeberg.org/libreboot/pico-serprog) it could communicate but couldn't read more than a small part of the rom without getting an error. That's when I tried again with pio -- to no avail, but I realized only a subset of the serprog spec is implemented: https://github.com/flashrom/flashrom/blob/main/Documentation/serprog-protocol.txt
So the problem I faced in the second version was actually that neither project implemented the commands that tell flashrom how much buffer the device can handle. Once I implemented these and some other commands, I got it to work. I tried 1024, then 512, and then went to 8 because the higher value buffers got out of sync/didn't work for me. But 8 works great -- its slow, takes about 10-12 minutes to read a 16MB rom chip, and about the same to write, except write is a read + write + read, so about 30-40 minutes for that.
Here is my version in case its helpful to anyone, the main branch is whats working for me and then I have two pio related PRs I could never get to work: https://github.com/opensensor/pico-serprog I would have forked from this branch but my code is closer in line with the libreboot codeberg version.
Example:
Probing for Generic unknown SPI chip (REMS), 0 kB: compare_id: id1 0xa1, id2 0x17
Found Unknown flash chip "SFDP-capable chip" (16384 kB, SPI).
===
This flash part has status UNTESTED for operations: WP
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... read_flash: region (00000000..0xffffff) is readable, reading range (00000000..0xffffff).
done.
serprog: Output drivers disabled
Note -- the version I have uses a different pin-out than version.