[U-Boot-Users] make env

Markus Klotzbücher mk at denx.de
Sun Apr 6 19:37:32 CEST 2008


Manuel Sahm <Manuel.Sahm at feig.de> writes:

> how does uboot handle this flag byte ? (i I use redundant nand)

As you can't invalidate the old NAND environment as you can with NOR
flash, counters are used instead. So for NAND, the flag byte is a
counter which gets incremented for each write. This means the
environment with the flag containing the larger value is the valid one,
except for the case when the counter overflows and the valid environment
flag holds the value 0 and the former one 255.

Actually it would make sense to use this technique for NOR flash
identically, as it would avoid one write access to the flash.

Check out common/env_nand.c for details.

Best regards

Markus Klotzbuecher

--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de




More information about the U-Boot mailing list