]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
unify version_string
authorAndreas Bießmann <andreas.devel@googlemail.com>
Mon, 18 Jul 2011 18:24:04 +0000 (20:24 +0200)
committerWolfgang Denk <wd@denx.de>
Thu, 28 Jul 2011 15:22:53 +0000 (17:22 +0200)
This patch removes the architecture specific implementation of
version_string where possible. Some architectures use a special place
and therefore we provide U_BOOT_VERSION_STRING definition and a common
weak symbol version_string.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
CC: Mike Frysinger <vapier@gentoo.org>
CC: Peter Pan <pppeterpppan@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
34 files changed:
arch/arm/lib/board.c
arch/avr32/lib/board.c
arch/blackfin/lib/board.c
arch/m68k/cpu/mcf5227x/start.S
arch/m68k/cpu/mcf523x/start.S
arch/m68k/cpu/mcf52x2/start.S
arch/m68k/cpu/mcf532x/start.S
arch/m68k/cpu/mcf5445x/start.S
arch/m68k/cpu/mcf547x_8x/start.S
arch/microblaze/lib/board.c
arch/mips/lib/board.c
arch/nios2/cpu/start.S
arch/powerpc/cpu/74xx_7xx/start.S
arch/powerpc/cpu/mpc512x/start.S
arch/powerpc/cpu/mpc5xx/start.S
arch/powerpc/cpu/mpc5xxx/start.S
arch/powerpc/cpu/mpc8220/start.S
arch/powerpc/cpu/mpc824x/start.S
arch/powerpc/cpu/mpc8260/start.S
arch/powerpc/cpu/mpc83xx/start.S
arch/powerpc/cpu/mpc85xx/start.S
arch/powerpc/cpu/mpc86xx/start.S
arch/powerpc/cpu/mpc8xx/start.S
arch/powerpc/cpu/mpc8xx/video.c
arch/powerpc/cpu/ppc4xx/start.S
arch/sh/lib/board.c
arch/sparc/cpu/leon2/start.S
arch/sparc/cpu/leon3/start.S
arch/x86/lib/board.c
common/cmd_version.c
common/main.c
drivers/video/cfb_console.c
include/version.h
lib/display_options.c

index bcbf697b566b8b729edb4356217a4a48033fdd84..90709d075a7624a09f210d72d59eefce24f934b7 100644 (file)
@@ -42,7 +42,6 @@
 #include <command.h>
 #include <malloc.h>
 #include <stdio_dev.h>
-#include <timestamp.h>
 #include <version.h>
 #include <net.h>
 #include <serial.h>
@@ -70,13 +69,6 @@ extern int  AT91F_DataflashInit(void);
 extern void dataflash_print_info(void);
 #endif
 
-#ifndef CONFIG_IDENT_STRING
-#define CONFIG_IDENT_STRING ""
-#endif
-
-const char version_string[] =
-       U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")"CONFIG_IDENT_STRING;
-
 #ifdef CONFIG_DRIVER_RTL8019
 extern void rtl8019_get_enetaddr (uchar * addr);
 #endif
index 5edef8fd398bae1564349ebfcdaf4b093d5ee20f..e69f8d184e9eff8543f2d67aada3051c84416e47 100644 (file)
@@ -23,7 +23,6 @@
 #include <command.h>
 #include <malloc.h>
 #include <stdio_dev.h>
-#include <timestamp.h>
 #include <version.h>
 #include <net.h>
 
@@ -41,9 +40,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-const char version_string[] =
-       U_BOOT_VERSION " ("U_BOOT_DATE" - "U_BOOT_TIME") " CONFIG_IDENT_STRING;
-
 unsigned long monitor_flash_len;
 
 /* Weak aliases for optional board functions */
index 362b8c47eaa9143fe73fcf04bd80ef1c12d396dd..7c33893e39b36f8d1b39f1a99ea19a1e6c397a8b 100644 (file)
@@ -16,7 +16,6 @@
 #include <malloc.h>
 #include <mmc.h>
 #include <net.h>
-#include <timestamp.h>
 #include <status_led.h>
 #include <version.h>
 
@@ -39,8 +38,6 @@ int post_flag;
 
 DECLARE_GLOBAL_DATA_PTR;
 
-const char version_string[] = U_BOOT_VERSION " ("U_BOOT_DATE" - "U_BOOT_TIME")";
-
 __attribute__((always_inline))
 static inline void serial_early_puts(const char *s)
 {
index d09d49274ebc188c6e864483c9ff7d3d5357f457..c5096a80c204dcb4aeeef864389140ca8ee46f87 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <asm-offsets.h>
 #include <config.h>
-#include <timestamp.h>
 #include "version.h"
 #include <asm/cache.h>
 
@@ -508,7 +507,5 @@ _int_handler:
 
        .globl  version_string
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
        .align 4
index a726b59846dc2a16ed6997d5554d38cac50e841e..e6a69ab470cb0c71661acb7a90ceb4cf4e69fa7f 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <asm-offsets.h>
 #include <config.h>
-#include <timestamp.h>
 #include "version.h"
 #include <asm/cache.h>
 
@@ -270,7 +269,5 @@ _int_handler:
 
        .globl  version_string
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
        .align 4
index f0cfa6ffe059ebe28940eb5994d9fca89ec2ea63..ee17792cb391ca3a485a8e27834b180fb81965d7 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <asm-offsets.h>
 #include <config.h>
-#include <timestamp.h>
 #include "version.h"
 #include <asm/cache.h>
 
@@ -330,7 +329,5 @@ _int_handler:
 
        .globl  version_string
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
        .align 4
index 53ac471a416905352622ed16581eb174d004a516..fe98d76474af37aefb37c3a7bcab499e7db0faf4 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <asm-offsets.h>
 #include <config.h>
-#include <timestamp.h>
 #include "version.h"
 #include <asm/cache.h>
 
@@ -283,7 +282,5 @@ _int_handler:
 /*------------------------------------------------------------------------------*/
        .globl  version_string
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
        .align 4
index 5255f374d5e6b3ec8977d8b38cd9728dd7982210..99060141d883b40d27b05f5197fadb14f05bd5e1 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <asm-offsets.h>
 #include <config.h>
-#include <timestamp.h>
 #include "version.h"
 #include <asm/cache.h>
 
@@ -540,7 +539,5 @@ _int_handler:
 
        .globl  version_string
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
        .align 4
index e30923fac7f33c24ea3987e50dcdebf064dc60c1..ec65cae3d88d4bace978e8cbf94b6eab3e20b9a7 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <asm-offsets.h>
 #include <config.h>
-#include <timestamp.h>
 #include "version.h"
 #include <asm/cache.h>
 
@@ -277,7 +276,5 @@ _int_handler:
 
        .globl  version_string
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
        .align 4
index c5f7ac47331a330e3ec482e0b1010ade9a680533..d97543b2d8b443d0d66e5a8d7f8b095a0533b6c7 100644 (file)
@@ -27,7 +27,6 @@
 #include <common.h>
 #include <command.h>
 #include <malloc.h>
-#include <timestamp.h>
 #include <version.h>
 #include <watchdog.h>
 #include <stdio_dev.h>
@@ -35,8 +34,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-const char version_string[] = U_BOOT_VERSION " ("U_BOOT_DATE" - "U_BOOT_TIME")";
-
 #ifdef CONFIG_SYS_GPIO_0
 extern int gpio_init (void);
 #endif
index 623c4d7f0d58a2ee0018c3dbecfdf2ed07c51e04..4f85bbdab2799307641b7e9b5aed1953b0744d44 100644 (file)
@@ -25,7 +25,6 @@
 #include <command.h>
 #include <malloc.h>
 #include <stdio_dev.h>
-#include <timestamp.h>
 #include <version.h>
 #include <net.h>
 #include <environment.h>
@@ -50,9 +49,6 @@ extern ulong uboot_end;
 
 ulong monitor_flash_len;
 
-const char version_string[] =
-       U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")";
-
 static char *failed = "*** failed ***\n";
 
 /*
index bf5d6724985bc50213526fc0eebe4d5cf775c4ba..0f4ab286b925d19f87cca0247fd7aaae4d059215 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <asm-offsets.h>
 #include <config.h>
-#include <timestamp.h>
 #include <version.h>
 
 /*************************************************************************
@@ -196,14 +195,8 @@ dly_clks:
        bge     r4, r0, dly_clks
        ret
 
-
-#if !defined(CONFIG_IDENT_STRING)
-#define CONFIG_IDENT_STRING ""
-#endif
        .data
        .globl  version_string
 
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
index f6011fcaa8c1e654ac13edafa012bc8e2296b072..75fb77389468fa1bc6c7e33fecdf8ecbe0c26ccf 100644 (file)
@@ -35,7 +35,6 @@
 #include <asm-offsets.h>
 #include <config.h>
 #include <74xx_7xx.h>
-#include <timestamp.h>
 #include <version.h>
 
 #include <ppc_asm.tmpl>
 #include <galileo/gt64260R.h>
 #endif
 
-#ifndef  CONFIG_IDENT_STRING
-#define  CONFIG_IDENT_STRING ""
-#endif
-
 /* We don't want the  MMU yet.
 */
 #undef MSR_KERNEL
@@ -89,9 +84,7 @@
        .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"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
        . = EXC_OFF_SYS_RESET
        .globl  _start
index 9c2e4885dedbfdb89ab2515952bda60c1f217cf7..ed362d87aa440ee04b2c9cb347fde923ccbcd5f8 100644 (file)
@@ -31,7 +31,9 @@
 
 #include <asm-offsets.h>
 #include <config.h>
-#include <timestamp.h>
+#ifndef  CONFIG_IDENT_STRING
+#define  CONFIG_IDENT_STRING "MPC512X"
+#endif
 #include <version.h>
 
 #define CONFIG_521X    1               /* needed for Linux kernel header files*/
 #include <asm/mmu.h>
 #include <asm/u-boot.h>
 
-#ifndef  CONFIG_IDENT_STRING
-#define  CONFIG_IDENT_STRING "MPC512X"
-#endif
-
 /*
  * Floating Point enable, Machine Check and Recoverable Interr.
  */
@@ -89,9 +87,7 @@
        .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"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
 /*
  * Vector Table
index cc11c8fc528537a1b4f39dd3d20e7e3f5aca92a3..cc4c33ebbd1041962449a220a653d50e4ad2c681 100644 (file)
@@ -33,7 +33,6 @@
 #include <asm-offsets.h>
 #include <config.h>
 #include <mpc5xx.h>
-#include <timestamp.h>
 #include <version.h>
 
 #define CONFIG_5xx 1           /* needed for Linux kernel header files */
 #include <asm/processor.h>
 #include <asm/u-boot.h>
 
-#ifndef  CONFIG_IDENT_STRING
-#define  CONFIG_IDENT_STRING ""
-#endif
-
 /* We don't have a MMU.
 */
 #undef MSR_KERNEL
@@ -82,9 +77,7 @@
        .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"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
        . = EXC_OFF_SYS_RESET
        .globl  _start
index 192aa506a8883d9c2f7ba117370e245d875fa9b2..51cc4e2a105e3b16cca80c277fffab3ddc8f6ede 100644 (file)
@@ -28,7 +28,6 @@
 #include <asm-offsets.h>
 #include <config.h>
 #include <mpc5xxx.h>
-#include <timestamp.h>
 #include <version.h>
 
 #define CONFIG_MPC5xxx 1       /* needed for Linux kernel header files */
 #include <asm/mmu.h>
 #include <asm/u-boot.h>
 
-#ifndef  CONFIG_IDENT_STRING
-#define  CONFIG_IDENT_STRING ""
-#endif
-
 /* We don't want the  MMU yet.
 */
 #undef MSR_KERNEL
@@ -80,9 +75,7 @@
        .data
        .globl  version_string
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
 /*
  * Exception vectors
index 300b35c0c4f55c0a9830132e7281194f31f002e0..a1a2dc5acd8ac20e9b6487c79ecf61bb3689bb97 100644 (file)
@@ -28,7 +28,6 @@
 #include <asm-offsets.h>
 #include <config.h>
 #include <mpc8220.h>
-#include <timestamp.h>
 #include <version.h>
 
 #define _LINUX_CONFIG_H 1   /* avoid reading Linux autoconf.h file  */
 #include <asm/mmu.h>
 #include <asm/u-boot.h>
 
-#ifndef         CONFIG_IDENT_STRING
-#define         CONFIG_IDENT_STRING ""
-#endif
-
 /* We don't want the  MMU yet.
 */
 #undef MSR_KERNEL
@@ -79,9 +74,7 @@
        .data
        .globl  version_string
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
 /*
  * Exception vectors
index fc4e922d633d15d2f09626223265189fe62cbc24..70db73e1569c2b495eb5d8609f05a63d8612bdca 100644 (file)
@@ -40,7 +40,6 @@
 #include <asm-offsets.h>
 #include <config.h>
 #include <mpc824x.h>
-#include <timestamp.h>
 #include <version.h>
 
 #define _LINUX_CONFIG_H 1      /* avoid reading Linux autoconf.h file  */
 #include <asm/mmu.h>
 #include <asm/u-boot.h>
 
-#ifndef CONFIG_IDENT_STRING
-#define CONFIG_IDENT_STRING ""
-#endif
-
 /* We don't want the MMU yet.
 */
 #undef MSR_KERNEL
@@ -92,9 +87,7 @@
        .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"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
        . = EXC_OFF_SYS_RESET
        .globl  _start
index 702546eec5c566593f784ca6b3e5c38d6b9f1552..3299d7292a6e5b8ed1a36eac9740b2de2bbb9ab8 100644 (file)
@@ -28,7 +28,6 @@
 #include <asm-offsets.h>
 #include <config.h>
 #include <mpc8260.h>
-#include <timestamp.h>
 #include <version.h>
 
 #define CONFIG_8260 1          /* needed for Linux kernel header files */
 #include <asm/mmu.h>
 #include <asm/u-boot.h>
 
-#ifndef  CONFIG_IDENT_STRING
-#define  CONFIG_IDENT_STRING ""
-#endif
-
 /* We don't want the  MMU yet.
 */
 #undef MSR_KERNEL
@@ -87,9 +82,7 @@
        .data
        .globl  version_string
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
 /*
  *  Hard Reset Configuration Word (HRCW) table
index 7e60315c3f446fb40f59ac1e2f96fe990de3210b..b70b4ca12cea1540a4697654b1e41a527eb1078c 100644 (file)
@@ -30,7 +30,9 @@
 #include <asm-offsets.h>
 #include <config.h>
 #include <mpc83xx.h>
-#include <timestamp.h>
+#ifndef  CONFIG_IDENT_STRING
+#define  CONFIG_IDENT_STRING "MPC83XX"
+#endif
 #include <version.h>
 
 #define CONFIG_83XX    1               /* needed for Linux kernel header files*/
 #include <asm/mmu.h>
 #include <asm/u-boot.h>
 
-#ifndef  CONFIG_IDENT_STRING
-#define  CONFIG_IDENT_STRING "MPC83XX"
-#endif
-
 /* We don't want the  MMU yet.
  */
 #undef MSR_KERNEL
 
        .globl  version_string
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii " ", CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
        .align 2
 
index 57774933a3dbe5819d0118336444551aa5c15173..626ccce6bf1e2ab1272d937d43838107b2d342b2 100644 (file)
@@ -31,7 +31,6 @@
 #include <asm-offsets.h>
 #include <config.h>
 #include <mpc85xx.h>
-#include <timestamp.h>
 #include <version.h>
 
 #define _LINUX_CONFIG_H 1      /* avoid reading Linux autoconf.h file  */
 #include <asm/cache.h>
 #include <asm/mmu.h>
 
-#ifndef         CONFIG_IDENT_STRING
-#define         CONFIG_IDENT_STRING ""
-#endif
-
 #undef MSR_KERNEL
 #define MSR_KERNEL ( MSR_ME )  /* Machine Check */
 
@@ -399,9 +394,7 @@ _start:
        .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"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
        .align  4
        .globl  _start_cont
index 3e3c21eefd2d16561bee9308f1cd4e85e940a0ab..32896d49e1a82a57715a3eca8bc61bef1a9c96b7 100644 (file)
@@ -33,7 +33,6 @@
 #include <asm-offsets.h>
 #include <config.h>
 #include <mpc86xx.h>
-#include <timestamp.h>
 #include <version.h>
 
 #include <ppc_asm.tmpl>
 #include <asm/mmu.h>
 #include <asm/u-boot.h>
 
-#ifndef        CONFIG_IDENT_STRING
-#define CONFIG_IDENT_STRING ""
-#endif
-
 /*
  * Need MSR_DR | MSR_IR enabled to access I/O (printf) in exceptions
  */
@@ -78,9 +73,7 @@
        .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"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
        . = EXC_OFF_SYS_RESET
        .globl  _start
index fe3daa2b9f79a8e0c62347aec7b59edba7f641ca..ebca3acbaaaff6b1b4ad3f469367a4ede39c2282 100644 (file)
@@ -40,7 +40,6 @@
 #include <asm-offsets.h>
 #include <config.h>
 #include <mpc8xx.h>
-#include <timestamp.h>
 #include <version.h>
 
 #define CONFIG_8xx 1           /* needed for Linux kernel header files */
 #include <asm/mmu.h>
 #include <asm/u-boot.h>
 
-#ifndef  CONFIG_IDENT_STRING
-#define  CONFIG_IDENT_STRING ""
-#endif
-
 /* We don't want the  MMU yet.
 */
 #undef MSR_KERNEL
@@ -89,9 +84,7 @@
        .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"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
        . = EXC_OFF_SYS_RESET
        .globl  _start
index c79c499b6fa378fb6919d28b8c6743ae6a03df8b..7725c67b4886eaeb4e47f7ac6de8619c945549f2 100644 (file)
@@ -33,7 +33,6 @@
 #include <common.h>
 #include <config.h>
 #include <version.h>
-#include <timestamp.h>
 #include <i2c.h>
 #include <linux/types.h>
 #include <stdio_dev.h>
index b43e22c8f04d772f52e9d99123b0258828cd5cbf..3b0e3644a4c5545a628d07859ea315c70f67b4ff 100644 (file)
@@ -68,7 +68,6 @@
 #include <asm-offsets.h>
 #include <config.h>
 #include <asm/ppc4xx.h>
-#include <timestamp.h>
 #include <version.h>
 
 #define _LINUX_CONFIG_H 1      /* avoid reading Linux autoconf.h file  */
 #include <asm/mmu.h>
 #include <asm/ppc4xx-isram.h>
 
-#ifndef         CONFIG_IDENT_STRING
-#define         CONFIG_IDENT_STRING ""
-#endif
-
 #ifdef CONFIG_SYS_INIT_DCACHE_CS
 # if (CONFIG_SYS_INIT_DCACHE_CS == 0)
 #  define PBxAP PB1AP
@@ -549,9 +544,7 @@ tlbnx2:     addi    r4,r4,1         /* Next TLB */
        .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"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
        . = EXC_OFF_SYS_RESET
        .globl  _start_of_vectors
index ed91643427015176a947909b530611b92e09aaa0..90fe796ef30ed509f9b4acb766001657fc3b5df9 100644 (file)
@@ -22,7 +22,6 @@
 #include <command.h>
 #include <malloc.h>
 #include <stdio_dev.h>
-#include <timestamp.h>
 #include <version.h>
 #include <watchdog.h>
 #include <net.h>
@@ -39,8 +38,6 @@ extern int board_init(void);
 extern int dram_init(void);
 extern int timer_init(void);
 
-const char version_string[] = U_BOOT_VERSION" ("U_BOOT_DATE" - "U_BOOT_TIME")";
-
 unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN;
 
 #ifndef CONFIG_SYS_NO_FLASH
index f22fb7eb1b70e90bdfca2aa303547b59fa629dc7..9cd6c667d3571e9eaac68edd3496779cb34ff7b2 100644 (file)
@@ -28,7 +28,6 @@
 #include <asm/psr.h>
 #include <asm/stack.h>
 #include <asm/leon.h>
-#include <timestamp.h>
 #include <version.h>
 
 /* Entry for traps which jump to a programmer-specified trap handler.  */
@@ -200,9 +199,7 @@ _trap_table:
        .data
        .globl  version_string
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
        .section        ".text"
        .align 4
index 56ae88d6492b8d5623921427063c9f6635c30cfb..1e393a56e6ae51e335e654f717eedadef3916a2f 100644 (file)
@@ -28,7 +28,6 @@
 #include <asm/psr.h>
 #include <asm/stack.h>
 #include <asm/leon.h>
-#include <timestamp.h>
 #include <version.h>
 
 /* Entry for traps which jump to a programmer-specified trap handler.  */
@@ -201,9 +200,7 @@ _trap_table:
        .extern leon3_snooping_avail
        .globl  version_string
 version_string:
-       .ascii U_BOOT_VERSION
-       .ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
-       .ascii CONFIG_IDENT_STRING, "\0"
+       .ascii U_BOOT_VERSION_STRING, "\0"
 
        .section        ".text"
        .align 4
index c92291bc1ff6ff89b95a710c80ae857813266f5e..af375ddb1e2c0f19aa8716950888dcd6638c5a57 100644 (file)
@@ -35,7 +35,6 @@
 #include <watchdog.h>
 #include <command.h>
 #include <stdio_dev.h>
-#include <timestamp.h>
 #include <version.h>
 #include <malloc.h>
 #include <net.h>
@@ -66,9 +65,6 @@ extern ulong __rel_dyn_end;
 extern ulong __bss_start;
 extern ulong __bss_end;
 
-const char version_string[] =
-       U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")";
-
 /************************************************************************
  * Init Utilities                                                      *
  ************************************************************************
index 83cb11c6fda94c370d6a0a3080640ac9c37068b9..e4b2ac1efc02bf88b4b9b3df9a9533e59ed8e718 100644 (file)
@@ -24,8 +24,9 @@
 #include <common.h>
 #include <command.h>
 #include <version.h>
+#include <linux/compiler.h>
 
-extern char version_string[];
+const char __weak version_string[] = U_BOOT_VERSION_STRING;
 
 int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
index 1f221423a202866cd98eabb6b9763604a0490f5c..3324d9d6e433a9b91efee84eea73e4f5f2d49cc6 100644 (file)
@@ -30,6 +30,7 @@
 #include <common.h>
 #include <watchdog.h>
 #include <command.h>
+#include <version.h>
 #ifdef CONFIG_MODEM_SUPPORT
 #include <malloc.h>            /* for free() prototype */
 #endif
@@ -307,8 +308,6 @@ void main_loop (void)
 
 #ifdef CONFIG_VERSION_VARIABLE
        {
-               extern char version_string[];
-
                setenv ("ver", version_string);  /* set version variable */
        }
 #endif /* CONFIG_VERSION_VARIABLE */
index b427c84877c5fee9b3fbc925b0acaed3887f3e65..77e7285cc7363de400b8e79868966eb179d545e3 100644 (file)
@@ -91,6 +91,7 @@ CONFIG_VIDEO_HW_CURSOR:            - Uses the hardware cursor capability of the
 */
 
 #include <common.h>
+#include <version.h>
 
 #include <malloc.h>
 
@@ -1458,7 +1459,6 @@ void logo_plot (void *screen, int width, int x, int y)
 static void *video_logo (void)
 {
        char info[128];
-       extern char version_string;
        int space, len, y_off = 0;
 
 #ifdef CONFIG_SPLASH_SCREEN
index a34291adc5d9ae8ace49cd18e8613c91b9420da9..ec4e1f808d518e749352eb30b6888322aefd182c 100644 (file)
 #ifndef        __VERSION_H__
 #define        __VERSION_H__
 
+#include <timestamp.h>
+
 #ifndef DO_DEPS_ONLY
 #include "version_autogenerated.h"
 #endif
 
+#ifndef CONFIG_IDENT_STRING
+#define CONFIG_IDENT_STRING ""
+#endif
+
+#define U_BOOT_VERSION_STRING U_BOOT_VERSION " (" U_BOOT_DATE " - " \
+       U_BOOT_TIME ")" CONFIG_IDENT_STRING
+
+extern const char version_string[];
+
 #endif /* __VERSION_H__ */
index d0480f510573c5b696f88013fcae843aa3984a49..694d2f22e89ec574f9db84d75de143c52fbf9507 100644 (file)
 
 #include <config.h>
 #include <common.h>
+#include <version.h>
 #include <linux/ctype.h>
 #include <asm/io.h>
 
 int display_options (void)
 {
-       extern char version_string[];
-
 #if defined(BUILD_TAG)
        printf ("\n\n%s, Build: %s\n\n", version_string, BUILD_TAG);
 #else