[flashrom] flashrom ignoring ROM layout region

Mark Marshall markmarshall14 at gmail.com
Fri Feb 8 11:08:21 CET 2013


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

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

I've also found that flashrom doesn't always do what I expect, and I'm not
sure if this is
by design or not.  for instance, if I want to erase my entire flash chip,
it ends up calling
the sector erase on each sector, not by doing a chip-erase?  Are these
types of things
written down anywhere?

Thanks for any help,

Mark M.

On 8 February 2013 07:25, Stefan Tauner
<stefan.tauner at student.tuwien.ac.at>wrote:

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

More information about the flashrom mailing list