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

Heiko Schocher xeidos at gmx.net
Wed Jul 27 17:10:13 CEST 2016


Hello Robert,

Am 27.07.2016 um 14:03 schrieb Robert P. J. Day:
> 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.

no problem, I saw your response to wolfgang to late ...

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list