Skip to contentSkip to conversation

u-boot-ti: Use SRCPV instead of SRCREV for U_BOOT_LOCAL_VERSION

PATCH In review Nishanth Menon 2 participants 2 messages Apr 28, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 u-boot-ti: Use SRCPV instead of SRCREV for U_BOOT_LOCAL_VERSION

SRCREV works with fixed commits, but when we use AUTOREV for a downstream distro bbappend, we will end up getting a bad local revision.

Lets use SRCPV instead, which bitbake already deals with sensibly.

[1] https://www.yoctoproject.org/docs/2.5.1/dev-manual/dev-manual.html#automatically-incrementing-a-binary-package-revision-number

Fixes 39fa0c1d3d02 ("u-boot-ti: Use SRCREV to get short commit ID")

---

I think we had a case of dunfell updated with a partial fix.

as discussed in review of the original patch:
https://lore.kernel.org/all/[email protected]/
a) we should have used SRCPV that deals with AUTOREV better
b) we should have fixed the kernel rev as well.. which is broke as well (follow on patch)

Changes since V1:
* Update to fix up the $subject to indicate the branch. (sorry for the noise).

V1: https://lore.kernel.org/all/[email protected]/

 recipes-bsp/u-boot/u-boot-ti.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-bsp/u-boot/u-boot-ti.inc +1 -1
index cc775e2e271c..903c61f09004 100644
@@ -1,6 +1,6 @@
 # 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("SRCREV", False).__str__()[:10]}"
+UBOOT_LOCALVERSION = "-g${@d.getVar('SRCPV', True).split('+')[1]}"
 
 UBOOT_SUFFIX ?= "img"
 SPL_BINARY ?= "MLO"
Signature · 1 line
2.31.1
#1 lore raw

Patch applied to dunfell-wip.

Quoted 42 lines · Nishanth Menon

SRCREV works with fixed commits, but when we use AUTOREV for a downstream distro bbappend, we will end up getting a bad local revision.

Lets use SRCPV instead, which bitbake already deals with sensibly.

[1] https://www.yoctoproject.org/docs/2.5.1/dev-manual/dev-manual.html#automatically-incrementing-a-binary-package-revision-number

Fixes 39fa0c1d3d02 ("u-boot-ti: Use SRCREV to get short commit ID")

---

I think we had a case of dunfell updated with a partial fix.

as discussed in review of the original patch:
https://lore.kernel.org/all/[email protected]/
a) we should have used SRCPV that deals with AUTOREV better
b) we should have fixed the kernel rev as well.. which is broke as well (follow on patch)

Changes since V1:
* Update to fix up the $subject to indicate the branch. (sorry for the noise).

V1: https://lore.kernel.org/all/[email protected]/

  recipes-bsp/u-boot/u-boot-ti.inc | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
recipes-bsp/u-boot/u-boot-ti.inc +1 -1
index cc775e2e271c..903c61f09004 100644
@@ -1,6 +1,6 @@
  # 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("SRCREV", False).__str__()[:10]}"
+UBOOT_LOCALVERSION = "-g${@d.getVar('SRCPV', True).split('+')[1]}"
 
  UBOOT_SUFFIX ?= "img"
  SPL_BINARY ?= "MLO"
Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS