[U-Boot] incremental environment updating

Wolfgang Denk wd at denx.de
Mon Apr 13 15:06:48 CEST 2009


Dear Jerry Van Baren,

In message <49E335BB.4050609 at ge.com> you wrote:
>
> > - it works only on NOR flash, not on any media that can be accessed
> >   only in blocks
> 
> Not true: the offset merely needs to be aligned to the next block in 
> that case:
>    <next><crc><env><NUL>FFFFFFFFFFFF <next><crc><env><NUL>[undefined]
>    ^^^^ offset of ------------------> ^^^^ 0xFFFFFFFF
> 
> All flash that I can recall seeing allows at least a limited number of 
> rewrites to a block (the limited number getting smaller on successive 
> generations), so two writes to the env start block (once to write the 
> new env, a second time to rewrite the 0xFFFFFFFF to point to the 
> superceeding env).  If the flash didn't support two writes, that would 
> be a show-stopper.  Due to how people use flash, I don't think the 
> number will ever go to one write (IIRC, 4 is typical of current 
> generation NAND).

So what do we save, then? Instead of a single write we now need
actually two...

> > BTW: what was the exact problem we were trying to solve? Saving the
> > time it takes to erase one flash sector?
> > 
> > If we have to pay  for  this  with  introducing  a  new, incompatible
> > environment format, and probably having to handle NOR flash and other
> > storage media differently, I doubt if this is worth the effort.
> 
> That could very well be true.

;-)

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
For every complex problem, there is a solution that is simple,  neat,
and wrong.                                           -- H. L. Mencken


More information about the U-Boot mailing list