[U-Boot] extracting u-boot version from Linux

Michael Zaidman michael.zaidman at gmail.com
Fri Feb 19 21:23:12 CET 2010


On Fri, Feb 19, 2010 at 10:50 AM, Wolfgang Denk <wd at denx.de> wrote:
> Dear "Parks, Derek",
>
> In message <821B2170E9E7F04FA38DF7EC21DE487119EF645A at VCAEXCH01.hq.corp.viasat.com> you wrote:
>>
>> I have an c++ application that needs to display various versions of
>> system components; u-boot, kernel, O/S flavor, hardware and software
>> versions.  I'm struggling with getting the u-boot version and ask for
>> your help.  My ideal situation is to have U-boot report (somehow) to
>> Linux it's version number and have Linux store it in environment
>> variables.  Any thoughts?
>
> When CONFIG_VERSION_VARIABLE is set in your board config file, then
> U-Boot will set the "ver" envrionment variable to the current version
> ID string. If you run "saveenv" at least once, then you can read this
> string from the U-Boot environment under Linux, using the fw_getenv
> tool / function provided in tools/env/ .
>

It is possible also to pass U-Boot version to Linux by adding it to
the "bootargs" as additional argument unrecognized by Linux.
Afterwards, it can be retrieved from /proc/cmdline.

Regards,
Michael


More information about the U-Boot mailing list