[meta-arm] arm-bsp: Fix the PV variable for edk2

Submitted by Khasim Mohammed on June 15, 2020, 4:28 p.m. | Patch ID: 173602


Message ID 20200615162811.8860-1-khasim.mohammed@arm.com
State New
Headers show

Commit Message

Khasim Mohammed June 15, 2020, 4:28 p.m.
PV variable is being set as PV=git by bitbake which is incorrect.
This patch fixes the PV variable.

Change-Id: Ie5a0f8b753fc2f7ac103c6d024c7134f88264079
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
 meta-arm-bsp/recipes-bsp/uefi/edk2-firmware-n1sdp.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta-arm-bsp/recipes-bsp/uefi/edk2-firmware-n1sdp.inc b/meta-arm-bsp/recipes-bsp/uefi/edk2-firmware-n1sdp.inc
index c8fc70a..3114c47 100644
--- a/meta-arm-bsp/recipes-bsp/uefi/edk2-firmware-n1sdp.inc
+++ b/meta-arm-bsp/recipes-bsp/uefi/edk2-firmware-n1sdp.inc
@@ -16,4 +16,5 @@  EDK2_ARCH          = "AARCH64"
-PV ?= "201908+git${SRCPV}"
+SRCPV_COMBINED := "${@bb.fetch2.get_srcrev(d).replace('AUTOINC+','')}"
+PV = "201908+git${SRCPV_COMBINED}"


Ross Burton June 16, 2020, 1:42 p.m.
On Mon, 15 Jun 2020 at 17:28, Khasim Mohammed <khasim.mohammed@arm.com> wrote:
> -PV ?= "201908+git${SRCPV}"

It's the ? which is the problem here, as bitbake.conf sets a value so
?= never happens.

PV = "1.2+git${SRCPV}" is the idiomatic way to do this.  Grepping poky:

recipes-bsp/u-boot/libubootenv_0.2.bb:PV = "0.2+git${SRCPV}"

And another 30-odd instances.

You'll need to set SRCREV_FORMAT to define how the two srcrevs are
turned into a PV:

SRCREV_FORMAT = "edk2_edk2-platforms"

But doing that results in a recursion error.  I scratched my head over
this for a minute before realising that it's actually pretty simple:
the SRC_URL uses destsuffix to control where the git modules are
checked out too, with absolute paths via ${S}. ${S} contains ${PV}.
${PV} depends on the source references, so that's the loop.

So the simple fix is:
1) Turn the existing PV ?= into PV =
3) Use relative paths in destsuffix (e.g. destsuffix=edk2) as the
paths are relative to ${WORKDIR}.

Links: You receive all messages sent to this group.

View/Reply Online (#674): https://lists.yoctoproject.org/g/meta-arm/message/674
Mute This Topic: https://lists.yoctoproject.org/mt/74898405/3617530
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub  [oe-patchwork@oe-patch.openembedded.org]