From: Wolfgang Denk Date: Mon, 13 Apr 2009 15:04:45 +0200 Subject: [U-Boot] incremental environment updating In-Reply-To: <200904130834.35359.vapier@gentoo.org> References: <200904130609.08060.vapier@gentoo.org> <200904130634.49617.vapier@gentoo.org> <49E32C3C.8090404@ge.com> <200904130834.35359.vapier@gentoo.org> Message-ID: <20090413130445.8003A83420E8@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Mike, In message <200904130834.35359.vapier@gentoo.org> you wrote: > > > Since flash can change 1s to 0s, but cannot change them back, you could > > redefine the env storage to be > > [undefined] > > (note the added at the start). By definition, the valid env's > > =3D=3D 0xFFFFFFFF. To write a new env, simply write the offset of > > [undefined] into the location and then write a new env lump. > > [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