Get rid off __DATE__ and __TIME__, use value generated with date command
authorPiotr Dymacz <pepe2k@gmail.com>
Fri, 23 Sep 2016 16:19:02 +0000 (18:19 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Fri, 23 Sep 2016 16:19:02 +0000 (18:19 +0200)
u-boot/Makefile
u-boot/common/command.c
u-boot/lib_mips/board.c

index 725fb472ce61b870c10251111cb51f10afda866a..92bcbe3c58d3aac44f2cc77133e76f3c4e625621 100644 (file)
@@ -364,6 +364,7 @@ unconfig:
 config_common:
        @ >include/config.h
        @$(call include_add,soc/soc_list.h)
+       @$(call define_add,CONFIG_BUILD_DATE_UTC,$(shell date -u +"%Y-%m-%d"))
 
 ar933x_common: unconfig config_common
        @$(call define_add,CFG_AG7240_NMACS,2)
index 005d1af0a4e69651352feaffe8919c6b59dc028b..7826dbe78d0fb68752a61541ab6119799781a2dc 100644 (file)
@@ -27,7 +27,7 @@ int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        extern char version_string[];
 
        puts("Version and build date:\n");
-       printf("  %s\n  " __DATE__ ", " __TIME__ "\n\n", version_string);
+       printf("  %s, " MK_STR(CONFIG_BUILD_DATE_UTC) "\n\n", version_string);
 
        puts("Modification by:\n");
        puts("  Piotr Dymacz <piotr@dymacz.pl>\n");
index 707577ca533232d9dc192b5d0dca6b7532e50901..166397dd69f4b946031cb3493266dce18f9f5a30 100644 (file)
@@ -99,7 +99,8 @@ static int display_banner(void)
 
        printf("\n***************************************"
               "\n*     %s     *"
-              "\n*        " __DATE__ ", " __TIME__ "        *"
+              "\n*          Build: "
+              MK_STR(CONFIG_BUILD_DATE_UTC) "          *"
               "\n***************************************\n\n",
               version_string);