From: Jan Kiszka <[email protected]> TF-A patch is upstream, time to update. For that, we need to tune TF_A_BINARIES, switch to DEBIAN_BUILD_DEPENDS in u-boot recipes and set DISTRO_APT_SOURCES.
Isar renamed the deployed kernel image of arm64, so we need to account for differences now. Then Isar now forwards wic warnings. So we need to add an empty bootloader line to the rpi4 wks file to avoid (harmless) complaints. Finally, one Isar regression patch is needed that is not yet merged upstream. Signed-off-by: Jan Kiszka <[email protected]> --- conf/distro/jailhouse-demo.conf | 2 + ...de-for-building-custom-Trusted-Firmw.patch | 127 ------------------ ...emove-unneeded-unconditional-recipes.patch | 32 +++++ kas.yml | 8 +- .../trusted-firmware-a-macchiatobin_2.3.bb | 2 +- .../trusted-firmware-a-ultra96_2.3.bb | 2 +- .../u-boot/u-boot-pine64-plus_2020.10.bb | 2 +- .../u-boot/u-boot-ultra96-v1_2020.10.bb | 2 +- .../files/.bash_history-espressobin | 2 +- .../files/.bash_history-hikey620 | 2 +- .../files/.bash_history-macchiatobin | 2 +- .../files/.bash_history-pine64-plus | 2 +- .../files/.bash_history-qemu-arm64 | 2 +- .../customizations/files/.bash_history-rpi4 | 2 +- .../files/.bash_history-ultra96-v1 | 2 +- start-qemu.sh | 4 +- wic/rpi4.wks | 3 + 17 files changed, 55 insertions(+), 143 deletions(-) delete mode 100644 isar-patches/0001-Add-recipe-include-for-building-custom-Trusted-Firmw.patch create mode 100644 isar-patches/0001-fix-remove-unneeded-unconditional-recipes.patch diff --git a/conf/distro/jailhouse-demo.conf b/conf/distro/jailhouse-demo.conf index 9f0aa92..032efe3 100644 --- a/conf/distro/jailhouse-demo.conf +++ b/conf/distro/jailhouse-demo.conf @@ -11,6 +11,8 @@ require conf/distro/debian-buster.conf +DISTRO_APT_SOURCES = "conf/distro/debian-buster.list" + KERNEL_NAME ?= "jailhouse" WKS_FILE ?= "${MACHINE}.wks" diff --git a/isar-patches/0001-Add-recipe-include-for-building-custom-Trusted-Firmw.patch b/isar-patches/0001-Add-recipe-include-for-building-custom-Trusted-Firmw.patch deleted file mode 100644 index 72b089f..0000000 --- a/isar-patches/0001-Add-recipe-include-for-building-custom-Trusted-Firmw.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 6754548019e02c1dbf0d336d06dd14508eb1684c Mon Sep 17 00:00:00 2001 -From: Jan Kiszka <[email protected]> -Date: Sun, 27 Sep 2020 12:08:45 +0200 -Subject: [PATCH] Add recipe include for building custom Trusted Firmware A - -Analogously to U-Boot, this adds an include file to be used in custom -TF-A recipes. The typical customization points are TF_A_PLATFORM and -possibly a couple of TF_A_EXTRA_BUILDARGS. The to-be-packaged binaries -can be defined via TF_A_BINARIES. - -Debian has a binary package called "arm-trusted-firmware", targeting a -couple of sunxi boards. We do not follow that legacy naming by intention -and rather use the new official one. Debian will probably follow at some -point. - -Signed-off-by: Jan Kiszka <[email protected]> ---- - .../trusted-firmware-a/files/debian/compat | 1 + - .../files/debian/control.tmpl | 10 +++++ - .../trusted-firmware-a/files/debian/rules | 19 ++++++++ - .../trusted-firmware-a-custom.inc | 43 +++++++++++++++++++ - 4 files changed, 73 insertions(+) - create mode 100644 meta/recipes-bsp/trusted-firmware-a/files/debian/compat - create mode 100644 meta/recipes-bsp/trusted-firmware-a/files/debian/control.tmpl - create mode 100755 meta/recipes-bsp/trusted-firmware-a/files/debian/rules - create mode 100644 meta/recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc - -diff --git a/meta/recipes-bsp/trusted-firmware-a/files/debian/compat b/meta/recipes-bsp/trusted-firmware-a/files/debian/compat -new file mode 100644 -index 00000000..f599e28b ---- /dev/null -+++ b/meta/recipes-bsp/trusted-firmware-a/files/debian/compat -@@ -0,0 +1 @@ -+10 -diff --git a/meta/recipes-bsp/trusted-firmware-a/files/debian/control.tmpl b/meta/recipes-bsp/trusted-firmware-a/files/debian/control.tmpl -new file mode 100644 -index 00000000..7ffd189d ---- /dev/null -+++ b/meta/recipes-bsp/trusted-firmware-a/files/debian/control.tmpl -@@ -0,0 +1,10 @@ -+Source: ${PN} -+Section: admin -+Priority: optional -+Standards-Version: 3.9.6 -+Build-Depends: ${DEBIAN_BUILD_DEPENDS} -+Maintainer: ISAR project <[email protected]> -+ -+Package: trusted-firmware-a-${TF_A_NAME} -+Architecture: ${DISTRO_ARCH} -+Description: ${DESCRIPTION}, firmware binaries -diff --git a/meta/recipes-bsp/trusted-firmware-a/files/debian/rules b/meta/recipes-bsp/trusted-firmware-a/files/debian/rules -new file mode 100755 -index 00000000..70e1dd66 ---- /dev/null -+++ b/meta/recipes-bsp/trusted-firmware-a/files/debian/rules -@@ -0,0 +1,19 @@ -+#!/usr/bin/make -f -+ -+# Debian rules for custom Trusted Firmware A build -+# -+# This software is a part of ISAR. -+# Copyright (c) Siemens AG, 2020 -+# -+# SPDX-License-Identifier: MIT -+ -+ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) -+export CROSS_COMPILE=$(DEB_HOST_GNU_TYPE)- -+endif -+ -+override_dh_auto_build: -+ CFLAGS= LDFLAGS= $(MAKE) $(PARALLEL_MAKE) PLAT=$(TF_A_PLATFORM) \ -+ $(TF_A_EXTRA_BUILDARGS) -+ -+%: -+ dh $@ -diff --git a/meta/recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc b/meta/recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc -new file mode 100644 -index 00000000..a065ce71 ---- /dev/null -+++ b/meta/recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc -@@ -0,0 +1,43 @@ -+# Custom Trusted Firmware A build -+# -+# This software is a part of ISAR. -+# Copyright (c) Siemens AG, 2020 -+# -+# SPDX-License-Identifier: MIT -+ -+inherit dpkg -+ -+FILESEXTRAPATHS_prepend := "${FILE_DIRNAME}/files:" -+ -+SRC_URI += "file://debian/" -+ -+DESCRIPTION ?= "Custom Trusted Firmware A" -+ -+TF_A_NAME ?= "${MACHINE}" -+TF_A_PLATFORM ?= "unknown" -+TF_A_EXTRA_BUILDARGS ?= "" -+TF_A_BINARIES ?= "bl31.bin" -+ -+DEBIAN_BUILD_DEPENDS ?= "" -+ -+PROVIDES += "trusted-firmware-a-${TF_A_NAME}" -+ -+TEMPLATE_FILES = "debian/control.tmpl" -+TEMPLATE_VARS += "TF_A_NAME DEBIAN_BUILD_DEPENDS" -+ -+do_prepare_build() { -+ cp -r ${WORKDIR}/debian ${S}/ -+ -+ deb_add_changelog -+ -+ rm -f ${S}/debian/trusted-firmware-a-${TF_A_NAME}.install -+ for binary in ${TF_A_BINARIES}; do -+ echo "build/${TF_A_PLATFORM}/release/$binary /usr/lib/trusted-firmware-a/${TF_A_NAME}/" >> \ -+ ${S}/debian/trusted-firmware-a-${TF_A_NAME}.install -+ done -+} -+ -+dpkg_runbuild_prepend() { -+ export TF_A_PLATFORM="${TF_A_PLATFORM}" -+ export TF_A_EXTRA_BUILDARGS="${TF_A_EXTRA_BUILDARGS}" -+} --- -2.26.2 - diff --git a/isar-patches/0001-fix-remove-unneeded-unconditional-recipes.patch b/isar-patches/0001-fix-remove-unneeded-unconditional-recipes.patch new file mode 100644 index 0000000..0571905 --- /dev/null +++ b/isar-patches/0001-fix-remove-unneeded-unconditional-recipes.patch @@ -0,0 +1,32 @@ +From 2f8c868dde0b7e1fed194368e5aec8279ae57752 Mon Sep 17 00:00:00 2001 +From: Silvano Cirujano Cuesta <[email protected]> +Date: Wed, 14 Apr 2021 17:18:06 +0200 +Subject: [PATCH] fix: remove unneeded unconditional recipes + +Commit 9c3499adf91 introduced the unconditional inclusion of the recipes +isar-exclude-docs and isar-disable-apt-cache, but they would only needed +for container images. + +That would have been anyway an optimization with questionable demand, +therefore removing it. + +Signed-off-by: Silvano Cirujano Cuesta <[email protected]> +--- + meta/classes/image-container-extension.bbclass | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/meta/classes/image-container-extension.bbclass b/meta/classes/image-container-extension.bbclass +index f693627..e26604a 100644 +--- a/meta/classes/image-container-extension.bbclass ++++ b/meta/classes/image-container-extension.bbclass +@@ -6,7 +6,6 @@ + # This class extends the image.bbclass for containerizing the root filesystem. + + CONTAINER_FORMATS ?= "docker-archive" +-IMAGE_INSTALL += "isar-exclude-docs isar-disable-apt-cache" + + containerize_rootfs() { + local cmd="/bin/dash" +-- +2.26.2 + diff --git a/kas.yml b/kas.yml index 8807257..0a2be57 100644 --- a/kas.yml +++ b/kas.yml @@ -1,7 +1,7 @@ # # Jailhouse, a Linux-based partitioning hypervisor # -# Copyright (c) Siemens AG, 2018-2019 +# Copyright (c) Siemens AG, 2018-2020 # # Authors: # Jan Kiszka <[email protected]> @@ -21,12 +21,12 @@ repos: isar: url: https://github.com/ilbers/isar - refspec: 93658f7a72679c89e14adc7bbdbf3f5d52b7ac0d + refspec: 7dd4f7a3e0633a1670e6edf84f31128de6a4ef53 layers: meta: patches: - tf-a: - path: isar-patches/0001-Add-recipe-include-for-building-custom-Trusted-Firmw.patch + 1-fix-u-boot-script: + path: isar-patches/0001-fix-remove-unneeded-unconditional-recipes.patch repo: jailhouse bblayers_conf_header: diff --git a/recipes-bsp/trusted-firmware-a/trusted-firmware-a-macchiatobin_2.3.bb b/recipes-bsp/trusted-firmware-a/trusted-firmware-a-macchiatobin_2.3.bb index 2df79c3..d5dced9 100644 --- a/recipes-bsp/trusted-firmware-a/trusted-firmware-a-macchiatobin_2.3.bb +++ b/recipes-bsp/trusted-firmware-a/trusted-firmware-a-macchiatobin_2.3.bb @@ -31,4 +31,4 @@ TF_A_EXTRA_BUILDARGS = " \ SCP_BL2=../binaries-marvell/mrvl_scp_bl2.img \ BL33=/usr/lib/u-boot/macchiatobin/u-boot.bin \ all fip" -TF_A_BINARIES = "flash-image.bin" +TF_A_BINARIES = "release/flash-image.bin" 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 index 7b8b48b..d4fac2c 100644 --- 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 @@ -14,4 +14,4 @@ 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" +TF_A_BINARIES = "release/bl31/bl31.elf" diff --git a/recipes-bsp/u-boot/u-boot-pine64-plus_2020.10.bb b/recipes-bsp/u-boot/u-boot-pine64-plus_2020.10.bb index b813ae8..c3c1a06 100644 --- a/recipes-bsp/u-boot/u-boot-pine64-plus_2020.10.bb +++ b/recipes-bsp/u-boot/u-boot-pine64-plus_2020.10.bb @@ -17,7 +17,7 @@ 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" +DEBIAN_BUILD_DEPENDS += ", libssl-dev, swig:native, python3-dev:native, trusted-firmware-a-pine64-plus" DEPENDS += "trusted-firmware-a-pine64-plus" do_prepare_build_append() { diff --git a/recipes-bsp/u-boot/u-boot-ultra96-v1_2020.10.bb b/recipes-bsp/u-boot/u-boot-ultra96-v1_2020.10.bb index bfee2fe..2f284b2 100644 --- a/recipes-bsp/u-boot/u-boot-ultra96-v1_2020.10.bb +++ b/recipes-bsp/u-boot/u-boot-ultra96-v1_2020.10.bb @@ -24,7 +24,7 @@ TEMPLATE_FILES += "ultra96.bif.tmpl" TEMPLATE_VARS += "ULTRA96_VERSION" DEPENDS += "zynqmp-pmufw trusted-firmware-a-ultra96" -BUILD_DEPENDS += ", zynqmp-pmufw:native, trusted-firmware-a-ultra96" +DEBIAN_BUILD_DEPENDS += ", zynqmp-pmufw:native, trusted-firmware-a-ultra96" U_BOOT_CONFIG = "xilinx_zynqmp_virt_defconfig" U_BOOT_BIN = "u-boot.elf" diff --git a/recipes-core/customizations/files/.bash_history-espressobin b/recipes-core/customizations/files/.bash_history-espressobin index 09fdb24..6d59f3e 100644 --- a/recipes-core/customizations/files/.bash_history-espressobin +++ b/recipes-core/customizations/files/.bash_history-espressobin @@ -6,7 +6,7 @@ jailhouse cell start inmate-demo jailhouse cell stats inmate-demo jailhouse cell destroy inmate-demo jailhouse cell linux /etc/jailhouse/espressobin-linux-demo.cell \ - /boot/vmlinuz* \ + /boot/vmlinux* \ -d /etc/jailhouse/dts/inmate-espressobin.dtb \ -i /usr/libexec/jailhouse/demos/rootfs.cpio \ -c "console=ttyMV0 ip=192.168.19.2" diff --git a/recipes-core/customizations/files/.bash_history-hikey620 b/recipes-core/customizations/files/.bash_history-hikey620 index 41729a9..a25ee26 100644 --- a/recipes-core/customizations/files/.bash_history-hikey620 +++ b/recipes-core/customizations/files/.bash_history-hikey620 @@ -6,7 +6,7 @@ jailhouse cell start inmate-demo jailhouse cell stats inmate-demo jailhouse cell destroy inmate-demo jailhouse cell linux /etc/jailhouse/hikey-linux-demo.cell \ - /boot/vmlinuz* \ + /boot/vmlinux* \ -d /etc/jailhouse/dts/inmate-hikey.dtb \ -i /usr/libexec/jailhouse/demos/rootfs.cpio \ -c "console=ttyAMA0 ip=192.168.19.2" diff --git a/recipes-core/customizations/files/.bash_history-macchiatobin b/recipes-core/customizations/files/.bash_history-macchiatobin index 57a19cc..493aa1f 100644 --- a/recipes-core/customizations/files/.bash_history-macchiatobin +++ b/recipes-core/customizations/files/.bash_history-macchiatobin @@ -6,7 +6,7 @@ jailhouse cell start inmate-demo jailhouse cell stats inmate-demo jailhouse cell destroy inmate-demo jailhouse cell linux /etc/jailhouse/macchiatobin-linux-demo.cell \ - /boot/vmlinuz* \ + /boot/vmlinux* \ -d /etc/jailhouse/dts/inmate-macchiatobin.dtb \ -i /usr/libexec/jailhouse/demos/rootfs.cpio \ -c "console=ttyS0,115200 ip=192.168.19.2" diff --git a/recipes-core/customizations/files/.bash_history-pine64-plus b/recipes-core/customizations/files/.bash_history-pine64-plus index 8e8b246..a3f4c1b 100644 --- a/recipes-core/customizations/files/.bash_history-pine64-plus +++ b/recipes-core/customizations/files/.bash_history-pine64-plus @@ -6,7 +6,7 @@ jailhouse cell load inmate-demo \ jailhouse cell start inmate-demo jailhouse cell stats inmate-demo jailhouse cell destroy inmate-demo -jailhouse cell linux /etc/jailhouse/pine64-plus-linux-demo.cell /boot/vmlinuz* \ +jailhouse cell linux /etc/jailhouse/pine64-plus-linux-demo.cell /boot/vmlinux* \ -d /etc/jailhouse/dts/inmate-pine64-plus.dtb \ -i /usr/libexec/jailhouse/demos/rootfs.cpio \ -c "console=ttyS0,115200 ip=192.168.19.2" diff --git a/recipes-core/customizations/files/.bash_history-qemu-arm64 b/recipes-core/customizations/files/.bash_history-qemu-arm64 index 73c5562..5e4ddcb 100644 --- a/recipes-core/customizations/files/.bash_history-qemu-arm64 +++ b/recipes-core/customizations/files/.bash_history-qemu-arm64 @@ -6,7 +6,7 @@ jailhouse cell start inmate-demo jailhouse cell stats inmate-demo jailhouse cell destroy inmate-demo jailhouse cell linux /etc/jailhouse/qemu-arm64-linux-demo.cell \ - /boot/vmlinuz* \ + /boot/vmlinux* \ -d /etc/jailhouse/dts/inmate-qemu-arm64.dtb \ -i /usr/libexec/jailhouse/demos/rootfs.cpio \ -c "console=ttyAMA0 ip=192.168.19.2" diff --git a/recipes-core/customizations/files/.bash_history-rpi4 b/recipes-core/customizations/files/.bash_history-rpi4 index 3595205..bacbab3 100644 --- a/recipes-core/customizations/files/.bash_history-rpi4 +++ b/recipes-core/customizations/files/.bash_history-rpi4 @@ -6,7 +6,7 @@ jailhouse cell start inmate-demo jailhouse cell stats inmate-demo jailhouse cell destroy inmate-demo jailhouse cell linux /etc/jailhouse/rpi4-linux-demo.cell \ - /boot/vmlinuz* \ + /boot/vmlinux* \ -d /etc/jailhouse/dts/inmate-rpi4.dtb \ -i /usr/libexec/jailhouse/demos/rootfs.cpio \ -c "console=ttyS0,115200 ip=192.168.19.2" diff --git a/recipes-core/customizations/files/.bash_history-ultra96-v1 b/recipes-core/customizations/files/.bash_history-ultra96-v1 index f73aec1..e06923a 100644 --- a/recipes-core/customizations/files/.bash_history-ultra96-v1 +++ b/recipes-core/customizations/files/.bash_history-ultra96-v1 @@ -6,7 +6,7 @@ jailhouse cell start inmate-demo jailhouse cell stats inmate-demo jailhouse cell destroy inmate-demo jailhouse cell linux /etc/jailhouse/ultra96-linux-demo.cell \ - /boot/vmlinuz* \ + /boot/vmlinux* \ -d /etc/jailhouse/dts/inmate-zynqmp.dtb \ -i /usr/libexec/jailhouse/demos/rootfs.cpio \ -c "console=ttyPS0,115200 ip=192.168.19.2" diff --git a/start-qemu.sh b/start-qemu.sh index abf2537..1472b99 100755 --- a/start-qemu.sh +++ b/start-qemu.sh @@ -35,6 +35,7 @@ case "$1" in -device intel-iommu,intremap=on,x-buggy-eim=on \ -device intel-hda,addr=1b.0 -device hda-duplex \ -device e1000e,addr=2.0,netdev=net" + KERNEL_SUFFIX=vmlinuz KERNEL_CMDLINE=" \ root=/dev/sda intel_iommu=off memmap=82M\$0x3a000000 \ vga=0x305" @@ -50,6 +51,7 @@ case "$1" in -device virtconsole,chardev=con -chardev vc,id=con \ -device virtio-blk-device,drive=disk \ -device virtio-net-device,netdev=net" + KERNEL_SUFFIX=vmlinux KERNEL_CMDLINE=" \ root=/dev/vda mem=768M" ;; @@ -70,5 +72,5 @@ shift 1 ${QEMU_PATH}${QEMU} \ -drive file=${IMAGE_FILE},discard=unmap,if=none,id=disk,format=raw \ -m 1G -serial mon:stdio -netdev user,id=net \ - -kernel ${IMAGE_PREFIX}-vmlinuz -append "${KERNEL_CMDLINE}" \ + -kernel "${IMAGE_PREFIX}-${KERNEL_SUFFIX}" -append "${KERNEL_CMDLINE}" \ -initrd ${IMAGE_PREFIX}-initrd.img ${QEMU_EXTRA_ARGS} "$@" diff --git a/wic/rpi4.wks b/wic/rpi4.wks index 12a8509..2d10b99 100644 --- a/wic/rpi4.wks +++ b/wic/rpi4.wks @@ -12,3 +12,6 @@ part --source bootimg-partition --ondisk mmcblk0 --fstype vfat --label boot --align 1 --size 32 --overhead-factor 1 --extra-space 0 part / --source rootfs --ondisk mmcblk0 --fstype ext4 --label platform --align 1024 --active + +# silence wic +bootloader -- 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/503ad2923666d25e929d1d0eaf6b3a042f41215b.1618866389.git.jan.kiszka%40siemens.com.
