aboutsummaryrefslogtreecommitdiffstats
path: root/include/u-boot.mk
diff options
context:
space:
mode:
authorJosef Schlehofer <pepe.schlehofer@gmail.com>2022-02-21 18:55:15 +0100
committerPaul Spooren <mail@aparcar.org>2022-02-28 23:54:52 +0100
commitd6aa9d9e071d9f23ed26f5142991bc66aefe20f5 (patch)
tree37e8f79dce99b780fdaf289a2ca22bb6fa840a32 /include/u-boot.mk
parenta9478490d86e16f130f12fe5394ee484dcf13822 (diff)
downloadupstream-d6aa9d9e071d9f23ed26f5142991bc66aefe20f5.tar.gz
upstream-d6aa9d9e071d9f23ed26f5142991bc66aefe20f5.tar.bz2
upstream-d6aa9d9e071d9f23ed26f5142991bc66aefe20f5.zip
u-boot.mk: add LOCALVERSION (explicitly specify OpenWrt build)
For debugging purposes, we need to know if users are using modified U-boot versions or not. Currently, the U-boot version is somehow stripped. This is a little bit problematic when there are backported/wip/to-upstream patches. To make it more confusing, there was (before this commit) two U-boot versioning. U-boot compiled by OpenWrt build bots are missing ``Build:`` This is also the case when the U-boot is compiled locally. Example: ``` U-Boot SPL 2022.01 (Jan 27 2022 - 00:24:34 +0000) U-Boot 2022.01 (Jan 27 2022 - 00:24:34 +0000) ``` On the other hand, if you run full build, you can at least see, where it was compiled. Notice added ``Build:``. Example: ``` U-Boot 2022.01 (Jan 27 2022 - 00:24:34 +0000), Build: jenkins-turris-os-packages-burstlab-omnia-216 ``` In both cases, it is not clear to U-boot developers if it is an unmodified build. This is also caused that there is a missing ``.git`` file from U-boot folder, and so there is no history. It leads to that it can not contain suffix ``-dirty`` (uncommitted modifications) or even something else like number of commits, etc. [1] When U-boot is compiled as it should be, the version should look like this: ``U-Boot 2022.04-rc1-01173-g278195ea1f (Feb 11 2022 - 14:46:50 +0100)`` The date is not changed daily when there are new OpenWrt builds. This commit adds OpenWrt specific version, which could be verified by using strings. ``` $ strings bin/targets/mvebu/cortexa9/u-boot-omnia/u-boot-spl.kwb | grep -E "OpenWrt*" U-Boot SPL 2022.01-OpenWrt-r18942+54-cbfce92367 (Feb 21 2022 - 13:17:34 +0000) arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r18942+54-cbfce92367) 11.2.0 2022.01-OpenWrt-r18942+54-cbfce92367 U-Boot 2022.01-OpenWrt-r18942+54-cbfce92367 (Feb 21 2022 - 13:17:34 +0000) ``` [1] https://u-boot.readthedocs.io/en/latest/develop/version.html Reported-by: Pali Rohár <pali@kernel.org> Suggested-by: Karel Kočí <karel.koci@nic.cz> Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Diffstat (limited to 'include/u-boot.mk')
-rw-r--r--include/u-boot.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/u-boot.mk b/include/u-boot.mk
index 509b3d76dc..8945e8e2b8 100644
--- a/include/u-boot.mk
+++ b/include/u-boot.mk
@@ -45,6 +45,7 @@ UBOOT_MAKE_FLAGS = \
HOSTCC="$(HOSTCC)" \
HOSTCFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) -std=gnu11" \
HOSTLDFLAGS="$(HOST_LDFLAGS)" \
+ LOCALVERSION="-OpenWrt-$(REVISION)" \
STAGING_PREFIX="$(STAGING_DIR_HOST)" \
PKG_CONFIG_PATH="$(STAGING_DIR_HOST)/lib/pkgconfig" \
PKG_CONFIG_LIBDIR="$(STAGING_DIR_HOST)/lib/pkgconfig" \