mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 22:12:10 +01:00
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.
This commit is contained in:
parent
47e60959f1
commit
2ca63a3a82
@ -258,15 +258,8 @@ if [ -n "${CONFIG_IMAGE}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${VM_IMAGE}" ]; then
|
if [ -n "${VM_IMAGE}" ]; then
|
||||||
case "${VM_BOARD}" in
|
set -- -drive if=none,id=blk,file="${VM_IMAGE}" \
|
||||||
amd64-usr)
|
-device virtio-blk-pci,drive=blk,bootindex=1 "$@"
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${VM_KERNEL}" ]; then
|
if [ -n "${VM_KERNEL}" ]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user