From e3a04261545bc46dbdfa3168df6b14fd74da9df4 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sat, 4 Jul 2026 14:11:46 +0200 Subject: [PATCH] board: mark developer U-Boot builds with -DEVEL Developer builds report the bare upstream U-Boot version, e.g. 2025.01, and are easily mistaken for release builds. Nothing stamps a local version on non-release builds to tell them apart. Write a .scmversion of -DEVEL from a pre-build hook when INFIX_RELEASE is unset, so developer builds report 2025.01-DEVEL. Release builds are left untouched. Closes #919 Signed-off-by: Joachim Wiberg --- board/common/uboot/uboot.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/board/common/uboot/uboot.mk b/board/common/uboot/uboot.mk index cd8f4b2a..63f65d7e 100644 --- a/board/common/uboot/uboot.mk +++ b/board/common/uboot/uboot.mk @@ -46,3 +46,12 @@ define UBOOT_PRE_BUILD_INSTALL_ENV $(@D)/arch/$(UBOOT_ARCH)/dts/ endef UBOOT_PRE_BUILD_HOOKS += UBOOT_PRE_BUILD_INSTALL_ENV + +# Stamp non-release builds so they cannot be mistaken for a release, +# U-Boot's setlocalversion picks up .scmversion, see issue #919. +define UBOOT_PRE_BUILD_DEVEL_VERSION + echo "-DEVEL" >$(@D)/.scmversion +endef +ifeq ($(INFIX_RELEASE),) +UBOOT_PRE_BUILD_HOOKS += UBOOT_PRE_BUILD_DEVEL_VERSION +endif