<div dir="ltr">Hello Salvador,<div>Yes, this is a very useful feature - we've had it in the chromiumos branch for a while now :-)</div><div><br></div><div>I need to read your implementation. Ours is called "fast-verify" which will read and only verify portions of the flash specified with -i arguments.</div><div><br></div><div>It will also restore content surrounding regions (to address Michael's concern) by aligning the bytes read with the erase size. So if you wish to change a small amount of content within an eraseable block, the entire block will be read and erased. The region specified with -i will be written with new content, and the remaining bytes within the block will have the old content restored.</div><div><br></div><div>Here's our tree in case you'd like to take a look: <a href="https://chromium.googlesource.com/chromiumos/third_party/flashrom/">https://chromium.googlesource.com/chromiumos/third_party/flashrom/</a><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 19, 2016 at 10:48 AM, Salvador Eduardo Tropea <span dir="ltr"><<a href="mailto:salvador@inti.gob.ar" target="_blank">salvador@inti.gob.ar</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All!<br>
<br>
Now I'm using an FPGA board with 4 MiB of flash, was using one with 128 kiB. So now the time to read/write/verify the whole memory is enough to annoy me ;-)<br>
So I tried creating a layout like this:<br>
<br>
<--<br>
00000000:00007e2b fpga<br>
00007e2c:003fffff free<br>
<--<br>
<br>
Note: yes only 32300 bytes used, the rest can be used for other purposes (0,77%).<br>
<br>
And then I used "-i fpga".<br>
But it didn't help ... flashrom read the 4 MiB twice (one at the beggining and another for the verification).<br>
Looking at the code I found a variable named read_all_first with a comment about the lack of implementation.<br>
So I implemented the needed code to:<br>
1) Add a command line option to make it 0 (avoiding the big reads). This option can be used only when at least one image is indicated with -i<br>
2) Skip the big read when read_all_first is 0. Only the regions indicated by the user are actually fetched from the memory.<br>
3) Same for the verification stage.<br>
<br>
Additionally I added a command line option to show the progress, very usefull for big memories (and impatient users ;-).<br>
<br>
Are these additions desired in the project? If yes: I want to discuss the implementation details. If no: I'll just keep them for my use.<br>
<br>
Regards, SET<br>
<br>
-- <br>
Ing. Salvador Eduardo Tropea          <a href="http://utic.inti.gob.ar/" rel="noreferrer" target="_blank">http://utic.inti.gob.ar/</a><br>
INTI - Micro y Nanoelectrónica (CMNB) <a href="http://www.inti.gob.ar/" rel="noreferrer" target="_blank">http://www.inti.gob.ar/</a><br>
Unidad Técnica Sistemas Inteligentes  Av. General Paz 5445<br>
Tel: <a href="tel:%28%2B54%2011%29%204724%206300%20ext.%206919" value="+541147246300" target="_blank">(+54 11) 4724 6300 ext. 6919</a>     San Martín - B1650KNA<br>
FAX: <a href="tel:%28%2B54%2011%29%204754%205194" value="+541147545194" target="_blank">(+54 11) 4754 5194</a>               Buenos Aires * Argentina<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
flashrom mailing list<br>
<a href="mailto:flashrom@flashrom.org" target="_blank">flashrom@flashrom.org</a><br>
<a href="https://www.flashrom.org/mailman/listinfo/flashrom" rel="noreferrer" target="_blank">https://www.flashrom.org/mailman/listinfo/flashrom</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">David Hendricks (dhendrix)<br>Systems Software Engineer, Google Inc.</div>
</div>