From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Fri, 19 Feb 2010 09:50:43 +0100 Subject: [U-Boot] extracting u-boot version from Linux In-Reply-To: <821B2170E9E7F04FA38DF7EC21DE487119EF645A@VCAEXCH01.hq.corp.viasat.com> References: <821B2170E9E7F04FA38DF7EC21DE487119EF645A@VCAEXCH01.hq.corp.viasat.com> Message-ID: <20100219085043.2665DE75F36@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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_