[U-Boot] a few questions about saving bootcount in the environment
Robert P. J. Day
rpjday at crashcourse.ca
Mon Jul 25 20:41:23 CEST 2016
On Mon, 25 Jul 2016, Wolfgang Denk wrote:
> Dear Robert,
>
> In message <alpine.LFD.2.20.1607251355090.3253 at localhost.localdomain> you wrote:
> >
> > i'm sure i'm asking the obvious, but if every boot to user space is
> > successful, bootcount will have a value of zero each time, yes? so if
> > user space code checks it and it's zero, then, you're done, no need to
> > write.
>
> As Heiko already explained, the update of the boot counter (= read
> from env, increment, rewrite environment to persistent storage) is
> done in U-Boot, and without "upgrade_available" it would happen on
> each and every boot of the system.
>
> The boot counter is implemented in U-Boot - only the resetting is done
> in user space (and requires another write).
whoops, i missed that bit, just trying to catch up now.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
More information about the U-Boot
mailing list