From: Roland Hieber <rhi@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [DistroKit] [PATCH 3/3] barebox: set barebox build sytem version
Date: Sat, 10 Apr 2021 01:02:52 +0200 [thread overview]
Message-ID: <20210409230252.28738-3-rhi@pengutronix.de> (raw)
In-Reply-To: <20210409230252.28738-1-rhi@pengutronix.de>
Since Barebox v2020.11.0, the build system supports a configurable
version string that is baked into the barebox image, see the following
upstream barebox commits:
* commit 98c221e3fad57f271d60 (2020-09-23, "Makefile: add buildsystem version variable")
* commit c7dcac9de597f006fdc8 (2020-09-23, "common: print buildsystem version in barebox banner")
* commit c600d8812e9f3b98591a (2020-09-23, "common: globalvar: add variable for buildsystem_version_string")
* commit 01b53d3b728073996e7e (2020-09-23, "imd: add buildsystem version to metadata")
Set that version string to the Git hash so we can always find out from
which DistroKit version a barebox-in-the-wild was built. (Even if we
don't use barebox >= v2020.11.0 on all platforms yet, future barebox
updates will benefit from this change.)
For mips, we use the upstream barebox rule, which takes the version
string from the platformconfig. For all other platforms, this change
effectively ports the following commit from PTXdist 2021.04.0:
| commit f5500c922424ee71dd99e80f743ed6d994e5bca6
| Author: Steffen Trumtrar <s.trumtrar@pengutronix.de>
| Date: 2021-04-01 10:36:41
|
| rules: barebox: support barebox buildsystem_version
|
| 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 <s.trumtrar@pengutronix.de>
| Message-Id: <20210401083641.9251-2-s.trumtrar@pengutronix.de>
| Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Link: https://git.pengutronix.de/cgit/barebox/commit/?id=98c221e3fad57f271d60
Link: https://git.pengutronix.de/cgit/barebox/commit/?id=c7dcac9de597f006fdc8
Link: https://git.pengutronix.de/cgit/barebox/commit/?id=c600d8812e9f3b98591a
Link: https://git.pengutronix.de/cgit/barebox/commit/?id=01b53d3b728073996e7e
Link: https://git.pengutronix.de/cgit/ptxdist/commit/?id=f5500c922424ee71dd99
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
configs/platform-mips/rules/barebox-ar9331.make | 1 +
configs/platform-mips/rules/barebox-common.make | 1 +
configs/platform-mips/rules/barebox-malta.make | 1 +
configs/platform-rpi/platformconfig | 3 ++-
configs/platform-v7a/rules/barebox-am335x-mlo.make | 1 +
configs/platform-v7a/rules/barebox-am335x.make | 1 +
configs/platform-v7a/rules/barebox-at91.make | 4 +++-
configs/platform-v7a/rules/barebox-common.make | 1 +
configs/platform-v7a/rules/barebox-mx6.make | 1 +
configs/platform-v7a/rules/barebox-rpi2.make | 1 +
configs/platform-v7a/rules/barebox-stm32mp.make | 4 +++-
configs/platform-v7a/rules/barebox-vexpress.make | 1 +
configs/platform-v8a/rules/barebox-imx8m.make | 1 +
13 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/configs/platform-mips/rules/barebox-ar9331.make b/configs/platform-mips/rules/barebox-ar9331.make
index a5c5205038a6..eb28369252be 100644
--- a/configs/platform-mips/rules/barebox-ar9331.make
+++ b/configs/platform-mips/rules/barebox-ar9331.make
@@ -42,6 +42,7 @@ BAREBOX_AR9331_WRAPPER_BLACKLIST := \
BAREBOX_AR9331_CONF_OPT := \
-C $(BAREBOX_AR9331_DIR) \
O=$(BAREBOX_AR9331_BUILD_DIR) \
+ BUILDSYSTEM_VERSION=$(PTXDIST_VCS_VERSION) \
$(call barebox-opts, BAREBOX_AR9331)
BAREBOX_AR9331_MAKE_OPT := $(BAREBOX_AR9331_CONF_OPT)
diff --git a/configs/platform-mips/rules/barebox-common.make b/configs/platform-mips/rules/barebox-common.make
index 8f7c52fd4c1d..39e860011500 100644
--- a/configs/platform-mips/rules/barebox-common.make
+++ b/configs/platform-mips/rules/barebox-common.make
@@ -37,6 +37,7 @@ BAREBOX_COMMON_PATH := PATH=$(HOST_PATH)
BAREBOX_COMMON_CONF_OPT := \
-C $(BAREBOX_COMMON_DIR) \
O=$(BAREBOX_COMMON_BUILD_DIR) \
+ BUILDSYSTEM_VERSION=$(PTXDIST_VCS_VERSION) \
$(call barebox-opts, BAREBOX_COMMON)
BAREBOX_COMMON_MAKE_OPT := $(BAREBOX_COMMON_CONF_OPT)
diff --git a/configs/platform-mips/rules/barebox-malta.make b/configs/platform-mips/rules/barebox-malta.make
index b60f1633e406..d9a63fa13fbf 100644
--- a/configs/platform-mips/rules/barebox-malta.make
+++ b/configs/platform-mips/rules/barebox-malta.make
@@ -42,6 +42,7 @@ BAREBOX_MALTA_WRAPPER_BLACKLIST := \
BAREBOX_MALTA_CONF_OPT := \
-C $(BAREBOX_MALTA_DIR) \
O=$(BAREBOX_MALTA_BUILD_DIR) \
+ BUILDSYSTEM_VERSION=$(PTXDIST_VCS_VERSION) \
$(call barebox-opts, BAREBOX_MALTA)
BAREBOX_MALTA_MAKE_OPT := $(BAREBOX_MALTA_CONF_OPT)
diff --git a/configs/platform-rpi/platformconfig b/configs/platform-rpi/platformconfig
index 42437023857a..1eb295fe02fd 100644
--- a/configs/platform-rpi/platformconfig
+++ b/configs/platform-rpi/platformconfig
@@ -176,7 +176,8 @@ PTXCONF_CONSOLE_SPEED="115200"
PTXCONF_BAREBOX_ARCH_STRING="arm"
PTXCONF_BAREBOX=y
PTXCONF_BAREBOX_VERSION="2020.08.1"
-# PTXCONF_BAREBOX_CONFIG_BUILDSYSTEM_VERSION is not set
+PTXCONF_BAREBOX_CONFIG_BUILDSYSTEM_VERSION=y
+PTXCONF_BAREBOX_BUILDSYSTEM_VERSION="${PTXDIST_VCS_VERSION}"
PTXCONF_BAREBOX_MD5="d57031878390cb267f6641aedffcda9f"
PTXCONF_BAREBOX_CONFIG="barebox.config"
PTXCONF_BAREBOX_EXTRA_ENV=y
diff --git a/configs/platform-v7a/rules/barebox-am335x-mlo.make b/configs/platform-v7a/rules/barebox-am335x-mlo.make
index 534566ba9a1a..96b76daccb1b 100644
--- a/configs/platform-v7a/rules/barebox-am335x-mlo.make
+++ b/configs/platform-v7a/rules/barebox-am335x-mlo.make
@@ -40,6 +40,7 @@ BAREBOX_AM335X_MLO_WRAPPER_BLACKLIST := \
BAREBOX_AM335X_MLO_CONF_OPT := \
-C $(BAREBOX_AM335X_MLO_DIR) \
O=$(BAREBOX_AM335X_MLO_BUILD_DIR) \
+ BUILDSYSTEM_VERSION=$(PTXDIST_VCS_VERSION) \
$(call barebox-opts, BAREBOX_AM335X_MLO)
BAREBOX_AM335X_MLO_MAKE_OPT := $(BAREBOX_AM335X_MLO_CONF_OPT)
diff --git a/configs/platform-v7a/rules/barebox-am335x.make b/configs/platform-v7a/rules/barebox-am335x.make
index a10474afe017..4a8dec00ecc4 100644
--- a/configs/platform-v7a/rules/barebox-am335x.make
+++ b/configs/platform-v7a/rules/barebox-am335x.make
@@ -41,6 +41,7 @@ BAREBOX_AM335X_WRAPPER_BLACKLIST := \
BAREBOX_AM335X_CONF_OPT := \
-C $(BAREBOX_AM335X_DIR) \
O=$(BAREBOX_AM335X_BUILD_DIR) \
+ BUILDSYSTEM_VERSION=$(PTXDIST_VCS_VERSION) \
$(call barebox-opts, BAREBOX_AM335X)
BAREBOX_AM335X_MAKE_OPT := $(BAREBOX_AM335X_CONF_OPT)
diff --git a/configs/platform-v7a/rules/barebox-at91.make b/configs/platform-v7a/rules/barebox-at91.make
index 25d6c3f4cba6..a55382a96f35 100644
--- a/configs/platform-v7a/rules/barebox-at91.make
+++ b/configs/platform-v7a/rules/barebox-at91.make
@@ -37,7 +37,9 @@ BAREBOX_AT91_WRAPPER_BLACKLIST := \
TARGET_BUILD_ID
BAREBOX_AT91_CONF_ENV := KCONFIG_NOTIMESTAMP=1
-BAREBOX_AT91_CONF_OPT := $(call barebox-opts, BAREBOX_AT91)
+BAREBOX_AT91_CONF_OPT := \
+ BUILDSYSTEM_VERSION=$(PTXDIST_VCS_VERSION) \
+ $(call barebox-opts, BAREBOX_AT91)
BAREBOX_AT91_MAKE_ENV := $(BAREBOX_AT91_CONF_ENV)
BAREBOX_AT91_MAKE_OPT := $(BAREBOX_AT91_CONF_OPT)
diff --git a/configs/platform-v7a/rules/barebox-common.make b/configs/platform-v7a/rules/barebox-common.make
index 8f7c52fd4c1d..39e860011500 100644
--- a/configs/platform-v7a/rules/barebox-common.make
+++ b/configs/platform-v7a/rules/barebox-common.make
@@ -37,6 +37,7 @@ BAREBOX_COMMON_PATH := PATH=$(HOST_PATH)
BAREBOX_COMMON_CONF_OPT := \
-C $(BAREBOX_COMMON_DIR) \
O=$(BAREBOX_COMMON_BUILD_DIR) \
+ BUILDSYSTEM_VERSION=$(PTXDIST_VCS_VERSION) \
$(call barebox-opts, BAREBOX_COMMON)
BAREBOX_COMMON_MAKE_OPT := $(BAREBOX_COMMON_CONF_OPT)
diff --git a/configs/platform-v7a/rules/barebox-mx6.make b/configs/platform-v7a/rules/barebox-mx6.make
index 525ffd559c0e..c16cc692e6fe 100644
--- a/configs/platform-v7a/rules/barebox-mx6.make
+++ b/configs/platform-v7a/rules/barebox-mx6.make
@@ -41,6 +41,7 @@ BAREBOX_MX6_WRAPPER_BLACKLIST := \
BAREBOX_MX6_CONF_OPT := \
-C $(BAREBOX_MX6_DIR) \
O=$(BAREBOX_MX6_BUILD_DIR) \
+ BUILDSYSTEM_VERSION=$(PTXDIST_VCS_VERSION) \
$(call barebox-opts, BAREBOX_MX6)
BAREBOX_MX6_MAKE_OPT := $(BAREBOX_MX6_CONF_OPT)
diff --git a/configs/platform-v7a/rules/barebox-rpi2.make b/configs/platform-v7a/rules/barebox-rpi2.make
index 636ffebf4206..26ad9805afa3 100644
--- a/configs/platform-v7a/rules/barebox-rpi2.make
+++ b/configs/platform-v7a/rules/barebox-rpi2.make
@@ -41,6 +41,7 @@ BAREBOX_RPI2_WRAPPER_BLACKLIST := \
BAREBOX_RPI2_CONF_OPT := \
-C $(BAREBOX_RPI2_DIR) \
O=$(BAREBOX_RPI2_BUILD_DIR) \
+ BUILDSYSTEM_VERSION=$(PTXDIST_VCS_VERSION) \
$(call barebox-opts, BAREBOX_RPI2)
BAREBOX_RPI2_MAKE_OPT := $(BAREBOX_RPI2_CONF_OPT)
diff --git a/configs/platform-v7a/rules/barebox-stm32mp.make b/configs/platform-v7a/rules/barebox-stm32mp.make
index 2ad1fa4d02b6..9f59e3226894 100644
--- a/configs/platform-v7a/rules/barebox-stm32mp.make
+++ b/configs/platform-v7a/rules/barebox-stm32mp.make
@@ -37,7 +37,9 @@ BAREBOX_STM32MP_WRAPPER_BLACKLIST := \
TARGET_BUILD_ID
BAREBOX_STM32MP_CONF_ENV := KCONFIG_NOTIMESTAMP=1
-BAREBOX_STM32MP_CONF_OPT := $(call barebox-opts, BAREBOX_STM32MP)
+BAREBOX_STM32MP_CONF_OPT := \
+ BUILDSYSTEM_VERSION=$(PTXDIST_VCS_VERSION) \
+ $(call barebox-opts, BAREBOX_STM32MP)
BAREBOX_STM32MP_MAKE_ENV := $(BAREBOX_STM32MP_CONF_ENV)
BAREBOX_STM32MP_MAKE_OPT := $(BAREBOX_STM32MP_CONF_OPT)
diff --git a/configs/platform-v7a/rules/barebox-vexpress.make b/configs/platform-v7a/rules/barebox-vexpress.make
index 625ff79b472d..5c173949d50c 100644
--- a/configs/platform-v7a/rules/barebox-vexpress.make
+++ b/configs/platform-v7a/rules/barebox-vexpress.make
@@ -41,6 +41,7 @@ BAREBOX_VEXPRESS_WRAPPER_BLACKLIST := \
BAREBOX_VEXPRESS_CONF_OPT := \
-C $(BAREBOX_VEXPRESS_DIR) \
O=$(BAREBOX_VEXPRESS_BUILD_DIR) \
+ BUILDSYSTEM_VERSION=$(PTXDIST_VCS_VERSION) \
$(call barebox-opts, BAREBOX_VEXPRESS)
BAREBOX_VEXPRESS_MAKE_OPT := $(BAREBOX_VEXPRESS_CONF_OPT)
diff --git a/configs/platform-v8a/rules/barebox-imx8m.make b/configs/platform-v8a/rules/barebox-imx8m.make
index f9e7d2fd0813..8ea3e4993b87 100644
--- a/configs/platform-v8a/rules/barebox-imx8m.make
+++ b/configs/platform-v8a/rules/barebox-imx8m.make
@@ -40,6 +40,7 @@ BAREBOX_IMX8M_WRAPPER_BLACKLIST := \
BAREBOX_IMX8M_CONF_OPT := \
-C $(BAREBOX_IMX8M_DIR) \
O=$(BAREBOX_IMX8M_BUILD_DIR) \
+ BUILDSYSTEM_VERSION=$(PTXDIST_VCS_VERSION) \
$(call barebox-opts, BAREBOX_IMX8M)
BAREBOX_IMX8M_MAKE_OPT := $(BAREBOX_IMX8M_CONF_OPT)
--
2.29.2
_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de
next prev parent reply other threads:[~2021-04-09 23:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-09 23:02 [DistroKit] [PATCH 1/3] ptxdist: migrate 2021.03.0 -> 2021.04.0 Roland Hieber
2021-04-09 23:02 ` [DistroKit] [PATCH 2/3] mips: kernel: properly handle signed modules Roland Hieber
2021-04-23 10:55 ` Robert Schwebel
2021-04-09 23:02 ` Roland Hieber [this message]
2021-04-23 10:55 ` [DistroKit] [PATCH 3/3] barebox: set barebox build sytem version Robert Schwebel
2021-04-23 10:54 ` [DistroKit] [PATCH 1/3] ptxdist: migrate 2021.03.0 -> 2021.04.0 Robert Schwebel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210409230252.28738-3-rhi@pengutronix.de \
--to=rhi@pengutronix.de \
--cc=distrokit@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox