From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Sat, 10 Apr 2021 01:03:16 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lV09j-0000FE-WF for lore@lore.pengutronix.de; Sat, 10 Apr 2021 01:03:16 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lV09j-0002QU-CY; Sat, 10 Apr 2021 01:03:15 +0200 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lV09c-0002PT-Ci; Sat, 10 Apr 2021 01:03:08 +0200 Received: from rhi by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lV09c-0005eC-2X; Sat, 10 Apr 2021 01:03:08 +0200 From: Roland Hieber To: distrokit@pengutronix.de Date: Sat, 10 Apr 2021 01:02:52 +0200 Message-Id: <20210409230252.28738-3-rhi@pengutronix.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210409230252.28738-1-rhi@pengutronix.de> References: <20210409230252.28738-1-rhi@pengutronix.de> MIME-Version: 1.0 Subject: [DistroKit] [PATCH 3/3] barebox: set barebox build sytem version X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Roland Hieber Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false 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 | 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 | Message-Id: <20210401083641.9251-2-s.trumtrar@pengutronix.de> | Signed-off-by: Michael Olbrich 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 --- 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