public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] extracting u-boot version from Linux
@ 2010-02-18 23:47 Parks, Derek
  2010-02-19  8:50 ` Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: Parks, Derek @ 2010-02-18 23:47 UTC (permalink / raw)
  To: u-boot

Hello all,

 

Newbie to u-boot here!  I have read basic user and command manuals and
could not find a solution:

 

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?

 

Thanks!!

 

 

 

 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] extracting u-boot version from Linux
  2010-02-18 23:47 [U-Boot] extracting u-boot version from Linux Parks, Derek
@ 2010-02-19  8:50 ` Wolfgang Denk
  2010-02-19 20:23   ` Michael Zaidman
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2010-02-19  8:50 UTC (permalink / raw)
  To: u-boot

Dear "Parks, Derek",

In message <821B2170E9E7F04FA38DF7EC21DE487119EF645A@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/ .

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Everyting looks interesting until you do it. Then you find it's  just
another job.                     - Terry Pratchett, _Moving Pictures_

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] extracting u-boot version from Linux
  2010-02-19  8:50 ` Wolfgang Denk
@ 2010-02-19 20:23   ` Michael Zaidman
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Zaidman @ 2010-02-19 20:23 UTC (permalink / raw)
  To: u-boot

On Fri, Feb 19, 2010 at 10:50 AM, Wolfgang Denk <wd@denx.de> wrote:
> Dear "Parks, Derek",
>
> In message <821B2170E9E7F04FA38DF7EC21DE487119EF645A@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-19 20:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-18 23:47 [U-Boot] extracting u-boot version from Linux Parks, Derek
2010-02-19  8:50 ` Wolfgang Denk
2010-02-19 20:23   ` Michael Zaidman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox