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

Zach Sadecki Zach.Sadecki at ripcode.com
Mon Aug 13 22:26:54 CEST 2007


> > 
> > This, of course, doesn't work, as 'ver' is not saveenv'ed and
> 
> What makes you think so? saveenv does not do any filtering to exclude
> any variable, so of course it gets saved, too.

It does, but only if you explicitly call 'saveenv'...  It does not store
on it's own.

> 
> > So this is a 2 part question...  What good is the 'ver' env 
> var?  It's
> 
> To print the U-Boot version without need to reset the board.

But you can print it using 'version', too...  And unless you explictly
save it,
the 'ver' env var does nothing more for you than the 'version' command,
as it 
Can't be accessed anywhere other then from the u-boot command prompt...

> 
> > apparently only useful in u-boot itself and u-boot already has a
> > 'version' command that gives you the same info.  And 
> second, I'm sure
> > I'm not the first person to want to see u-boot version in 
> linux, so how
> > have other accomplished this?
> 
> Just read the "ver" variable.

If you don't explicitly 'saveenv' there is no 'ver' variable to read
from linux...
And it can't be good for the flash to force u-boot to save on every
boot.

So if I update (from linux for example) 'ver' doesn't get updated unless
u-boot is
doing a saveenv on every boot...

Thanks,
	Zach




More information about the U-Boot mailing list