[flashrom] Add option to disable the reading back of the flash contents at write operation

David Hendricks dhendrix at google.com
Fri Dec 11 21:52:05 CET 2015


Hi Marton,
I respectfully disagree with this approach. Reading the old contents is not
just used for backup. It's used so that flashrom can selectively erase and
write blocks which usually saves time because erase and write operations
are orders of magnitude slower than reads on NOR flash.

So, it's not a bad thing to support this option, but I think there is
little benefit and can actually make the process slower in most cases.
(Your case might be different, of course)

Nico Huber's unbounded read patch should help reduce the initial read time
by a large factor (~90% reduction). Try marking your chip as tested for
unbounded reads. You might find that the read and selective erase/write is
faster than unconditional erase/write.


On Fri, Dec 11, 2015 at 12:01 PM, Márton Miklós <martonmiklosqdev at gmail.com>
wrote:

> Hello all,
>
> I am using the flashrom with an external programmer to flash various SPI
> flashes a lot.
> In most cases I do not care about the old flash contents when flashing, so
> the "*Reading old flash chip contents*" step does not have any added
> value in my use cases. The code also has a FIXME note where this is
> hardcoded to make it configurable in the future. I would like to patch it
> if possible.
>
> Please propose me command line arguments for disabling it. My proposal:
> *-N | --nobackup  skip reading back old flash contents before write*
>
> I know -N could be confused with -n but the same applies to the -v
> (verify) and -V (verbose).
> I also could live without the short argument, but that would break the
> "standard".
>
> Thanks in advance for your feedback!
>
> --
> Regards,
> Miklos Marton
>
>
> _______________________________________________
> flashrom mailing list
> flashrom at flashrom.org
> http://www.flashrom.org/mailman/listinfo/flashrom
>



-- 
David Hendricks (dhendrix)
Systems Software Engineer, Google Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20151211/5125f03c/attachment.html>


More information about the flashrom mailing list