Hi.<br><br>I too would love for these changes to go in.  I'm currently working with a 64MB flash, and<br>I've got a number of problems, one of which is that flashrom tries to read the entire flash <br>before doing anything (which will never be what I want...).<br>

<br>The other problems are:<br>- That most of flashrom seems to be limited to 2^24 address bits.<br>  (this is relatively easy to fix)<br>- That flashrom thinks a page is always 256 byes (I think I've found <br>  most cases of this, but I'm not sure.  What's the granularity flag<br>

  for?<br><br>I've also found that flashrom doesn't always do what I expect, and I'm not sure if this is <br>by design or not.  for instance, if I want to erase my entire flash chip, it ends up calling <br>the sector erase on each sector, not by doing a chip-erase?  Are these types of things <br>
written down anywhere?<br><br>Thanks for any help,<br><br>Mark M.<br><br><br><br><div class="gmail_quote">On 8 February 2013 07:25, Stefan Tauner <span dir="ltr"><<a href="mailto:stefan.tauner@student.tuwien.ac.at" target="_blank">stefan.tauner@student.tuwien.ac.at</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, 7 Feb 2013 16:09:45 -0800<br>
John Gainsborough <<a href="mailto:jgindc1@gmail.com" target="_blank">jgindc1@gmail.com</a>> wrote:<br>
<br>
> Hi Stefan.<br>
><br>
> I am now attempting to write to a flashrom using the layout/region<br>
> approach. I need to write a region from a 4MB ROM to the beginning of an<br>
> 8MB ROM.<br>
> The region image from the 4MB ROM is 4,128,768 bytes == 0x3f0000 long and<br>
> this file is called image1.<br>
> I have defined the 8MB ROM layout in file called romlayout_8MB to be:<br>
><br>
> 000000:3effff main<br>
> 3f0000:7fffff remainder<br>
><br>
> i.e I want to place the contents of file image1 in to the 8MB ROM region<br>
> defined as main.<br>
><br>
> I invoked flashrom as follows:<br>
><br>
> flashrom -p buspirate_spi:dev=/dev/ttyUSB0,spispeed=250k -l romlayout_8MB<br>
> -i main -w image1<br>
><br>
> The flash ROM is detected correctly, delay calculated, but then flashrom<br>
> immediately returns the error:<br>
> "image size doesn't match".<br>
><br>
> As always, guidance/suggestions gratefully received.<br>
<br>
That's one of the other things my patches fix :)<br>
The image you supply with -v/-r/-w is always used to present a mapping<br>
of the whole chip. The layout information is only used to select the<br>
address range inside that mapping. So for vanilla flashrom you have to<br>
create an 8MB file and fill the first 4MB with the content you want and<br>
continue as you have done.<br>
<br>
With my patches one can add an image name to any -i parameter (e.g. -i<br>
main:main.img) which is then mapped to the corresponding offset. IIRC<br>
one has still to supply a whole image with the correct size, but if the<br>
needed ranges are also present as "-i images" then it would not be used<br>
at all. Similar for the read operations: it would create a whole image<br>
with a lot of 0xFFs outside the selected regions and smaller/exact<br>
files for the "-i images".<br>
<br>
Maybe I have some time at the weekend to integrate the patches. I think<br>
there is consensus that we want them in and they have been tested by a<br>
number of people, so i think it should not break too much :)<br>
<span><font color="#888888">--<br>
Kind regards/Mit freundlichen Grüßen, Stefan Tauner<br>
<br>
_______________________________________________<br>
flashrom mailing list<br>
<a href="mailto:flashrom@flashrom.org" target="_blank">flashrom@flashrom.org</a><br>
<a href="http://www.flashrom.org/mailman/listinfo/flashrom" target="_blank">http://www.flashrom.org/mailman/listinfo/flashrom</a></font></span></blockquote></div><br>