[U-Boot] A command to discard saved environments?
Wolfgang Denk
wd at denx.de
Thu Aug 4 07:40:03 CEST 2016
Dear James,
In message <d18f75c7-388b-b607-ed70-64a250320d5a at gmail.com> you wrote:
>
> > In your case, you could save the "erase" by overwriting the first 4
> > bytes (where the CRC32 checksum is stored) with 0xFFFFFFFF.
Wrong. I meant writing 0x00000000 - as you can always write that,
setting any remaining 1 bits to 0 which does not require an erase of
the sector.
> In the case of my NOR flash storage, telling erase to do one byte
> actually causes the erasure of an entire flash sector, which we've
> reserved for the NV environment. You are of course correct that
> overwriting the CRC will have the same operational effect.
...and as the next "saveenv" will start with an erase, writing 0 to
the CRC 32 field saves you one erase cycle on that sector.
I know, this is nitpicking. Soryy.
> It's a rare occurrence that we need to do this, we don't use this sort
> of operation as a normal part of doing business.
Agreed. This should never be part of regular operation.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
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
Microsoft Multitasking:
several applications can crash at the same time.
More information about the U-Boot
mailing list