
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 <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