Hello David,

Thank you for your response!

Your answer makes sense for me. In this case it would be useful to refactor the "backupless" writes to read sectors only until a non 0xFF portion found, and then mark that sector erasable or erase immediately. In the case if the flash has non blank region this could speed up the programming, worst case (programming a fully erased chip) it is going to be equal in time.

I have not been aware of Nico's patch. Is it already merged to the mainline? If not could you please give me a link to that?
Thank you!

Regards,
Miklos Marton

2015-12-11 21:52 keltezéssel, David Hendricks írta:
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 <martonmiklosq...@gmail.com <mailto:martonmiklosq...@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@flashrom.org <mailto:flashrom@flashrom.org>
    http://www.flashrom.org/mailman/listinfo/flashrom




--
David Hendricks (dhendrix)
Systems Software Engineer, Google Inc.

_______________________________________________
flashrom mailing list
flashrom@flashrom.org
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to