[U-Boot] [PATCH/RFC] unify version_string

Andreas Bießmann andreas.devel at googlemail.com
Fri Jun 24 21:48:45 CEST 2011


Dear Mike Freysinger,

Am 24.06.2011 um 19:43 schrieb Mike Frysinger:

> On Fri, Jun 24, 2011 at 08:18, Wolfgang Denk wrote:
>>> --- a/arch/powerpc/cpu/74xx_7xx/start.S
>>> +++ b/arch/powerpc/cpu/74xx_7xx/start.S
>> ...
>>>       .text
>>>       .long   0x27051956              /* U-Boot Magic Number          */
>>> -     .globl  version_string
>>> -version_string:
>>> -     .ascii  U_BOOT_VERSION
>>> -     .ascii  " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
>>> -     .ascii  CONFIG_IDENT_STRING, "\0"
>> 
>> On PowerPC systems, the core is carefully consructed such that the
>> U-Boot image starts with the magic number, followed immediately by
>> the version string. That means, you can trivially identify any binary
>> image, be it as file on the host or on the target, or programmed into
>> flash, but just dumping the first bytes of it, for example:
> 
> cant you do this with a linker script update ?


that would be great. But I need help for that cause I do not have a ppc toolchain nor a ppc target to test it.

Some thoughts about a link time solution:
We need a blob containing just the version_string, another blob
containing the ppc magic number and some linker tweaks to get them both placed before the start.S stuff.
Then we need also some make-level distinction to have the version_string blob in some common library
for all other architectures.

regards

Andreas Bießmann


More information about the U-Boot mailing list