From: Jan Kiszka <[email protected]>

This is going to be reused for other targets.

While refactoring, also derive U_BOOT_PV and ATF_PV from the package
file version.

Signed-off-by: Jan Kiszka <[email protected]>
---
 .../arm-trusted-firmware_1.6.inc                   | 23 ++++++++++++++++++++++
 ...tools-Fix-broken-object-compilation-rules.patch |  0
 .../u-boot/u-boot-macchiatobin_2018.09-atf1.6.bb   | 12 ++++-------
 3 files changed, 27 insertions(+), 8 deletions(-)
 create mode 100644 
recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_1.6.inc
 rename recipes-bsp/{u-boot => 
arm-trusted-firmware}/files/0001-tools-Fix-broken-object-compilation-rules.patch
 (100%)

diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_1.6.inc 
b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_1.6.inc
new file mode 100644
index 0000000..8f31f43
--- /dev/null
+++ b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_1.6.inc
@@ -0,0 +1,23 @@
+#
+# Jailhouse, a Linux-based partitioning hypervisor
+#
+# Copyright (c) Siemens AG, 2018, 2019
+#
+# Authors:
+#  Jan Kiszka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+FILESPATH =. "${LAYERDIR_jailhouse}/recipes-bsp/arm-trusted-firmware/files:"
+
+SRC_URI += " \
+    
https://github.com/ARM-software/arm-trusted-firmware/archive/v${ATF_PV}.tar.gz;name=atf
 \
+    file://0001-tools-Fix-broken-object-compilation-rules.patch;apply=no \
+    "
+SRC_URI[atf.sha256sum] = 
"62120368f2196d3e126296c8116f3399568e100960a5122e52017d22766b7009"
+
+do_prepare_build_append() {
+    patch -d ${WORKDIR}/arm-trusted-firmware-${ATF_PV} -p1 \
+        -i ${WORKDIR}/0001-tools-Fix-broken-object-compilation-rules.patch
+}
diff --git 
a/recipes-bsp/u-boot/files/0001-tools-Fix-broken-object-compilation-rules.patch 
b/recipes-bsp/arm-trusted-firmware/files/0001-tools-Fix-broken-object-compilation-rules.patch
similarity index 100%
rename from 
recipes-bsp/u-boot/files/0001-tools-Fix-broken-object-compilation-rules.patch
rename to 
recipes-bsp/arm-trusted-firmware/files/0001-tools-Fix-broken-object-compilation-rules.patch
diff --git a/recipes-bsp/u-boot/u-boot-macchiatobin_2018.09-atf1.6.bb 
b/recipes-bsp/u-boot/u-boot-macchiatobin_2018.09-atf1.6.bb
index 0f05d76..18b0d12 100644
--- a/recipes-bsp/u-boot/u-boot-macchiatobin_2018.09-atf1.6.bb
+++ b/recipes-bsp/u-boot/u-boot-macchiatobin_2018.09-atf1.6.bb
@@ -9,22 +9,21 @@
 # SPDX-License-Identifier: MIT
 #
 
+U_BOOT_PV="${@d.getVar('PV').split('-atf')[0]}"
+ATF_PV="${@d.getVar('PV').split('-atf')[1]}"
+
 require recipes-bsp/u-boot/u-boot-custom.inc
+require recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_${ATF_PV}.inc
 
 SRC_URI += " \
     ftp://ftp.denx.de/pub/u-boot/u-boot-${U_BOOT_PV}.tar.bz2;name=u-boot \
-    
https://github.com/ARM-software/arm-trusted-firmware/archive/v${ATF_PV}.tar.gz;name=atf
 \
     
git://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell;protocol=https;branch=mv_ddr-armada-atf-mainline;rev=${MV_DDR_REV};destsuffix=mv-ddr-marvell
 \
     
git://github.com/MarvellEmbeddedProcessors/binaries-marvell;protocol=https;branch=${MV_BIN_BRANCH};rev=${MV_BIN_REV};destsuffix=binaries-marvell
 \
     
git://github.com/MarvellEmbeddedProcessors/ble-marvell.git;protocol=https;branch=atf-mainline;rev=${MV_BLE_REV};destsuffix=ble-marvell
 \
-    file://0001-tools-Fix-broken-object-compilation-rules.patch;apply=no \
     file://macchiatobin-rules \
     "
 SRC_URI[u-boot.sha256sum] = 
"839bf23cfe8ce613a77e583a60375179d0ad324e92c82fbdd07bebf0fd142268"
-SRC_URI[atf.sha256sum] = 
"62120368f2196d3e126296c8116f3399568e100960a5122e52017d22766b7009"
 
-U_BOOT_PV="2018.09"
-ATF_PV="1.6"
 MV_DDR_REV="779e860c3b81eda192dd40270f46c0ff44e52113"
 MV_BIN_BRANCH="binaries-marvell-armada-18.06"
 MV_BIN_REV="14481806e699dcc6f7025dbe3e46cf26bb787791"
@@ -40,7 +39,4 @@ do_prepare_build_append() {
 
     echo 
"../arm-trusted-firmware-${ATF_PV}/build/a80x0_mcbin/release/flash-image.bin 
/usr/lib/u-boot/macchiatobin" > \
         ${S}/debian/u-boot-macchiatobin.install
-
-    patch -d ${WORKDIR}/arm-trusted-firmware-${ATF_PV} -p1 \
-        -i ${WORKDIR}/0001-tools-Fix-broken-object-compilation-rules.patch
 }
-- 
2.16.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to