Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=, In message <1308905261-3780-1-git-send-email-andreas.de...@googlemail.com> you wrote: > This patch deletes the arch specific definitions of version_string in > favour of a single one in cmd_version module (which is always compiled > in). > > Signed-off-by: Andreas BieÃmann <andreas.de...@googlemail.com> > CC: Mike Frysinger <vap...@gentoo.org> > CC: Peter Pan <pppeterpp...@gmail.com> > --- > This is an RFC as discussed in > http://mid.gmane.org/201106162022.09802.vap...@gentoo.org
Sorry, but NAK. The idea is good, but the implementation is serioulsy flawed. ... > diff --git a/arch/powerpc/cpu/74xx_7xx/start.S > b/arch/powerpc/cpu/74xx_7xx/start.S > index f6011fc..5fea39d 100644 > --- 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: On the host: -> xd /tftpboot/tqm8560/u-boot.bin | head -5 0 27051956 552d426f 6f742032 3031302e |' VU-Boot 2010.| 10 31322d30 30313439 2d673662 31656632 |12-00149-g6b1ef2| 20 612d6469 72747920 284d6179 20303420 |a-dirty (May 04 | 30 32303131 202d2032 333a3439 3a343929 |2011 - 23:49:49)| 40 00000000 00000000 00000000 00000000 | | On the target: => md FFFC0000 14 fffc0000: 27051956 552d426f 6f742032 3031302e '..VU-Boot 2010. fffc0010: 31322d30 30313439 2d673662 31656632 12-00149-g6b1ef2 fffc0020: 612d6469 72747920 284d6179 20303420 a-dirty (May 04 fffc0030: 32303131 202d2032 333a3439 3a343929 2011 - 23:49:49) fffc0040: 00000000 00000000 00000000 00000000 ................ I consider this a very useful property and am not willing to give it up. 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: w...@denx.de ######## This message was made from 100% recycled electrons. ######## _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot