summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtcwg_kernel-build.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/tcwg_kernel-build.sh b/tcwg_kernel-build.sh
index 71bf0a09..ca789c1c 100755
--- a/tcwg_kernel-build.sh
+++ b/tcwg_kernel-build.sh
@@ -213,7 +213,18 @@ boot_linux ()
;;
*) assert false ;;
esac
- timeout --foreground 60s qemu-system-${rr[target]} \
+
+ local qemu="qemu-system-${rr[target]}"
+
+ if ! which "$qemu" >/dev/null; then
+ # Install QEMU if it's not present.
+ # TODO: We should build QEMU from source as an additional component.
+ # Booting kernel with QEMU master/release would be a good test.
+ sudo apt update
+ sudo DEBIAN_FRONTEND=noninteractive apt install -y "$qemu"
+ fi
+
+ timeout --foreground 60s "$qemu" \
-kernel $image -machine virt $cpu -m 512 \
-serial stdio -display none \
-append "console=ttyAMA0 panic=-1" -no-reboot