[flashrom] Contribution: option to disable read_all_first

Willy Tarreau w at 1wt.eu
Mon Sep 14 20:18:50 CEST 2015


Hi David,

On Mon, Sep 14, 2015 at 11:10:31AM -0700, David Hendricks wrote:
> Hi Willy,
> You might be interested in another approach that is used in the chromium
> branch <https://chromium.googlesource.com/chromiumos/third_party/flashrom>.
> The "--diff" longopt allows the user to supply a file to diff against the
> -w argument. This is useful in cases where the user wishes to skip the
> initial read step, and flashrom will figure out which blocks need to be
> erased and written thereby eliminating unnecessary erase/write operations
> as well.
> 
> There is some documentation for it here:
> https://sites.google.com/a/chromium.org/dev/chromium-os/packages/cros-flashrom#TOC-Speeding-Up-Writes

Thank you I'll take a look at it, it can indeed be another solution. The
only thing is that it requires the creation of an extra file and I tend to
find that it's not always convenient to have to create files for known
patterns. However I think that it would be possible based on your
approach to provide an option to replace the file with a known pattern
for some cases (eg: full of 0xff or full of 0x00, which could be called
"assume-clean" or "assume-dirty"), which would achieve the same result
and at the same time not change the spirit of your latest work.

Best regards,
Willy





More information about the flashrom mailing list