public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: <isar-users@googlegroups.com>
Cc: Henning Schild <henning.schild@siemens.com>
Subject: [RFC: PATCH: needs rebase] ci: run qemuarm64 test booting with efi
Date: Wed, 5 Jan 2022 21:08:01 +0100	[thread overview]
Message-ID: <20220105200801.15240-1-henning.schild@siemens.com> (raw)

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


             reply	other threads:[~2022-01-05 20:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 20:08 Henning Schild [this message]
2022-01-05 20:11 ` Henning Schild
2022-01-12 12:36   ` Anton Mikanovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220105200801.15240-1-henning.schild@siemens.com \
    --to=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox