DEB_VERSION=$(dpkg-parsechangelog -S Version)

case "$arch" in
    i386) QEMU_CMD=(qemu-system-x86_64 -cpu kvm64 -machine pc -bios /usr/share/seabios/bios-256k.bin) ;;
    x86_64) QEMU_CMD=(qemu-system-x86_64 -cpu kvm64 -machine pc -bios OVMF.fd) ;;
    arm64) QEMU_CMD=(qemu-system-aarch64 -cpu max -machine virt -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd) ;;
    riscv64) QEMU_CMD=(qemu-system-riscv64 -cpu max -machine virt,pflash0=pflash0 -blockdev node-name=pflash0,driver=file,read-only=on,filename=/usr/share/qemu-efi-riscv64/RISCV_VIRT_CODE.fd) ;;
    loong64) QEMU_CMD=(qemu-system-loongarch64 -cpu max -machine virt -bios /usr/share/qemu-efi-loongarch64/QEMU_EFI.fd) ;;
    *) return 1 ;;
esac
QEMU_CMD+=(-smp cpus=1,cores=1,sockets=1 -m 1G)
QEMU_CMD+=(-chardev stdio,mux=on,id=char0)
QEMU_CMD+=(-nographic -monitor none -serial chardev:char0)
