[flashrom] flashrom as programmer slow because it reads the whole SPI Flash contents before writing anything
R. Diez
rdiezmail-flashrom at yahoo.de
Mon Jan 11 14:58:12 CET 2016
Hi all:
I am trying to use flashrom with a fast generic FTDI FT2232H adapter as
an SPI Flash programmer in a small production line.
The SPI Flash chip can hold 8 MiB of data, but we are only using the
first 512 KiB of it.
I found flashrom to be surprisingly slow. I started digging and the step
"Reading old flash chip contents..." is taking minutes. It looks like
flashrom is reading the whole contents before writing anything at all.
I am using 7.5 MHz at the moment. I cannot pump up the frequency too
much, as I am still using flywires to connect the SPI flash chip to the
programmer.
I know that the flash chips are empty (0xFF), so flashrom does not need
to read anything beforehand. If it is going to read anything, the first
512 KiB would suffice, because I am not touching anything else.
I found the following in the source code:
int read_all_first = 1; /* FIXME: Make this configurable. */
I also found the following message about it:
http://www.flashrom.org/pipermail/flashrom/2011-December/008440.html
I guess the corresponding command-line argument is still missing.
I cannot tell how hard it would be to code and test the missing parts.
The "Development Guidelines" are several pages long. There are very many
unmerged patches in the pipeline, and some of them are years old. The
repository is in Subversion. In summary, not very encouraging.
Does anybody know of some fork or alternative that does not read
everything before writing any data at all?
Please copy me on any answers because I am not subscribed to the mailing
list.
Regards,
rdiez
More information about the flashrom
mailing list