diff options
-rwxr-xr-x | bin/debvm-run | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/bin/debvm-run b/bin/debvm-run index 891cf21..fc52154 100755 --- a/bin/debvm-run +++ b/bin/debvm-run @@ -212,13 +212,13 @@ set -- \ -m 1G \ -kernel "$KERNELTMP" \ -initrd "$INITRDTMP" \ - -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 \ -drive "media=disk,format=raw,discard=unmap,file=$IMAGE,if=virtio,cache=unsafe" \ -device "virtio-net-pci,netdev=net0" \ "$@" QEMU="qemu-system-$VMARCH" CPU= +HAVE_PCI=yes MACHINE= MAX_SMP= @@ -227,15 +227,23 @@ case "$VMARCH" in QEMU=qemu-system-x86_64 MACHINE="type=q35" ;; - arm|armel|armhf) + arm|armel) CPU=max MACHINE="type=virt" + HAVE_PCI=no ;; arm64) QEMU=qemu-system-aarch64 CPU=max MACHINE="type=virt" ;; + armhf) + CPU=max + MACHINE="type=virt" + ;; + m68k) + HAVE_PCI=no + ;; mips64el) CPU=5KEc ;; @@ -248,6 +256,9 @@ case "$VMARCH" in riscv64) MACHINE="type=virt" ;; + sparc64) + HAVE_PCI=no + ;; esac if test "$ARCHITECTURE" = "$VMARCH"; then @@ -283,6 +294,9 @@ if test -z "$MAX_SMP" || test "$MAX_SMP" -gt 1; then test -n "$MAX_SMP" && test "$NPROC" -gt "$MAX_SMP" && NPROC=$MAX_SMP set -- -smp "$NPROC" "$@" fi +if test "$HAVE_PCI" = yes; then + set -- -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 "$@" +fi if test -z "$GRAPHICAL"; then set -- -nographic "$@" |