Update U-Boot's build timestamp on every compile
Subsystems (2)
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -70,7 +70,7 @@ ulong i386boot_bios_size = (ulong)&_i386boot_bios_size; /* size of BIOSconst char version_string[] = -U_BOOT_VERSION " (" __DATE__" - " __TIME__")" ; +U_BOOT_VERSION " (" U_BOOT_DATE " - " U_BOOT_TIME ")" ;/*
lib_microblaze/board.c +1 -1
@@ -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
@@ -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
@@ -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
@@ -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
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 GwynPATCH 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_FILEfor 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
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.hfile would also be added which includesincluded/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?