summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
diff options
context:
space:
mode:
authorDevarsh Thakkar <devarsht@ti.com>2022-05-02 14:51:09 +0000
committerRyan Eatmon <reatmon@ti.com>2022-05-02 11:31:08 -0500
commit885ebfc2482ce9dad752617d93f4b1aa9fca9d93 (patch)
tree25072614fbca5f0ab1a21fd508ea82c363f5866e /meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc
parent14bf3b06b1b84ebf7249aae753fc2e674538a5ca (diff)
downloadmeta-ti-885ebfc2482ce9dad752617d93f4b1aa9fca9d93.tar.gz
u-boot-ti: Use SRCREV to get short commit ID
Due to recent security update in git, we are not able to fetch revision currently using existing method: https://github.blog/2022-04-12-git-security-vulnerability-announced/ So instead, use the SRCREV to parse the short commit ID and set the UBOOT_LOCALVERSION variable. Signed-off-by: Devarsh Thakkar <devarsht@ti.com> Signed-off-by: Ryan Eatmon <reatmon@ti.com> Signed-off-by: Denys Dmytriyenko <denys@konsulko.com> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Diffstat (limited to 'meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc')
-rw-r--r--meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc10
1 files changed, 1 insertions, 9 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 c3c32f9c..5ddcaff7 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,14 +1,6 @@
1# UBOOT_LOCALVERSION can be set to add a tag to the end of the 1# UBOOT_LOCALVERSION can be set to add a tag to the end of the
2# U-boot version string. such as the commit id 2# U-boot version string. such as the commit id
3def get_git_revision(p): 3UBOOT_LOCALVERSION = "-g${@d.getVar("SRCREV", False).__str__()[:10]}"
4 import subprocess
5
6 try:
7 return subprocess.Popen("git rev-parse HEAD 2>/dev/null ", cwd=p, shell=True, stdout=subprocess.PIPE, universal_newlines=True).communicate()[0].rstrip()
8 except OSError:
9 return None
10
11UBOOT_LOCALVERSION = "-g${@get_git_revision('${S}').__str__()[:10]}"
12 4
13UBOOT_SUFFIX ?= "img" 5UBOOT_SUFFIX ?= "img"
14SPL_BINARY ?= "MLO" 6SPL_BINARY ?= "MLO"