[U-Boot] incremental environment updating
Wolfgang Denk
wd at denx.de
Mon Apr 13 15:04:45 CEST 2009
Dear Mike,
In message <200904130834.35359.vapier at gentoo.org> you wrote:
>
> > Since flash can change 1s to 0s, but cannot change them back, you could
> > redefine the env storage to be
> > <next><crc><env><NUL>[undefined]
> > (note the added <next> at the start). By definition, the valid env's
> > <next> =3D=3D 0xFFFFFFFF. To write a new env, simply write the offset of
> > [undefined] into the <next> location and then write a new env lump.
> > <next><crc><env><NUL> <next><crc><env><NUL>[undefined]
> > ^^^^ offset of -----> ^^^^ 0xFFFFFFFF
>
> using a crc of 0x00000000 accomplishes the same thing and retains env format
No, this is not the same. With the offset, you can jump directly to
the next block; with just a "valid" flag you have to scan invalid
copy sequentially to find the end - especially on EEPROM based
storage this is painfully slow (see
http://www.denx.de/wiki/DULG/AN2004_11_BootTimeOptimization).
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
It would seem that evil retreats when forcibly confronted
-- Yarnek of Excalbia, "The Savage Curtain", stardate 5906.5
More information about the U-Boot
mailing list