Skip to contentSkip to conversation

Update U-Boot's build timestamp on every compile

PATCH Superseded Peter Tyser 2 participants 4 messages Oct 21, 2008

Subsystems (2)

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Update U-Boot's build timestamp on every compile

Use the GNU 'date' command to auto-generate a new U-Boot timestamp on every compile.

---
Changes since inital PATCH/RFC:
* Split up U_BOOT_DATE define (date and time) into U_BOOT_DATE (day, month, year) and U_BOOT_TIME (time of day) defines
* Updated all architetures/boards

 Makefile                            |    4 ++++
 board/bmw/bmw.c                     |    2 +-
 board/eXalion/eXalion.c             |    3 ++-
 board/mousse/mousse.c               |    3 ++-
 board/netstar/eeprom.c              |    3 ++-
 board/sandburst/karef/karef.c       |    6 ++++--
 board/sandburst/metrobox/metrobox.c |    6 ++++--
 board/trab/trab_fkt.c               |    3 ++-
 board/voiceblue/eeprom.c            |    3 ++-
 common/lcd.c                        |    3 ++-
 cpu/74xx_7xx/start.S                |    2 +-
 cpu/leon2/start.S                   |    2 +-
 cpu/leon3/start.S                   |    2 +-
 cpu/mcf5227x/start.S                |    2 +-
 cpu/mcf523x/start.S                 |    2 +-
 cpu/mcf52x2/start.S                 |    2 +-
 cpu/mcf532x/start.S                 |    2 +-
 cpu/mcf5445x/start.S                |    2 +-
 cpu/mcf547x_8x/start.S              |    2 +-
 cpu/mpc512x/start.S                 |    2 +-
 cpu/mpc5xx/start.S                  |    2 +-
 cpu/mpc5xxx/start.S                 |    2 +-
 cpu/mpc8220/start.S                 |    2 +-
 cpu/mpc824x/start.S                 |    2 +-
 cpu/mpc8260/start.S                 |    2 +-
 cpu/mpc83xx/start.S                 |    2 +-
 cpu/mpc85xx/start.S                 |    2 +-
 cpu/mpc86xx/start.S                 |    2 +-
 cpu/mpc8xx/start.S                  |    2 +-
 cpu/mpc8xx/video.c                  |    3 ++-
 cpu/nios/start.S                    |    2 +-
 cpu/nios2/start.S                   |    2 +-
 cpu/ppc4xx/start.S                  |    2 +-
 include/configs/NETPHONE.h          |    2 +-
 include/configs/NETTA.h             |    2 +-
 include/configs/NETTA2.h            |    2 +-
 lib_arm/board.c                     |    2 +-
 lib_avr32/board.c                   |    2 +-
 lib_blackfin/board.c                |    2 +-
 lib_i386/board.c                    |    2 +-
 lib_microblaze/board.c              |    2 +-
 lib_mips/board.c                    |    2 +-
 lib_sh/board.c                      |    2 +-
 net/net.c                           |    3 +++
 44 files changed, 62 insertions(+), 44 deletions(-)
Makefile +4 -0
index 9a132f7..fedb9d0 100644
@@ -368,6 +368,10 @@ $(VERSION_FILE):
 		@( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)" \
 		 '$(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion $(TOPDIR))' \
 		 ) > [email protected]
+		@( printf '#define U_BOOT_DATE "%s"\n' '$(shell date +"%b %d %C%y")' \
+		 ) >> [email protected]
+		@( printf '#define U_BOOT_TIME "%s"\n' '$(shell date +"%T")' \
+		 ) >> [email protected]
 		@cmp -s $@ [email protected] && rm -f [email protected] || mv -f [email protected] $@
 
 gdbtools:
board/bmw/bmw.c +1 -1
index b629c38..1c72993 100644
@@ -45,7 +45,7 @@ int checkboard(void)
     char  buf[32];
 
     puts ("Board: BMW MPC8245/KAHLUA2 - CHRP (MAP B)\n");
-    printf("Built: %s at %s\n", __DATE__ , __TIME__ );
+    printf("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
     /* printf("MPLD:  Revision %d\n", SYS_REVID_GET()); */
     printf("Local Bus at %s MHz\n", strmhz(buf, busfreq));
     return 0;
board/eXalion/eXalion.c +2 -1
index 34538c4..26d2e85 100644
@@ -31,6 +31,7 @@
 #include <pci.h>
 #include <ide.h>
 #include <netdev.h>
+#include <version.h>
 #include "piix_pci.h"
 #include "eXalion.h"
 
@@ -40,7 +41,7 @@ int checkboard (void)
 	char buf[32];
 
 	printf ("Board: eXalion MPC824x - CHRP (MAP B)\n");
-	printf ("Built: %s at %s\n", __DATE__, __TIME__);
+	printf ("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
 	printf ("Local Bus:  %s MHz\n", strmhz (buf, busfreq));
 
 	return 0;
board/mousse/mousse.c +2 -1
index 6a12b57..0625767 100644
@@ -30,6 +30,7 @@
 #include <mpc824x.h>
 #include <netdev.h>
 #include <asm/processor.h>
+#include <version.h>
 
 #include "mousse.h"
 #include "m48t59y.h"
@@ -42,7 +43,7 @@ int checkboard (void)
 	char buf[32];
 
 	puts ("Board: MOUSSE MPC8240/KAHLUA - CHRP (MAP B)\n");
-	printf ("Built: %s at %s\n", __DATE__, __TIME__);
+	printf ("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
 	printf ("MPLD:  Revision %d\n", SYS_REVID_GET ());
 	printf ("Local Bus:  %s MHz\n", strmhz (buf, busfreq));
 
board/netstar/eeprom.c +2 -1
index 0de594b..7817da8 100644
@@ -26,6 +26,7 @@
 
 #include <common.h>
 #include <exports.h>
+#include <version.h>
 #include "../drivers/net/smc91111.h"
 
 #define SMC_BASE_ADDRESS CONFIG_SMC91111_BASE
@@ -173,7 +174,7 @@ int eeprom(int argc, char *argv[])
 	/* Print help message */
 	if (argv[1][1] == 'h') {
 		printf("VoiceBlue EEPROM writer\n");
-		printf("Built: %s at %s\n", __DATE__ , __TIME__ );
+		printf("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
 		printf("Usage:\n\t<mac_address> [<element_1>] [<...>]\n");
 		return 0;
 	}
board/sandburst/karef/karef.c +4 -2
index 7909d34..a16ba73 100644
@@ -26,6 +26,7 @@
 #include <command.h>
 #include "karef.h"
 #include "karef_version.h"
+#include <version.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <spd_sdram.h>
@@ -299,7 +300,7 @@ int checkboard (void)
 		"Serial Number: %d\n", sernum);
 	printf ("%s\n", KAREF_U_BOOT_REL_STR);
 
-	printf ("Built %s %s by %s\n", __DATE__, __TIME__, BUILDUSER);
+	printf ("Built %s %s by %s\n", U_BOOT_DATE, U_BOOT_TIME, BUILDUSER);
 	if (sbcommon_get_master()) {
 		printf("Slot 0 - Master\nSlave board");
 		if (sbcommon_secondary_present())
@@ -366,7 +367,8 @@ int misc_init_r (void)
 	setenv("ubrelver", KAREF_U_BOOT_REL_STR);
 
 	memset(envstr, 0, 255);
-	sprintf (envstr, "Built %s %s by %s", __DATE__, __TIME__, BUILDUSER);
+	sprintf (envstr, "Built %s %s by %s",
+		 U_BOOT_DATE, U_BOOT_TIME, BUILDUSER);
 	setenv("bldstr", envstr);
 	saveenv();
 
board/sandburst/metrobox/metrobox.c +4 -2
index c3c4459..ad8137b 100644
@@ -25,6 +25,7 @@
 #include <command.h>
 #include "metrobox.h"
 #include "metrobox_version.h"
+#include <version.h>
 #include <asm/processor.h>
 #include <asm/io.h>
 #include <spd_sdram.h>
@@ -270,7 +271,7 @@ int checkboard (void)
 	printf ("Board: Sandburst Corporation MetroBox Serial Number: %d\n", sernum);
 	printf ("%s\n", METROBOX_U_BOOT_REL_STR);
 
-	printf ("Built %s %s by %s\n", __DATE__, __TIME__, BUILDUSER);
+	printf ("Built %s %s by %s\n", U_BOOT_DATE, U_BOOT_TIME, BUILDUSER);
 	if (sbcommon_get_master()) {
 		printf("Slot 0 - Master\nSlave board");
 		if (sbcommon_secondary_present())
@@ -335,7 +336,8 @@ int misc_init_r (void)
 	setenv("ubrelver", METROBOX_U_BOOT_REL_STR);
 
 	memset(envstr, 0, 255);
-	sprintf (envstr, "Built %s %s by %s", __DATE__, __TIME__, BUILDUSER);
+	sprintf (envstr, "Built %s %s by %s",
+		 U_BOOT_DATE, U_BOOT_TIME, BUILDUSER);
 	setenv("bldstr", envstr);
 	saveenv();
 
board/trab/trab_fkt.c +2 -1
index 7273ef9..bad569b 100644
@@ -25,6 +25,7 @@
 
 #include <common.h>
 #include <exports.h>
+#include <version.h>
 #include <s3c2400.h>
 #include "tsc2000.h"
 #include "rs485.h"
@@ -296,7 +297,7 @@ int trab_fkt (int argc, char *argv[])
 int do_info (void)
 {
 	printf ("Stand-alone application for TRAB board function test\n");
-	printf ("Built: %s at %s\n", __DATE__ , __TIME__ );
+	printf ("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
 
 	return 0;
 }
board/voiceblue/eeprom.c +2 -1
index d8ea6e5..1f06fec 100644
@@ -26,6 +26,7 @@
 
 #include <common.h>
 #include <exports.h>
+#include <version.h>
 #include "../drivers/net/smc91111.h"
 
 #define SMC_BASE_ADDRESS CONFIG_SMC91111_BASE
@@ -169,7 +170,7 @@ int eeprom(int argc, char *argv[])
 	/* Print help message */
 	if (argv[1][1] == 'h') {
 		printf("VoiceBlue EEPROM writer\n");
-		printf("Built: %s at %s\n", __DATE__ , __TIME__ );
+		printf("Built: %s at %s\n", U_BOOT_DATE, U_BOOT_TIME);
 		printf("Usage:\n\t<mac_address> [<element_1>] [<...>]\n");
 		return 0;
 	}
common/lcd.c +2 -1
index d104b26..9118719 100644
@@ -788,7 +788,8 @@ static void *lcd_logo (void)
 
 #ifdef CONFIG_MPC823
 # ifdef CONFIG_LCD_INFO
-	sprintf (info, "%s (%s - %s) ", U_BOOT_VERSION, __DATE__, __TIME__);
+	sprintf (info, "%s (%s - %s) ",
+		 U_BOOT_VERSION, U_BOOT_DATE, U_BOOT_TIME);
 	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y, (uchar *)info, strlen(info));
 
 	sprintf (info, "(C) 2008 DENX Software Engineering GmbH");
cpu/74xx_7xx/start.S +1 -1
index 07bbe01..b14045a 100644
@@ -87,7 +87,7 @@
 	.globl	version_string
 version_string:
 	.ascii	U_BOOT_VERSION
-	.ascii	" (", __DATE__, " - ", __TIME__, ")"
+	.ascii	" (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii	CONFIG_IDENT_STRING, "\0"
 
 	. = EXC_OFF_SYS_RESET
cpu/leon2/start.S +1 -1
index 9b5d83e..bd98f71 100644
@@ -199,7 +199,7 @@ _trap_table:
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 
 	.section	".text"
cpu/leon3/start.S +1 -1
index 7afe10e..8d8be25 100644
@@ -200,7 +200,7 @@ _trap_table:
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 
 	.section	".text"
cpu/mcf5227x/start.S +1 -1
index becaab7..6de1a6c 100644
@@ -352,6 +352,6 @@ dcache_status:
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 	.align 4
cpu/mcf523x/start.S +1 -1
index b70b83b..7a89eea 100644
@@ -336,6 +336,6 @@ dcache_status:
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 	.align 4
cpu/mcf52x2/start.S +1 -1
index da45bcb..e3eab41 100644
@@ -474,6 +474,6 @@ dcache_status:
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 	.align 4
cpu/mcf532x/start.S +1 -1
index 7a3eb5f..41a62ae 100644
@@ -331,6 +331,6 @@ dcache_status:
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 	.align 4
cpu/mcf5445x/start.S +1 -1
index 61e43ff..857f4d9 100644
@@ -627,6 +627,6 @@ dcache_status:
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 	.align 4
cpu/mcf547x_8x/start.S +1 -1
index 41fc694..b9a81fe 100644
@@ -357,6 +357,6 @@ dcache_status:
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 	.align 4
cpu/mpc512x/start.S +1 -1
index 26f3c52..0bf23bf 100644
@@ -85,7 +85,7 @@
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii " ", CONFIG_IDENT_STRING, "\0"
 
 /*
cpu/mpc5xx/start.S +1 -1
index f2ffe84..4e84500 100644
@@ -80,7 +80,7 @@
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 
 	. = EXC_OFF_SYS_RESET
cpu/mpc5xxx/start.S +1 -1
index defe77d..ab6ff75 100644
@@ -78,7 +78,7 @@
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 
 /*
cpu/mpc8220/start.S +1 -1
index 373be2c..f605c43 100644
@@ -77,7 +77,7 @@
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 
 /*
cpu/mpc824x/start.S +1 -1
index b5d7eb1..53dc1f5 100644
@@ -90,7 +90,7 @@
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 
 	. = EXC_OFF_SYS_RESET
cpu/mpc8260/start.S +1 -1
index da0c516..8042c44 100644
@@ -85,7 +85,7 @@
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 
 /*
cpu/mpc83xx/start.S +1 -1
index cd566b2..4981a6e 100644
@@ -105,7 +105,7 @@
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii " ", CONFIG_IDENT_STRING, "\0"
 
 
cpu/mpc85xx/start.S +1 -1
index fc3c336..f8fe1c8 100644
@@ -272,7 +272,7 @@ _start:
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 
 	.align	4
cpu/mpc86xx/start.S +1 -1
index 159f3e1..9841186 100644
@@ -76,7 +76,7 @@
 	.globl	version_string
 version_string:
 	.ascii	U_BOOT_VERSION
-	.ascii	" (", __DATE__, " - ", __TIME__, ")"
+	.ascii	" (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii	CONFIG_IDENT_STRING, "\0"
 
 	. = EXC_OFF_SYS_RESET
cpu/mpc8xx/start.S +1 -1
index 7b75660..28d2906 100644
@@ -87,7 +87,7 @@
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 
 	. = EXC_OFF_SYS_RESET
cpu/mpc8xx/video.c +2 -1
index 2e6a22a..6918455 100644
@@ -1174,7 +1174,8 @@ static void *video_logo (void)
 	easylogo_plot (VIDEO_LOGO_ADDR, screen, width, 0, 0);
 
 #ifdef VIDEO_INFO
-	sprintf (info, "%s (%s - %s) ", U_BOOT_VERSION, __DATE__, __TIME__);
+	sprintf (info, "%s (%s - %s) ",
+		 U_BOOT_VERSION, U_BOOT_DATE, U_BOOT_TIME);
 	video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y, info);
 
 	sprintf (info, "(C) 2002 DENX Software Engineering");
cpu/nios/start.S +1 -1
index 5d15e8d..d1cf32e 100644
@@ -233,5 +233,5 @@ dly_clks:
 
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
cpu/nios2/start.S +1 -1
index ea41435..5a5744d 100644
@@ -212,5 +212,5 @@ dly_clks:
 
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
cpu/ppc4xx/start.S +1 -1
index 31902a0..d34bb9c 100644
@@ -509,7 +509,7 @@ rsttlb:	tlbwe	r0,r1,0x0000	/* Invalidate all entries (V=0)*/
 	.globl	version_string
 version_string:
 	.ascii U_BOOT_VERSION
-	.ascii " (", __DATE__, " - ", __TIME__, ")"
+	.ascii " (", U_BOOT_DATE, " - ", U_BOOT_TIME, ")"
 	.ascii CONFIG_IDENT_STRING, "\0"
 
 	. = EXC_OFF_SYS_RESET
include/configs/NETPHONE.h +1 -1
index a147aff..34de947 100644
@@ -799,7 +799,7 @@ typedef unsigned int led_id_t;
 #define CONFIG_CDP_DEVICE_ID_PREFIX	"NP"	/* netphone */
 #define CONFIG_CDP_PORT_ID		"eth%d"
 #define CONFIG_CDP_CAPABILITIES		0x00000010
-#define CONFIG_CDP_VERSION		"u-boot" " " __DATE__ " " __TIME__
+#define CONFIG_CDP_VERSION		"u-boot" " " U_BOOT_DATE " " U_BOOT_TIME
 #define CONFIG_CDP_PLATFORM		"Intracom NetPhone"
 #define CONFIG_CDP_TRIGGER		0x20020001
 #define CONFIG_CDP_POWER_CONSUMPTION	4300	/* 90 mA @ 48V */
include/configs/NETTA.h +1 -1
index 63810b3..004b3c8 100644
@@ -775,7 +775,7 @@
 #define CONFIG_CDP_DEVICE_ID_PREFIX	"NT"	/* netta */
 #define CONFIG_CDP_PORT_ID		"eth%d"
 #define CONFIG_CDP_CAPABILITIES		0x00000010
-#define CONFIG_CDP_VERSION		"u-boot 1.0" " " __DATE__ " " __TIME__
+#define CONFIG_CDP_VERSION		"u-boot 1.0" " " U_BOOT_DATE " " U_BOOT_TIME
 #define CONFIG_CDP_PLATFORM		"Intracom NetTA"
 #define CONFIG_CDP_TRIGGER		0x20020001
 #define CONFIG_CDP_POWER_CONSUMPTION	4300	/* 90 mA @ 48V */
include/configs/NETTA2.h +1 -1
index 61c5547..70995fa 100644
@@ -750,7 +750,7 @@ typedef unsigned int led_id_t;
 #define CONFIG_CDP_DEVICE_ID_PREFIX	"NT"	/* netta2 */
 #define CONFIG_CDP_PORT_ID		"eth%d"
 #define CONFIG_CDP_CAPABILITIES		0x00000010
-#define CONFIG_CDP_VERSION		"u-boot" " " __DATE__ " " __TIME__
+#define CONFIG_CDP_VERSION		"u-boot" " " U_BOOT_DATE " " U_BOOT_TIME
 #define CONFIG_CDP_PLATFORM		"Intracom NetTA2"
 #define CONFIG_CDP_TRIGGER		0x20020001
 #define CONFIG_CDP_POWER_CONSUMPTION	4300	/* 90 mA @ 48V */
lib_arm/board.c +1 -1
index 4ba1f5e..e7a8727 100644
@@ -69,7 +69,7 @@ extern void dataflash_print_info(void);
 #endif
 
 const char version_string[] =
-	U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")"CONFIG_IDENT_STRING;
+	U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")"CONFIG_IDENT_STRING;
 
 #ifdef CONFIG_DRIVER_CS8900
 extern void cs8900_get_enetaddr (uchar * addr);
lib_avr32/board.c +1 -1
index 8771de9..1657a94 100644
@@ -36,7 +36,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 const char version_string[] =
-	U_BOOT_VERSION " (" __DATE__ " - " __TIME__ ") " CONFIG_IDENT_STRING;
+	U_BOOT_VERSION " ("U_BOOT_DATE" - "U_BOOT_TIME") " CONFIG_IDENT_STRING;
 
 unsigned long monitor_flash_len;
 
lib_blackfin/board.c +1 -1
index ba57392..cb54395 100644
@@ -32,7 +32,7 @@ int post_flag;
 
 DECLARE_GLOBAL_DATA_PTR;
 
-const char version_string[] = U_BOOT_VERSION " (" __DATE__ " - " __TIME__ ")";
+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)
lib_i386/board.c +1 -1
index 659f9a2..f5ba84f 100644
@@ -70,7 +70,7 @@ ulong i386boot_bios_size     = (ulong)&_i386boot_bios_size;     /* size of BIOS
 
 
 const char version_string[] =
-	U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")";
+	U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")";
 
 
 /*
lib_microblaze/board.c +1 -1
index cd61918..7c2f8c5 100644
@@ -32,7 +32,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-const char version_string[] = U_BOOT_VERSION " (" __DATE__ " - " __TIME__ ")";
+const char version_string[] = U_BOOT_VERSION " ("U_BOOT_DATE" - "U_BOOT_TIME")";
 
 #ifdef CONFIG_SYS_GPIO_0
 extern int gpio_init (void);
lib_mips/board.c +1 -1
index 77e1cc8..66d6b51 100644
@@ -53,7 +53,7 @@ extern ulong uboot_end;
 ulong monitor_flash_len;
 
 const char version_string[] =
-	U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")";
+	U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")";
 
 static char *failed = "*** failed ***\n";
 
lib_sh/board.c +1 -1
index b6be22e..47827a3 100644
@@ -33,7 +33,7 @@ extern int board_init(void);
 extern int dram_init(void);
 extern int timer_init(void);
 
-const char version_string[] = U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")";
+const char version_string[] = U_BOOT_VERSION" ("U_BOOT_DATE" - "U_BOOT_TIME")";
 
 unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN;
 
net/net.c +3 -0
index 77e83b5..31b422b 100644
@@ -89,6 +89,9 @@
 #if defined(CONFIG_CMD_SNTP)
 #include "sntp.h"
 #endif
+#if defined(CONFIG_CDP_VERSION)
+#include "version.h"
+#endif
 
 #if defined(CONFIG_CMD_NET)
 
Signature · 1 line
1.6.0.2.GIT
#1 lore raw

PATCH v2 1/1 Update U-Boot's build timestamp on every compile

Dear Peter Tyser,

Quoted 2 lines · In message <[email protected]> you wrote:

Use the GNU 'date' command to auto-generate a new U-Boot timestamp on every compile.

...

Makefile $(VERSION_FILE): · line 375

Quoted 11 lines
Makefile +4 -0
@@ -368,6 +368,10 @@ $(VERSION_FILE):
 		@( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)" \
 		 '$(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion $(TOPDIR))' \
 		 ) > [email protected]
+		@( printf '#define U_BOOT_DATE "%s"\n' '$(shell date +"%b %d %C%y")' \
+		 ) >> [email protected]
+		@( printf '#define U_BOOT_TIME "%s"\n' '$(shell date +"%T")' \
+		 ) >> [email protected]
 		@cmp -s $@ [email protected] && rm -f [email protected] || mv -f [email protected] $@

Please do not do this here. Use a separate target instead.

As you can see, we take care NOT to create a new VERSION_FILE for each build, but only when it eally changed. Your change forces it to change with each build, which we tried to avoid.

Best regards,

Wolfgang Denk

Signature · 6 lines
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: wd at denx.de
It is impractical for  the  standard  to  attempt  to  constrain  the
behavior  of code that does not obey the constraints of the standard.
                                                          - Doug Gwyn
#2 lore raw

PATCH v2 1/1 Update U-Boot's build timestamp on every compile

Hi Wolfgang,

Quoted 14 lines

Makefile $(VERSION_FILE): · line 375

Quoted 11 lines
Makefile +4 -0
@@ -368,6 +368,10 @@ $(VERSION_FILE):
 		@( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)" \
 		 '$(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion $(TOPDIR))' \
 		 ) > [email protected]
+		@( printf '#define U_BOOT_DATE "%s"\n' '$(shell date +"%b %d %C%y")' \
+		 ) >> [email protected]
+		@( printf '#define U_BOOT_TIME "%s"\n' '$(shell date +"%T")' \
+		 ) >> [email protected]
 		@cmp -s $@ [email protected] && rm -f [email protected] || mv -f [email protected] $@

Please do not do this here. Use a separate target instead.

Quoted 3 lines

As you can see, we take care NOT to create a new VERSION_FILE for each build, but only when it eally changed. Your change forces it to change with each build, which we tried to avoid.

How does a $(TIMESTAMP_FILE) target of $(obj)include/timestamp_autogenerated.h sound? An include/timestamp.h file would also be added which includes included/timestamp_autogenerated.h.

Best,
Peter

#3 lore raw

PATCH v2 1/1 Update U-Boot's build timestamp on every compile

Dear Peter Tyser,

Quoted 5 lines · In message <[email protected]> you wrote:

How does a $(TIMESTAMP_FILE) target of $(obj)include/timestamp_autogenerated.h sound? An include/timestamp.h file would also be added which includes included/timestamp_autogenerated.h.

That's OK with me. Thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
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: wd at denx.de
Where would we be without rhetorical questions?