From 2ca63a3a82285771139d9db02e50f6aef6850e3d Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 22 Apr 2025 14:45:49 +0200 Subject: [PATCH] build_library/qemu_template.sh: Simplify mounting VM image There's no need to differentiate between amd64 and arm64 boards here any more. This also adds bootindex=1 option to the -device flag, so we can pass more secondary disks without affecting the boot order. --- build_library/qemu_template.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/build_library/qemu_template.sh b/build_library/qemu_template.sh index a0c1920910..ec869b0942 100755 --- a/build_library/qemu_template.sh +++ b/build_library/qemu_template.sh @@ -258,15 +258,8 @@ if [ -n "${CONFIG_IMAGE}" ]; then fi if [ -n "${VM_IMAGE}" ]; then - case "${VM_BOARD}" in - amd64-usr) - set -- -drive if=virtio,file="${VM_IMAGE}" "$@" ;; - arm64-usr) - set -- -drive if=none,id=blk,file="${VM_IMAGE}" \ - -device virtio-blk-device,drive=blk "$@" - ;; - *) die "Unsupported arch" ;; - esac + set -- -drive if=none,id=blk,file="${VM_IMAGE}" \ + -device virtio-blk-pci,drive=blk,bootindex=1 "$@" fi if [ -n "${VM_KERNEL}" ]; then