From: Jan Kiszka <[email protected]>

Rework the U-Boot recipes 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. The latter allows to
drop one patch.

Signed-off-by: Jan Kiszka <[email protected]>
---
 .../trusted-firmware-a-ultra96_2.3.bb         | 17 ++++++++++
 ...efile-fix-HOSTCFLAGS-with-CROSS_BUIL.patch | 31 -------------------
 recipes-bsp/u-boot/files/ultra96-rules        |  3 --
 recipes-bsp/u-boot/files/ultra96.bif.tmpl     |  2 +-
 ...atf2.2.bb => u-boot-ultra96-v1_2020.07.bb} | 21 ++++---------
 .../u-boot-ultra96-v2_2019.10-atf2.2.bb       |  1 -
 .../u-boot/u-boot-ultra96-v2_2020.07.bb       |  1 +
 7 files changed, 25 insertions(+), 51 deletions(-)
 create mode 100644 
recipes-bsp/trusted-firmware-a/trusted-firmware-a-ultra96_2.3.bb
 delete mode 100644 
recipes-bsp/u-boot/files/0001-Revert-tools-Makefile-fix-HOSTCFLAGS-with-CROSS_BUIL.patch
 rename recipes-bsp/u-boot/{u-boot-ultra96-v1_2019.10-atf2.2.bb => 
u-boot-ultra96-v1_2020.07.bb} (50%)
 delete mode 120000 recipes-bsp/u-boot/u-boot-ultra96-v2_2019.10-atf2.2.bb
 create mode 120000 recipes-bsp/u-boot/u-boot-ultra96-v2_2020.07.bb

diff --git a/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ultra96_2.3.bb 
b/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ultra96_2.3.bb
new file mode 100644
index 0000000..7b8b48b
--- /dev/null
+++ b/recipes-bsp/trusted-firmware-a/trusted-firmware-a-ultra96_2.3.bb
@@ -0,0 +1,17 @@
+#
+# 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_NAME = "ultra96"
+TF_A_PLATFORM = "zynqmp"
+TF_A_EXTRA_BUILDARGS = "RESET_TO_BL31=1 ZYNQMP_CONSOLE=cadence1"
+TF_A_BINARIES = "bl31/bl31.elf"
diff --git 
a/recipes-bsp/u-boot/files/0001-Revert-tools-Makefile-fix-HOSTCFLAGS-with-CROSS_BUIL.patch
 
b/recipes-bsp/u-boot/files/0001-Revert-tools-Makefile-fix-HOSTCFLAGS-with-CROSS_BUIL.patch
deleted file mode 100644
index ac20d26..0000000
--- 
a/recipes-bsp/u-boot/files/0001-Revert-tools-Makefile-fix-HOSTCFLAGS-with-CROSS_BUIL.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 06b5faeb1e6b18c86dc5fcdd1cc764ee49da1fbe Mon Sep 17 00:00:00 2001
-From: Jan Kiszka <[email protected]>
-Date: Sun, 25 Aug 2019 13:39:41 +0200
-Subject: [PATCH] Revert "tools/Makefile: fix HOSTCFLAGS with
- CROSS_BUILD_TOOLS"
-
-This reverts commit 72c69ea8d603fd2448dd1d7c399c4f77b77773b7.
-
-Breaks CROSS_BUILD_TOOLS=y build with CONFIG_FIT and without
-CONFIG_FIT_SIGNATURE.
-
-Signed-off-by: Jan Kiszka <[email protected]>
----
- tools/Makefile | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/tools/Makefile b/tools/Makefile
-index 33e90a8025..2717304003 100644
---- a/tools/Makefile
-+++ b/tools/Makefile
-@@ -274,7 +274,6 @@ subdir- += env
- 
- ifneq ($(CROSS_BUILD_TOOLS),)
- override HOSTCC = $(CC)
--override HOSTCFLAGS = $(CFLAGS)
- 
- quiet_cmd_crosstools_strip = STRIP   $^
-       cmd_crosstools_strip = $(STRIP) $^; touch $@
--- 
-2.16.4
-
diff --git a/recipes-bsp/u-boot/files/ultra96-rules 
b/recipes-bsp/u-boot/files/ultra96-rules
index a21e468..639c9ef 100644
--- a/recipes-bsp/u-boot/files/ultra96-rules
+++ b/recipes-bsp/u-boot/files/ultra96-rules
@@ -18,9 +18,6 @@ endif
 PARALLEL_BUILD=-j $(shell echo $$(($$(nproc) * 2)))
 
 override_dh_auto_build:
-       $(MAKE) $(PARALLEL_BUILD) -C ../arm-trusted-firmware-* \
-               PLAT=zynqmp RESET_TO_BL31=1 bl31
-
        echo "CONFIG_BOOTCOMMAND=\"setenv fdtfile 
xilinx/avnet-ultra96-rev$(ULTRA96_VERSION).dtb; run distro_bootcmd\"" \
            >> configs/${U_BOOT_CONFIG}
        echo "CONFIG_WATCHDOG=n" >> configs/${U_BOOT_CONFIG}
diff --git a/recipes-bsp/u-boot/files/ultra96.bif.tmpl 
b/recipes-bsp/u-boot/files/ultra96.bif.tmpl
index e972929..64af516 100644
--- a/recipes-bsp/u-boot/files/ultra96.bif.tmpl
+++ b/recipes-bsp/u-boot/files/ultra96.bif.tmpl
@@ -14,6 +14,6 @@ image : {
        [pmufw_image] /usr/share/zynqmp-pmufw/executable.elf
        [bootloader, destination_cpu=a5x-0] 
../ultra96-v${ULTRA96_VERSION}-fsbl.elf
        ../ultra96-v${ULTRA96_VERSION}.bit
-       [destination_cpu=a5x-0, exception_level=el-3,trustzone] 
../arm-trusted-firmware-${ATF_PV}/build/zynqmp/release/bl31/bl31.elf
+       [destination_cpu=a5x-0, exception_level=el-3,trustzone] 
/usr/lib/trusted-firmware-a/ultra96/bl31.elf
        [destination_cpu=a5x-0, exception_level=el-2] u-boot.elf
 }
diff --git a/recipes-bsp/u-boot/u-boot-ultra96-v1_2019.10-atf2.2.bb 
b/recipes-bsp/u-boot/u-boot-ultra96-v1_2020.07.bb
similarity index 50%
rename from recipes-bsp/u-boot/u-boot-ultra96-v1_2019.10-atf2.2.bb
rename to recipes-bsp/u-boot/u-boot-ultra96-v1_2020.07.bb
index fd593f7..bfee2fe 100644
--- a/recipes-bsp/u-boot/u-boot-ultra96-v1_2019.10-atf2.2.bb
+++ b/recipes-bsp/u-boot/u-boot-ultra96-v1_2020.07.bb
@@ -9,34 +9,25 @@
 # 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
+require u-boot-${PV}.inc
 
 ULTRA96_VERSION ?= "1"
 
 SRC_URI += " \
-    https://ftp.denx.de/pub/u-boot/u-boot-${U_BOOT_PV}.tar.bz2;name=u-boot \
-    file://0001-Revert-tools-Makefile-fix-HOSTCFLAGS-with-CROSS_BUIL.patch \
     file://ultra96-v${ULTRA96_VERSION}.bit.xz \
     file://ultra96-v${ULTRA96_VERSION}-fsbl.elf.xz \
     file://ultra96.bif.tmpl \
     file://ultra96-rules \
     "
-SRC_URI[u-boot.sha256sum] = 
"8d6d6070739522dd236cba7055b8736bfe92b4fac0ea18ad809829ca79667014"
 
 TEMPLATE_FILES += "ultra96.bif.tmpl"
-TEMPLATE_VARS += "ATF_PV ULTRA96_VERSION"
-
-DEPENDS += "zynqmp-pmufw"
-BUILD_DEPENDS += ", zynqmp-pmufw:native"
+TEMPLATE_VARS += "ULTRA96_VERSION"
 
-U_BOOT_CONFIG="avnet_ultra96_rev1_defconfig"
-U_BOOT_BIN="u-boot.elf"
+DEPENDS += "zynqmp-pmufw trusted-firmware-a-ultra96"
+BUILD_DEPENDS += ", zynqmp-pmufw:native, trusted-firmware-a-ultra96"
 
-S = "${WORKDIR}/u-boot-${U_BOOT_PV}"
+U_BOOT_CONFIG = "xilinx_zynqmp_virt_defconfig"
+U_BOOT_BIN = "u-boot.elf"
 
 do_prepare_build_append() {
     cp ${WORKDIR}/ultra96-rules ${S}/debian/rules
diff --git a/recipes-bsp/u-boot/u-boot-ultra96-v2_2019.10-atf2.2.bb 
b/recipes-bsp/u-boot/u-boot-ultra96-v2_2019.10-atf2.2.bb
deleted file mode 120000
index 69f9e26..0000000
--- a/recipes-bsp/u-boot/u-boot-ultra96-v2_2019.10-atf2.2.bb
+++ /dev/null
@@ -1 +0,0 @@
-u-boot-ultra96-v1_2019.10-atf2.2.bb
\ No newline at end of file
diff --git a/recipes-bsp/u-boot/u-boot-ultra96-v2_2020.07.bb 
b/recipes-bsp/u-boot/u-boot-ultra96-v2_2020.07.bb
new file mode 120000
index 0000000..7cd683f
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-ultra96-v2_2020.07.bb
@@ -0,0 +1 @@
+u-boot-ultra96-v1_2020.07.bb
\ No newline at end of file
-- 
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/884c6836e953a772a57981c5650e0edeb464aadd.1601876389.git.jan.kiszka%40siemens.com.

Reply via email to