From c335b13d63a7d62cd8f746f7333b6a3a418e6614 Mon Sep 17 00:00:00 2001 From: Ryan Eatmon Date: Wed, 28 Feb 2024 16:16:55 -0600 Subject: u-boot-ti: Change from UBOOT_LOCALVERSION and SRCPV Stop using UBOOT_LOCALVERSION, and copy what is done in the kernel recipe. This allows us to set the correct SHA into the version string even if AUTOREV is used since SRCPV is no longer set in oe-core. Signed-off-by: Ryan Eatmon --- meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc index 42ddf40f..2a35c3c8 100644 --- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc @@ -1,6 +1,9 @@ -# UBOOT_LOCALVERSION can be set to add a tag to the end of the -# U-boot version string. such as the commit id -UBOOT_LOCALVERSION = "-g${@d.getVar('SRCPV', True).replace('AUTOINC+','')[:10]}" +do_compile:prepend () { + scm_version=$(printf '%s%s' -ti-g $(git -C ${S} rev-parse --verify HEAD 2>/dev/null | cut -c1-12)) + + echo ${scm_version} > ${B}/.scmversion + echo ${scm_version} > ${S}/.scmversion +} UBOOT_SUFFIX ?= "img" SPL_BINARY ?= "MLO" -- cgit v1.2.3-54-g00ecf