[U-Boot] a few questions about saving bootcount in the environment

Wolfgang Denk wd at denx.de
Mon Jul 25 16:36:57 CEST 2016


Dear Tom,

I wrote:

> Agreed.  Let me rephrase the warning, then: it is always a good idea
> to minimize the number of writes to the environment, especially when
> done automagically.  One should at least avoid to re-write it on every
> boot, especially when storage is some (flash based) storage device
> with a limited number of erase/write cycles.  And even on other stoage
> each write access includes the risk of errors.

And of course access to the environment in inherently much slower than
a register write. This may not matter in many cases, but when
optimizing boot time it may be important, too.

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
Some people march to the beat of a different drummer. And some people
tango!


More information about the U-Boot mailing list