[U-Boot] Boot count limit

Wolfgang Denk wd at denx.de
Mon Feb 7 14:58:49 CET 2011


Dear Felix Radensky,

In message <4D4FF107.8010400 at embedded-sol.com> you wrote:
> 
> The current implementation of boot count limit feature
> relies on the availability of registers/memory that preserve
> their value across reboot. Unfortunately there's no such
> thing my board. I was thinking of using u-boot environment
> on NOR to store intermediate boot count value and clear it
> in linux via fw_setenv. Is there any problem with this approach ?

Yes - speed, reliability and wear.

First, it requires that you run a saveenv at least once per boot up.
This slows down your boot procedure. Also, it will quickly wear your
flash as you collect erase/program cycles.  Third, I always feel it is
a bad design to perform such actions routinely, without explicit
control of the user.  You may quickly collect lots of random data in
your environment, or even unwanted settings.

Try to find enother way.  Maybe you have SRAM or MRAM or ERPROM or
some free register in your RTC in your PHY or ... Be creative!

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
Put your Nose to the Grindstone!
                 -- Amalgamated Plastic Surgeons and Toolmakers, Ltd.


More information about the U-Boot mailing list