public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [RFC: PATCH: needs rebase] ci: run qemuarm64 test booting with efi
@ 2022-01-05 20:08 Henning Schild
  2022-01-05 20:11 ` Henning Schild
  0 siblings, 1 reply; 3+ messages in thread
From: Henning Schild @ 2022-01-05 20:08 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

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
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-12 12:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 20:08 [RFC: PATCH: needs rebase] ci: run qemuarm64 test booting with efi Henning Schild
2022-01-05 20:11 ` Henning Schild
2022-01-12 12:36   ` Anton Mikanovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox