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 <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2026-07-06 05:28:09 +02:00
parent 2a51fc41d7
commit e3a0426154
+9
View File
@@ -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