qemu: add linux boot tests
Add some basic boot tests for QEMU and supporting scripts to automate
the generation of dependencies. Currently, there are no tests in CI that
utilise the platform. This makes it easier to do testing in CI without
the need for a complex hardware setup.
Change-Id: I98e43ecc56dc44a767590c73963ded7b2cee1cff
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
diff --git a/model/qemu-virt.sh b/model/qemu-virt.sh
new file mode 100644
index 0000000..e8070fc
--- /dev/null
+++ b/model/qemu-virt.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2022 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+# Generates a machine configuration for QEMU virt.
+set_model_path qemu-system-aarch64
+
+cat <<EOF >"$model_param_file"
+-M virt
+-machine 'secure=on,virtualization=on,gic-version=2'
+-cpu max
+-smp 4
+-m 4G
+-nographic -display none -d unimp
+-append 'console=ttyAMA0,115200n8 root=/dev/vda earlycon'
+${kernel_bin+-kernel $kernel_bin}
+${rootfs_bin+-initrd $rootfs_bin}
+${qemu_bios_bin+-bios $qemu_bios_bin}
+${wait_debugger+-gdb tcp:localhost:9000}
+${wait_debugger+-S}
+EOF