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

Zach Sadecki Zach.Sadecki at ripcode.com
Mon Aug 13 21:55:44 CEST 2007


I would like to be able to identify the u-boot version from linux.  At
first this seemed straight-forward, simply enable
CONFIG_VERSION_VARIABLE and use fw_printenv in linux.

This, of course, doesn't work, as 'ver' is not saveenv'ed and
fw_printenv just pulls the info from flash (or whereever).  Writing a
routine in the board init file (last_stage_init) doesn't help, as 'ver'
is set after that is run and therefore the stored version string is the
old one (if an update occurs).

So this is a 2 part question...  What good is the 'ver' env var?  It's
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?

Thanks,
  Zach




More information about the U-Boot mailing list