[U-Boot-Users] Reading out version_string from a binary

Markus Klotzbücher mk at denx.de
Tue Nov 21 15:11:57 CET 2006

Hi Frederik,

Fredrik Roubert <fredrik.roubert at barco.com> 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)


Markus Klotzbuecher

More information about the U-Boot mailing list