summaryrefslogtreecommitdiff
path: root/debvm-run
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2022-12-23 10:23:16 +0100
committerHelmut Grohne <helmut@subdivi.de>2022-12-23 10:23:16 +0100
commita6b2f6ea32ca96dcca10ff9ff647d5153ab4519f (patch)
treea229106423b3e80b451a362f29849d6a05ed9dd6 /debvm-run
parentc100114c51d2f5e9e8ed2efd58d065b0dd3b34f8 (diff)
parenta2dbdff591b22d2d85cf0e41b517c41c2bb7ba3f (diff)
downloaddebvm-a6b2f6ea32ca96dcca10ff9ff647d5153ab4519f.tar.gz
Merge branch main into branch dns
This allows using the newly added DEBVER variable.
Diffstat (limited to 'debvm-run')
-rwxr-xr-xdebvm-run16
1 files changed, 15 insertions, 1 deletions
diff --git a/debvm-run b/debvm-run
index 06dd250..edb01ad 100755
--- a/debvm-run
+++ b/debvm-run
@@ -93,7 +93,6 @@ set -- \
-no-user-config \
-name "debvm-run $IMAGE" \
-m 1G \
- -smp "$(nproc)" \
-kernel "$KERNELTMP" \
-initrd "$INITRDTMP" \
-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 \
@@ -101,6 +100,7 @@ set -- \
-device "virtio-net-pci,netdev=net0" \
"$@"
+MAX_SMP=
if test "$ARCHITECTURE" = "$VMARCH"; then
QEMU=kvm
# While kvm will fall back gracefully, the following options can only
@@ -126,11 +126,25 @@ else
ppc64el)
QEMU=qemu-system-ppc64
;;
+ mips64el)
+ QEMU="qemu-system-$VMARCH"
+ MAX_SMP=1
+ set -- -cpu 5KEc "$@"
+ ;;
+ mipsel)
+ QEMU="qemu-system-$VMARCH"
+ MAX_SMP=1
+ ;;
*)
QEMU="qemu-system-$VMARCH"
;;
esac
fi
+if test "$MAX_SMP" -gt 1; then
+ NPROC=$(nproc)
+ test "$NPROC" -gt "$MAX_SMP" && NPROC=$MAX_SMP
+ set -- -smp "$NPROC" "$@"
+fi
if test -z "$GRAPHICAL"; then
set -- -nographic "$@"