From: Jan Kiszka <[email protected]>

Rework the U-Boot recipe to use TF-A as a package, rather than building
it in an embedded fashion.

While at it, bump to TF-A 2.3 and U-Boot 2020.07.

Signed-off-by: Jan Kiszka <[email protected]>
---
 .../trusted-firmware-a-pine64-plus_2.3.bb     | 14 ++++++++
 recipes-bsp/u-boot/files/pine64-plus-rules    | 10 +++---
 recipes-bsp/u-boot/u-boot-2020.07.inc         | 17 ++++++++++
 .../u-boot-pine64-plus_2019.10-atf2.2.bb      | 33 -------------------
 .../u-boot/u-boot-pine64-plus_2020.07.bb      | 25 ++++++++++++++
 5 files changed, 60 insertions(+), 39 deletions(-)
 create mode 100644 
recipes-bsp/trusted-firmware-a/trusted-firmware-a-pine64-plus_2.3.bb
 create mode 100644 recipes-bsp/u-boot/u-boot-2020.07.inc
 delete mode 100644 recipes-bsp/u-boot/u-boot-pine64-plus_2019.10-atf2.2.bb
 create mode 100644 recipes-bsp/u-boot/u-boot-pine64-plus_2020.07.bb

diff --git 
a/recipes-bsp/trusted-firmware-a/trusted-firmware-a-pine64-plus_2.3.bb 
b/recipes-bsp/trusted-firmware-a/trusted-firmware-a-pine64-plus_2.3.bb
new file mode 100644
index 0000000..9b27cab
--- /dev/null
+++ b/recipes-bsp/trusted-firmware-a/trusted-firmware-a-pine64-plus_2.3.bb
@@ -0,0 +1,14 @@
+#
+# Jailhouse, a Linux-based partitioning hypervisor
+#
+# Copyright (c) Siemens AG, 2019-2020
+#
+# Authors:
+#  Jan Kiszka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require trusted-firmware-a_${PV}.inc
+
+TF_A_PLATFORM = "sun50i_a64"
diff --git a/recipes-bsp/u-boot/files/pine64-plus-rules 
b/recipes-bsp/u-boot/files/pine64-plus-rules
index f6340f7..4cd5d77 100644
--- a/recipes-bsp/u-boot/files/pine64-plus-rules
+++ b/recipes-bsp/u-boot/files/pine64-plus-rules
@@ -14,14 +14,12 @@ ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
 export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)-
 SET_CROSS_BUILD_TOOLS=CROSS_BUILD_TOOLS=y
 endif
-PARALLEL_BUILD=-j $(shell echo $$(($$(nproc) * 2)))
 
 override_dh_auto_build:
-       $(MAKE) $(PARALLEL_BUILD) -C ../arm-trusted-firmware-* PLAT=sun50i_a64 
bl31
-       $(MAKE) $(PARALLEL_BUILD) $(U_BOOT_CONFIG)
-       BL31=$$(readlink -f 
../arm-trusted-firmware-*/build/sun50i_a64/release/bl31.bin) \
-       $(MAKE) $(PARALLEL_BUILD) $(U_BOOT_BIN)
-       $(MAKE) $(PARALLEL_BUILD) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 envtools
+       $(MAKE) $(PARALLEL_MAKE) $(U_BOOT_CONFIG)
+       $(MAKE) $(PARALLEL_MAKE) $(U_BOOT_BIN) \
+               BL31=/usr/lib/trusted-firmware-a/pine64-plus/bl31.bin
+       $(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 envtools
 
 override_dh_auto_install:
        mv tools/env/lib.a tools/env/libubootenv.a
diff --git a/recipes-bsp/u-boot/u-boot-2020.07.inc 
b/recipes-bsp/u-boot/u-boot-2020.07.inc
new file mode 100644
index 0000000..acdaa8e
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-2020.07.inc
@@ -0,0 +1,17 @@
+#
+# Jailhouse, a Linux-based partitioning hypervisor
+#
+# Copyright (c) Siemens AG, 2020
+#
+# Authors:
+#  Jan Kiszka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require recipes-bsp/u-boot/u-boot-custom.inc
+
+SRC_URI += "https://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2";
+SRC_URI[sha256sum] = 
"c1f5bf9ee6bb6e648edbf19ce2ca9452f614b08a9f886f1a566aa42e8cf05f6a"
+
+S = "${WORKDIR}/u-boot-${PV}"
diff --git a/recipes-bsp/u-boot/u-boot-pine64-plus_2019.10-atf2.2.bb 
b/recipes-bsp/u-boot/u-boot-pine64-plus_2019.10-atf2.2.bb
deleted file mode 100644
index af911a5..0000000
--- a/recipes-bsp/u-boot/u-boot-pine64-plus_2019.10-atf2.2.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-# Jailhouse, a Linux-based partitioning hypervisor
-#
-# Copyright (c) Vijai Kumar K, 2020
-#
-# Authors:
-#  Vijai Kumar K <[email protected]>
-#
-# 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 += " \
-    https://ftp.denx.de/pub/u-boot/u-boot-${U_BOOT_PV}.tar.bz2;name=u-boot \
-    file://pine64-plus-rules \
-    "
-SRC_URI[u-boot.sha256sum] = 
"8d6d6070739522dd236cba7055b8736bfe92b4fac0ea18ad809829ca79667014"
-
-U_BOOT_CONFIG="pine64_plus_defconfig"
-U_BOOT_BIN="u-boot-sunxi-with-spl.bin"
-
-BUILD_DEPENDS += ", libssl-dev, swig:native, python-dev:native"
-
-S = "${WORKDIR}/u-boot-${U_BOOT_PV}"
-
-do_prepare_build_append() {
-    cp ${WORKDIR}/pine64-plus-rules ${S}/debian/rules
-}
diff --git a/recipes-bsp/u-boot/u-boot-pine64-plus_2020.07.bb 
b/recipes-bsp/u-boot/u-boot-pine64-plus_2020.07.bb
new file mode 100644
index 0000000..b813ae8
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-pine64-plus_2020.07.bb
@@ -0,0 +1,25 @@
+#
+# Jailhouse, a Linux-based partitioning hypervisor
+#
+# Copyright (c) Vijai Kumar K, 2020
+#
+# Authors:
+#  Vijai Kumar K <[email protected]>
+#  Jan Kiszka <[email protected]>
+#
+# SPDX-License-Identifier: MIT
+#
+
+require u-boot-${PV}.inc
+
+SRC_URI += "file://pine64-plus-rules"
+
+U_BOOT_CONFIG = "pine64_plus_defconfig"
+U_BOOT_BIN = "u-boot-sunxi-with-spl.bin"
+
+BUILD_DEPENDS += ", libssl-dev, swig:native, python3-dev:native, 
trusted-firmware-a-pine64-plus"
+DEPENDS += "trusted-firmware-a-pine64-plus"
+
+do_prepare_build_append() {
+    cp ${WORKDIR}/pine64-plus-rules ${S}/debian/rules
+}
-- 
2.26.2

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/ef8d6552bd2b92e177ce16a4d1dd403efaa07e4a.1601876389.git.jan.kiszka%40siemens.com.

Reply via email to