barebox supports setting a buildsystem version. This is useful to have
an exact buildsystem version like a commit hash accessible from barebox.

Signed-off-by: Steffen Trumtrar <[email protected]>
---
 platforms/barebox.in | 13 +++++++++++++
 rules/barebox.make   |  5 +++++
 2 files changed, 18 insertions(+)

diff --git a/platforms/barebox.in b/platforms/barebox.in
index 70d175fb5a03..d35d165011b9 100644
--- a/platforms/barebox.in
+++ b/platforms/barebox.in
@@ -27,6 +27,19 @@ config BAREBOX_VERSION
        string
        default "2016.08.0"
 
+config BAREBOX_CONFIG_BUILDSYSTEM_VERSION
+        prompt "add a buildsystem version to the barebox binary"
+        bool
+        help
+          When this option is enabled, the nv variable "nv.buildsystem_version"
+          in barebox is set to PTXCONF_BAREBOX_BUILDSYSTEM_VERSION.
+
+config BAREBOX_BUILDSYSTEM_VERSION
+        prompt "barebox buildsystem version"
+        depends on BAREBOX_CONFIG_BUILDSYSTEM_VERSION
+        string
+        default "${PTXDIST_VCS_VERSION}"
+
 config BAREBOX_MD5
        prompt "barebox source md5sum"
        string
diff --git a/rules/barebox.make b/rules/barebox.make
index 23c948408ab3..bea9f3adcbf8 100644
--- a/rules/barebox.make
+++ b/rules/barebox.make
@@ -46,6 +46,11 @@ BAREBOX_CONF_OPT     := \
        O=$(BAREBOX_BUILD_DIR) \
        $(call barebox-opts, BAREBOX)
 
+ifdef PTXCONF_BAREBOX_CONFIG_BUILDSYSTEM_VERSION
+BAREBOX_CONF_OPT += \
+        BUILDSYSTEM_VERSION=$(PTXCONF_BAREBOX_BUILDSYSTEM_VERSION)
+endif
+
 BAREBOX_MAKE_OPT       := $(BAREBOX_CONF_OPT)
 
 BAREBOX_TAGS_OPT       := TAGS tags cscope
-- 
2.29.2


_______________________________________________
ptxdist mailing list
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to