From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus =?iso-8859-1?Q?Klotzb=FCcher?= Date: Tue, 21 Nov 2006 15:11:57 +0100 Subject: [U-Boot-Users] Reading out version_string from a binary In-Reply-To: <20061121130236.GC3803@igloo.df.lth.se> (Fredrik Roubert's message of "Tue, 21 Nov 2006 14:02:36 +0100") References: <20061121130236.GC3803@igloo.df.lth.se> Message-ID: <877ixoubwy.fsf@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 Hi Frederik, Fredrik Roubert writes: > I use U-Boot (1.1.4) on a custom PowerPC (MPC8347) based board, and from > my application I need to read out the value of version_string from the > U-Boot binary, for logging. I've written some code that does this (see > attached sample program), but would like some comments if someone has > suggestions on how to do it more robust. ... > Does anyone have ideas about a better way to do this? If it doesn't have to be in C you could do something like $ strings < u-boot.bin | grep "U-Boot \([0-9]\.\)\{2\}[0-9]-" VU-Boot 1.1.6-g13e2fe54 (Nov 21 2006 - 11:37:26) Regards Markus Klotzbuecher