[U-Boot-Users] Reading out version_string from a binary
Wolfgang Denk
wd at denx.de
Tue Nov 21 15:47:35 CET 2006
In message <20061121130236.GC3803 at igloo.df.lth.se> you wrote:
>
> 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.
Why make it so complicated?
For me, a simple
strings -a u-boot.bin | grep 'U-Boot '
usually does the job.
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline; filename="ubootver.c"
That's >100 lines of error-prone C code versus 1 line of shell...
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"A fractal is by definition a set for which the Hausdorff Besicovitch
dimension strictly exceeds the topological dimension."
- Mandelbrot, _The Fractal Geometry of Nature_
More information about the U-Boot
mailing list