2 # SPDX-License-Identifier: Apache-2.0
5 echo "Usage: ${basename $0} <image name>"
10 conf="/etc/agl-qemu-runner/${image}.conf"
11 if [ ! -f "$conf" ]; then
12 echo "No configuration file $conf"
19 if [ -z "$QEMU_IMAGE_ARCH" ]; then
20 QEMU_IMAGE_ARCH="virtio-${arch}"
23 disk="/var/lib/machines/${image}/${image}-${QEMU_IMAGE_ARCH}.ext4"
24 if [ ! -f "$disk" ]; then
25 echo "No disk image for $image"
28 kernel="/var/lib/machines/${image}/Image-${QEMU_IMAGE_ARCH}.bin"
29 if [ ! -f "$kernel" ]; then
30 echo "No kernel for $image"
35 if [ -n "$QEMU_TASKSET_CPUS" ]; then
36 TASKSET_CMD="taskset -c ${QEMU_TASKSET_CPUS}"
39 export SDL_VIDEODRIVER=wayland
40 export XDG_RUNTIME_DIR=/run/user/200
41 # The following may be needed if the socket is not wayland-0, as SDL
42 # seems to lack detection logic for that case.
43 #export WAYLAND_DISPLAY=wayland-1
45 # This sets the XDG app id, which we need for setting outputs with
47 export SDL_VIDEO_WAYLAND_WMCLASS="${image}"
52 -machine virt,gic-version=max,iommu=smmuv3 \
57 -append "${QEMU_KERNEL_CMDLINE_APPEND}" \
58 -drive id=disk0,file=${disk},format=raw,if=none \
60 -object rng-random,filename=/dev/urandom,id=rng0 \
61 -device virtio-blk-device,drive=disk0 \
62 -device virtio-rng-device,rng=rng0 \
65 -global virtio-mmio.force-legacy=false \
66 -device virtio-gpu-gl-device \
67 -display sdl,gl=on -vga std \