[U-Boot] a few questions about saving bootcount in the environment
Robert P. J. Day
rpjday at crashcourse.ca
Tue Jul 26 14:49:54 CEST 2016
On Tue, 26 Jul 2016, Wolfgang Denk wrote:
> Dear Robert,
>
> In message <alpine.LFD.2.20.1607260734020.10018 at localhost.localdomain> you wrote:
> >
> > ok, i am now *totally* confused, so let's start at the beginning.
> > it's my understanding that selecting CONFIG_BOOTCOUNT_LIMIT means you
>
> right.
>
> > want to use the boot counter, it does *not* select what method you
> > want to use to store the boot counter, correct? but here's the
> > confusing part.
>
> Which exact part is confusing?
>
> > #ifdef CONFIG_BOOTCOUNT_LIMIT
> > bootcount = bootcount_load();
> > bootcount++;
> > bootcount_store(bootcount);
> > setenv_ulong("bootcount", bootcount); <----- ?????
> > bootlimit = getenv_ulong("bootlimit", 10, 0);
> > #endif /* CONFIG_BOOTCOUNT_LIMIT */
>
> This is only the equivalent of a "setenv", so you have a variable in
> the environment which you can use in scripts or compare against
> "bootlimit".
>
> There is NO automatic "saveenv" here...
ah, you're right, you're right, sorry. little by little ...
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