Flashing wrong image into partition using DFU

Werner Almesberger werner at openmoko.org
Sun Mar 4 08:33:59 CET 2007


Harald Welte wrote:
> then let's add some safeguard against this.

Okay :-)
  
> DFU actually specifies something like this.  It also has error handling
> for that case (i.e. we can report back that this file is not suitable
> for the device).  This is also useful for u-boot revisions that don't
> match the hardware revision (prevenging Bv2 uboot to be flashed to Bv3
> device, etc).

That sounds useful, yes. Can this be done in a way that's compatible
with present DFU support in u-boot ? (E.g., as optional data, which is
currently ignored, or at least as a protocol revision that's rejected.)
I guess I'll have to read that spec some day :-)

> this is because you cannot list interfaces in DFU mode until you have
> switched from Runtime to DFU.

Ah, now I got it. Being able to get the listing only after you've tried
to perform an up-/download is a bit counter-intuitive, but, say,
specifying an invalid file name will accomplish the switch nicely, if
one is interested in manually poking around.

> However, matching partition names with some argument from the
> commandline is not a problem at all, given that at that point we know
> that we actually want to do up/download, i.e. more than just listing.

Indeed. Patch for your consideration is in SVN,
developers/werner/dfu-util-alt-by-name.patch

Cheers, Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina     werner at almesberger.net /
/_http://www.almesberger.net/____________________________________________/



More information about the openmoko-uboot mailing list