summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSteffen Trumtrar <s.trumtrar@pengutronix.de>2020-09-23 12:34:15 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-09-25 16:28:04 +0200
commit98c221e3fad57f271d60406c9a1869511b26ed37 (patch)
treec9331a9c59d5d6c49390ae01c8ebfb577d18a811 /scripts
parentcbfaec5633457fb5dae949be1665ca427bbad067 (diff)
downloadbarebox-98c221e3fad57f271d60406c9a1869511b26ed37.tar.gz
barebox-98c221e3fad57f271d60406c9a1869511b26ed37.tar.xz
Makefile: add buildsystem version variable
Introduce a new variable to store a buildsystem version information. The exact information that is stored here (git commit, git tag,...) is defined by the buildsystem. It is intended to have the possibility to get information about the exact barebox binary, environment and configuration. The variable is utilized the same as KERNELVERSION for linux: make BUILDSYSTEM_VERSION=$COMMITISH Via scripts/mkcompile_h this information is injected into the barebox codebase. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkcompile_h3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index 60b20cafc6..49aadc153d 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -54,6 +54,7 @@ fi
UTS_VERSION="#$VERSION"
CONFIG_FLAGS=""
UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP"
+BUILDSYSTEM_VERSION="$BUILDSYSTEM_VERSION"
# Truncate to maximum length
@@ -69,6 +70,8 @@ UTS_TRUNCATE="cut -b -$UTS_LEN"
echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"
+ echo \#define BUILDSYSTEM_VERSION \"`echo $BUILDSYSTEM_VERSION`\"
+
echo \#define BAREBOX_COMPILE_BY \"`echo $BAREBOX_COMPILE_BY | $UTS_TRUNCATE`\"
echo \#define BAREBOX_COMPILE_HOST \"`echo $BAREBOX_COMPILE_HOST | $UTS_TRUNCATE`\"