All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Boot count limit
@ 2011-02-07 13:17 Felix Radensky
  2011-02-07 13:58 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Radensky @ 2011-02-07 13:17 UTC (permalink / raw)
  To: u-boot

Hi,

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 ?

Thanks.

Felix.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] Boot count limit
  2011-02-07 13:17 [U-Boot] Boot count limit Felix Radensky
@ 2011-02-07 13:58 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2011-02-07 13:58 UTC (permalink / raw)
  To: u-boot

Dear Felix Radensky,

In message <4D4FF107.8010400@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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-07 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-07 13:17 [U-Boot] Boot count limit Felix Radensky
2011-02-07 13:58 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.