This is something that used to work well. It has value because it shows how to use UEFI booting on aarch64. I held this back because of the avocado switch and now i have a really hard time to apply it again. Maybe that whole story of fetching stuff with curl and storing it somewhere is wrong, and in avocado is would probably have to look a bit different. But if you guys agree that there is value, maybe we can work on that together to make it avocado-ready and write the curl bits in python. regards, Henning Am Wed, 5 Jan 2022 21:08:01 +0100 schrieb Henning Schild <henning.schild@siemens.com>:Signed-off-by: Henning Schild <henning.schild@siemens.com> --- meta-isar/conf/machine/qemuarm64.conf | 9 ++++----- scripts/vm_smoke_test | 17 +++++++++++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/meta-isar/conf/machine/qemuarm64.conf b/meta-isar/conf/machine/qemuarm64.conf index e5e762fff614..bec5a98cf43e 100644 --- a/meta-isar/conf/machine/qemuarm64.conf +++ b/meta-isar/conf/machine/qemuarm64.conf @@ -6,15 +6,14 @@ DISTRO_ARCH ?= "arm64" KERNEL_NAME ?= "arm64" KERNEL_NAME_ubuntu-focal ?= "generic" -IMAGE_TYPE ?= "ext4-img" - -QEMU_ROOTFS_DEV ?= "vda" +IMAGE_TYPE ?= "wic-img" +WKS_FILE ?= "sdimage-efi" +IMAGER_INSTALL += "${GRUB_BOOTLOADER_INSTALL}" QEMU_ARCH ?= "aarch64" QEMU_MACHINE ?= "virt" QEMU_CPU ?= "cortex-a57" -# TODO: start_vm doesn't support multiline vars -QEMU_DISK_ARGS ?= "-drive file=##ROOTFS_IMAGE##,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0" +QEMU_DISK_ARGS ?= "-drive file=##ROOTFS_IMAGE##,if=none,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -pflash ~/.cache/isar-tests/QEMU_EFI.img" MACHINE_SERIAL ?= "ttyAMA0" BAUDRATE_TTY ?= "115200" diff --git a/scripts/vm_smoke_test b/scripts/vm_smoke_test index ce082137fe9b..b0390ee497d1 100755 --- a/scripts/vm_smoke_test +++ b/scripts/vm_smoke_test @@ -15,6 +15,22 @@ ES_BUG=3 RET=$ES_OK +get_arm64_qemu_efi() { + SHA256SUM="07b45bba7eb60eaeb79d798f6648bd262cdc6ad39d8f48f73a5f9c8f4885377c" + mkdir -p ~/.cache/isar-tests/ + cd ~/.cache/isar-tests/ + echo "$SHA256SUM QEMU_EFI.img" > QEMU_EFI.img.sha256 + if ! sha256sum -c QEMU_EFI.img.sha256 > /dev/null 2>&1; then + # cache miss or update + curl http://releases.linaro.org/components/kernel/uefi-linaro/latest/release/qemu64/QEMU_EFI.img.gz -L | zcat > QEMU_EFI.img + if ! sha256sum -c QEMU_EFI.img.sha256 > /dev/null 2>&1; then + echo "FAIL: could not fetch QEMU_EFI.img" + # no need to set RET or FAIL, qemu will get unhappy + fi + fi + cd - +} + dump_boot_log() { echo "Boot log:\n8<--" cat $CONSOLE_OUTPUT @@ -163,6 +179,7 @@ if [ -z "$FAST_BUILD" ]; then fi # ARM64 machine +get_arm64_qemu_efi run_test arm64 stretch exit $RET
Maybe it's better to use avocado.utils.download.get_file API for
the download?
It's already has caching and hash checking and can retry on
network fails.
Or maybe we even build it inside Isar?
I also propose not to place any files inside user's home but use
build folder instead.
It can be more preferred for keeping
build system clean.