[3/7] arm/fvp: add more helper variables for the versioning

Message ID 20220325134853.3068169-3-ross.burton@arm.com
State New
Headers show
Series [1/7] arm/fvp: generalise FVP_ARCH | expand

Commit Message

Ross Burton March 25, 2022, 1:48 p.m. UTC
Add more helper variables for the FVP version to help construct URLs.

If PV is 1.2.3, then VERSION is 1.2 and BUILD is 3.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta-arm/recipes-devtools/fvp/fvp-common.inc | 4 ++++
 1 file changed, 4 insertions(+)

Patch

diff --git a/meta-arm/recipes-devtools/fvp/fvp-common.inc b/meta-arm/recipes-devtools/fvp/fvp-common.inc
index cf6cad04..f7cdca80 100644
--- a/meta-arm/recipes-devtools/fvp/fvp-common.inc
+++ b/meta-arm/recipes-devtools/fvp/fvp-common.inc
@@ -15,6 +15,10 @@  def get_real_pv(d):
     # FVP versions are like 11.12_43
     pv = d.getVar("PV")
     return "%s.%s_%s" % tuple(pv.split("."))
+
+# If PV is 1.2.3, VERSION=1.2, BUILD=3, PV_URL=1.2_3.
+VERSION = "${@oe.utils.trim_version(d.getVar('PV', -1))}"
+BUILD = "${@d.getVar('PV').split('.')[-1]}"
 PV_URL = "${@get_real_pv(d)}"
 
 # The directory the FVP is installed into