[U-Boot] [PATCH 01/33] Add build date values to Makefile

Simon Glass sjg at chromium.org
Wed Nov 12 01:17:49 CET 2014


At present there is a string for the build date and time. In the case of an
Real Time Clock which needs to be reset, it is useful to reset it to the
build date, since it can't be earlier than that.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 8e94948..fb72c29 100644
--- a/Makefile
+++ b/Makefile
@@ -1146,7 +1146,12 @@ endef
 
 define filechk_timestamp.h
 	(LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"'; \
-	LC_ALL=C date +'#define U_BOOT_TIME "%T"')
+	LC_ALL=C date +'#define U_BOOT_TIME "%T"'; \
+	LC_ALL=C date +'#define U_BOOT_DAY %-d'; \
+	LC_ALL=C date +'#define U_BOOT_MONTH %-m'; \
+	LC_ALL=C date +'#define U_BOOT_YEAR %Y'; \
+	LC_ALL=C date +'#define U_BOOT_WEEKDAY %u'; \
+	)
 endef
 
 $(version_h): include/config/uboot.release FORCE
-- 
2.1.0.rc2.206.gedb03e5



More information about the U-Boot mailing list