summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-10-25 07:25:05 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-10-27 21:13:15 +0100
commitcbf0ffea14c812a19b2eede887e3db1ccc425cd4 (patch)
tree8c86f044000a484211e6c6f45f2d048ff4460837 /Makefile
parent986c980c8250849d9394fdf377a3de75edb11888 (diff)
Makefile: provide constant with seconds since epoch
Provide a constant U_BOOT_EPOCH with the number of seconds since 1970-01-01. This constant can be used to initialize a software real time clock until it is updated via the 'sntp' command. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5a0ef18668..c21729cf52 100644
--- a/Makefile
+++ b/Makefile
@@ -1870,6 +1870,7 @@ define filechk_timestamp.h
LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \
LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DMI_DATE "%m/%d/%Y"'; \
LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_BUILD_DATE 0x%Y%m%d'; \
+ LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_EPOCH %s'; \
else \
return 42; \
fi; \
@@ -1879,6 +1880,7 @@ define filechk_timestamp.h
LC_ALL=C date +'#define U_BOOT_TZ "%z"'; \
LC_ALL=C date +'#define U_BOOT_DMI_DATE "%m/%d/%Y"'; \
LC_ALL=C date +'#define U_BOOT_BUILD_DATE 0x%Y%m%d'; \
+ LC_ALL=C date +'#define U_BOOT_EPOCH %s'; \
fi)
endef