diff mbox

[U-Boot,v2] Makefile: Add U_BOOT_TZ and include in version

Message ID 1431248529-23061-1-git-send-email-judge.packham@gmail.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Chris Packham May 10, 2015, 9:02 a.m. UTC
Define U_BOOT_TZ alongside U_BOOT_TIME and U_BOOT_DATE and use it to
include the timezone in the version output.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
---
As per feedback from Tom I've switched to '%z' so that any size increase
as a result of the timezone information is constant.

Changes in v2:
- Switched to '%z'
- Rebased against 2017.07-rc1

 Makefile          | 3 ++-
 include/version.h | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Tom Rini May 28, 2015, 1:23 p.m. UTC | #1
On Sun, May 10, 2015 at 09:02:09PM +1200, Chris Packham wrote:

> Define U_BOOT_TZ alongside U_BOOT_TIME and U_BOOT_DATE and use it to
> include the timezone in the version output.
> 
> Acked-by: Simon Glass <sjg at chromium.org>
> Signed-off-by: Chris Packham <judge.packham at gmail.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 24503ac..1f488aa 100644
--- a/Makefile
+++ b/Makefile
@@ -1230,7 +1230,8 @@  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_TZ "%z"')
 endef
 
 $(version_h): include/config/uboot.release FORCE
diff --git a/include/version.h b/include/version.h
index d6c7cf2..777e9f6 100644
--- a/include/version.h
+++ b/include/version.h
@@ -19,7 +19,7 @@ 
 #endif
 
 #define U_BOOT_VERSION_STRING U_BOOT_VERSION " (" U_BOOT_DATE " - " \
-	U_BOOT_TIME ")" CONFIG_IDENT_STRING
+	U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING
 
 #ifndef __ASSEMBLY__
 extern const char version_string[];