diff options
author | Johannes Schauer Marin Rodrigues <josch@mister-muffin.de> | 2023-04-18 13:29:02 +0200 |
---|---|---|
committer | Johannes Schauer Marin Rodrigues <josch@mister-muffin.de> | 2023-06-19 14:08:44 +0200 |
commit | 1c98a5b3b36f7e9abe1e62dcfe49cc0fa298379f (patch) | |
tree | fdb9b9a85ff7df861d5f1611209f2d49177d1d53 /bin | |
parent | 8ce786ab8f39f2d7570355a5bbf26bc0669258d3 (diff) | |
download | debvm-1c98a5b3b36f7e9abe1e62dcfe49cc0fa298379f.tar.gz |
bin/debvm-run: qemu (>> 1:8.0) provides symlinks for qemu-system-${debarch} as well as qemu-system-any
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/debvm-run | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/bin/debvm-run b/bin/debvm-run index f3811ad..909d2a2 100755 --- a/bin/debvm-run +++ b/bin/debvm-run @@ -270,7 +270,11 @@ set -- \ -object rng-random,filename=/dev/urandom,id=rng0 \ "$@" -QEMU="qemu-system-$KERNELARCH" +# Translate KERNELARCH (a Debian architecture) to a Debian CPU name. +# This utilizes the QEMU Debian package symlink mapping that ensures that +# calling qemu-system-${DEB_HOST_ARCH_CPU} will run the QEMU binary providing +# the correct emulator for that CPU. +QEMU="qemu-system-$(dpkg-architecture --force --host-arch $KERNELARCH --query DEB_HOST_ARCH_CPU)" CPU= MACHINE= MAX_SMP= @@ -279,7 +283,6 @@ RNG_DEV=virtio-rng-pci,rng=rng0 case "$KERNELARCH" in amd64) - QEMU=qemu-system-x86_64 MACHINE="type=q35" ;; arm|armel|armhf) @@ -288,7 +291,6 @@ case "$KERNELARCH" in MAX_SMP=8 ;; arm64) - QEMU=qemu-system-aarch64 CPU=max,pauth-impdef=on MACHINE="type=virt,gic-version=max" ;; @@ -306,12 +308,8 @@ case "$KERNELARCH" in MAX_SMP=1 ;; powerpc) - QEMU=qemu-system-ppc MAX_SMP=1 ;; - ppc64el) - QEMU=qemu-system-ppc64 - ;; riscv64) MACHINE="type=virt" ;; |