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 <[email protected]>
---
 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"
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17494): 
https://lists.yoctoproject.org/g/meta-ti/message/17494
Mute This Topic: https://lists.yoctoproject.org/mt/104633134/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to