diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2020-12-11 04:49:46 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2020-12-11 04:49:46 +0000 |
commit | a20b051a8c0e2552eef636e5f86b19d6032135a7 (patch) | |
tree | 0b86578fc8d01a72e9fb911edab207293dc51ab5 /tcwg_kernel-build.sh | |
parent | b1053bfe3f2de94177184246d724851c929ea596 (diff) |
tcwg_kernel-build.sh: Workaround missing QEMU
... which we removed from docker images in favour of building from source.
Change-Id: I828d78e2091f0b537207975bb19c23621521ad69
Diffstat (limited to 'tcwg_kernel-build.sh')
-rwxr-xr-x | tcwg_kernel-build.sh | 13 |
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 |