From 339ae4c94429f520414f7250ed4fb11d504f635c Mon Sep 17 00:00:00 2001 From: Ryan Eatmon Date: Wed, 28 Feb 2024 13:49:20 -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 855307d9..2c0d4fc4 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