aboutsummaryrefslogtreecommitdiff
path: root/board/qemu/arm-vexpress-tz
diff options
context:
space:
mode:
authorGravatar Vincent Stehlé <vincent.stehle@laposte.net>2021-03-07 10:43:17 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2021-03-20 23:03:46 +0100
commit15d3a7226ddbe180c5b966335a84182ef6d2b447 (patch)
tree2b7af50b893da3f8bec21b27bc898c2e4fa124c9 /board/qemu/arm-vexpress-tz
parenta9f94d7aba750f36ff34b10a5e208e8529f53bcc (diff)
downloadbuildroot-15d3a7226ddbe180c5b966335a84182ef6d2b447.tar.gz
buildroot-15d3a7226ddbe180c5b966335a84182ef6d2b447.tar.bz2
configs/qemu_arm_vexpress_tz: bump versions and update
- Bump TF-A to version 2.4. - Bump u-boot to version 2021.01. - Bump kernel to version 5.11.3. We switch TF-A to a single FIP image. Thanks to this, TF-A does not need to use semihosting to load the various BL* anymore (but U-Boot still does). Update the readme.txt accordingly. We switch to a u-boot image for the ramdisk. This removes the need to update the fdt chosen node manually in the bootcmd. While at it, we drop the generation of the kernel dtb, which we do not use. In this config, we are indeed using the dtb generated on-the-fly by qemu and amended by TF-A. Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net> Cc: Gerome Burlats <gerome.burlats@smile.fr> Cc: Romain Naour <romain.naour@gmail.com> Cc: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Romain Naour <romain.naour@gmail.com> Tested-by: Romain Naour <romain.naour@gmail.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'board/qemu/arm-vexpress-tz')
-rwxr-xr-xboard/qemu/arm-vexpress-tz/post-build.sh9
-rw-r--r--board/qemu/arm-vexpress-tz/readme.txt17
-rw-r--r--board/qemu/arm-vexpress-tz/u-boot.config3
3 files changed, 14 insertions, 15 deletions
diff --git a/board/qemu/arm-vexpress-tz/post-build.sh b/board/qemu/arm-vexpress-tz/post-build.sh
index 7ead69a99a..97cc53791c 100755
--- a/board/qemu/arm-vexpress-tz/post-build.sh
+++ b/board/qemu/arm-vexpress-tz/post-build.sh
@@ -3,8 +3,7 @@
set -u
set -e
-# Rename boot images for the dear TF-A
-ln -sf u-boot.bin ${BINARIES_DIR}/bl33.bin
-ln -sf tee-header_v2.bin ${BINARIES_DIR}/bl32.bin
-ln -sf tee-pager_v2.bin ${BINARIES_DIR}/bl32_extra1.bin
-ln -sf tee-pageable_v2.bin ${BINARIES_DIR}/bl32_extra2.bin
+# Create flash.bin TF-A FIP image from bl1.bin and fip.bin
+cd "$BINARIES_DIR"
+dd if=bl1.bin of=flash.bin bs=4096
+dd if=fip.bin of=flash.bin seek=64 bs=4096 conv=notrunc
diff --git a/board/qemu/arm-vexpress-tz/readme.txt b/board/qemu/arm-vexpress-tz/readme.txt
index abce750291..7e62e943a6 100644
--- a/board/qemu/arm-vexpress-tz/readme.txt
+++ b/board/qemu/arm-vexpress-tz/readme.txt
@@ -6,11 +6,10 @@ builds of the QEMU host ARM target emulator.
make qemu_arm_vexpress_tz_defconfig
make
-The BIOS used in the QEMU host is the ARM Trusted Firmware-A (TF-A). TF-A
-uses QEMU semihosting file access to access boot image files. The
-QEMU platform is quite specific for that in TF-A and one needs to
-run the emulation from the image directory for TF-A to boot the
-secure and non-secure worlds.
+The BIOS used in the QEMU host is the ARM Trusted Firmware-A (TF-A).
+In our configuration, U-Boot uses QEMU semihosting file access to load the
+kernel and rootfs image files. For this reason the emulation needs to be run
+from the image directory:
cd output/images && ../host/bin/qemu-system-arm \
-machine virt -machine secure=on -cpu cortex-a15 \
@@ -18,7 +17,7 @@ secure and non-secure worlds.
-serial stdio \
-netdev user,id=vmnic -device virtio-net-device,netdev=vmnic \
-semihosting-config enable,target=native \
- -bios bl1.bin # qemu_arm_vexpress_tz_defconfig
+ -bios flash.bin # qemu_arm_vexpress_tz_defconfig
The boot stage traces (if any) followed by the login prompt will appear
in the terminal that started QEMU.
@@ -64,7 +63,7 @@ consoles over telnet connections:
-serial telnet:127.0.0.1:1236,server \
-netdev user,id=vmnic -device virtio-net-device,netdev=vmnic \
-semihosting-config enable,target=native \
- -bios bl1.bin
+ -bios flash.bin
QEMU is now waiting for the telnet connection. From another shell, open a
telnet connection on the port for the U-boot and Linux consoles:
@@ -93,7 +92,7 @@ From a first shell:
-serial stdio \
-netdev user,id=vmnic -device virtio-net-device,netdev=vmnic \
-semihosting-config enable,target=native \
- -bios bl1.bin \
+ -bios flash.bin \
-S
From a second shell:
@@ -109,7 +108,7 @@ From this GDB console, connect to the target, load the OP-TEE core symbols,
set a breakpoint to its entry point (__text_start) and start emulation:
(gdb) target remote 127.0.0.1:1234
- (gdb) symbol-file ./output/build/optee-os-<reference>/out/arm/core/tee.elf
+ (gdb) symbol-file ./output/build/optee-os-<reference>/out/core/tee.elf
(gdb) hbreak __text_start
Hardware assisted breakpoint 1 at 0xe100000: file core/arch/arm/kernel/generic_entry_a32.S, line 246.
(gdb) cont
diff --git a/board/qemu/arm-vexpress-tz/u-boot.config b/board/qemu/arm-vexpress-tz/u-boot.config
index fd74bf1fe7..48b1d06fdb 100644
--- a/board/qemu/arm-vexpress-tz/u-boot.config
+++ b/board/qemu/arm-vexpress-tz/u-boot.config
@@ -1,7 +1,8 @@
CONFIG_SYS_TEXT_BASE=0x60000000
-CONFIG_BOOTCOMMAND="fdt addr ${fdt_addr} && fdt resize 1000 && smhload zImage ${kernel_addr_r} && smhload rootfs.cpio.gz ${ramdisk_addr_r} ramdisk_addr_end && setenv bootargs console=ttyAMA0,115200 earlyprintk=serial,ttyAMA0,115200 && fdt chosen ${ramdisk_addr_r} ${ramdisk_addr_end} && bootz ${kernel_addr_r} - ${fdt_addr}"
+CONFIG_BOOTCOMMAND="smhload zImage ${kernel_addr_r} && smhload rootfs.cpio.uboot ${ramdisk_addr_r} && setenv bootargs console=ttyAMA0,115200 earlyprintk=serial,ttyAMA0,115200 && bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr}"
CONFIG_SEMIHOSTING=y
# Drop flash accesses
CONFIG_ENV_IS_IN_FLASH=n
CONFIG_MTD=n
CONFIG_MTD_NOR_FLASH=n
+CONFIG_ENV_IS_NOWHERE=y