[U-Boot-Users] Using 'ver' env var

Ulf Samuelsson ulf at atmel.com
Tue Aug 14 07:02:21 CEST 2007


> In message <5CBE65F7D9232C47861CB09B0954861C66A961 at MAIL.infinitychannel.local> you wrote:
>>
>>   I was thinking this already..  I just thought that I was missing
>> something which is why I asked the questions.  I'll send a patch to
>> the group for review later.
> 
> Don't bother to do that. I will not accept patches that automatically
> save the environment. U-Boot shall only act  on  user's  request  and
> never to any magical things behind my back.
> 
> If you want this function,  it  can  be  implemented  using  U-Boot's
> scripting capabilities, so there is no need for a patch.
> 

You assume that there is no users request, but there is.
If you, from Linux, are upgrading the U-Boot, you could
*if you wanted to*, interpret this as an indirect
request to update the "ver" variable.

This should only happen right after boot and before the user has any chance to
update anything else, so that only the "ver" variable is updated by this save. 

The drawback of this is that a user will not be able to have a ver variable
which differs from the version. As soon as a user does

setenv ver <whatever>

U-Boot will revert that at the next change.

----------------
If U-Boot supported a read only environment area (generated at compile time)
then there would be no need for  doing things behind your back.

If that is not acceptable, then the only way forward I see
is that Linux writes a new version of the bootcmd to the environment
so that the request is made explicit.

This requires that the user can write the current version to "ver"
from a command.


> Thanks.
> 
> Best regards,
> 
> Wolfgang Denk
> 
> -- 


Best Regards
Ulf Samuelsson





More information about the U-Boot mailing list