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

Robert P. J. Day rpjday at crashcourse.ca
Wed Jul 27 14:03:49 CEST 2016


On Tue, 26 Jul 2016, Heiko Schocher wrote:

... snip ...

> > it appears that, no matter what, the environment *is* updated
> > every single time because of this line in the bootdelay_process()
> > routine:
> >
> >    setenv_ulong("bootcount", bootcount);
> >
> > why? it seems, from the above, that no matter what boot counter
>
> Yes, the bootcount variable gets set here ... but the environment
> gets not written...
>
> > mechanism you use, the environment will be updated because of that
> > line.
>
> The Environment gets written when saveenv() gets called ... or?

... snip ...

  yes, i already apologized to wolfgang for being so clueless, i
didn't see the difference between "setenv" and "saveenv". anyway, i'm
still writing a wiki page on this that i can use for future embedded
linux classes, so ... onward.

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