From 5b8d9f4326b4a6352cc52a8f761bd85a3b840ecc Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Wed, 21 Dec 2022 12:08:35 +0100 Subject: make it work for armhf * Pick the right kernel image * The disk is vda * Use the right qemu and pass the right flags Reported-by: Jochen Sprickerhof --- debvm-run | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'debvm-run') diff --git a/debvm-run b/debvm-run index 87fe0d6..d2afd51 100755 --- a/debvm-run +++ b/debvm-run @@ -66,11 +66,11 @@ if command -v elf-arch >/dev/null 2>&1; then VMARCH=$(elf-arch "$KERNELTMP") fi case "$VMARCH" in - arm64|s390x) - DISKDEV=vda + amd64|i386) + DISKDEV=sda ;; *) - DISKDEV=sda + DISKDEV=vda ;; esac @@ -99,19 +99,28 @@ else QEMU=qemu-system-aarch64 set -- -machine virt -cpu max "$@" ;; + arm|armel|armhf) + QEMU=qemu-system-arm + set -- -machine virt -cpu max "$@" + ;; *) QEMU="qemu-system-$VMARCH" ;; esac fi -if test "$VMARCH" = arm64; then - set -- -nographic "$@" -elif test "$VMARCH" = s390x; then - set -- -M s390-ccw-virtio -nographic "$@" -elif test -z "$GRAPHICAL"; then - KERNEL_CMDLINE="$KERNEL_CMDLINE console=ttyS0" + +if test -z "$GRAPHICAL"; then set -- -nographic "$@" + case "$VMARCH" in + s390x) + set -- -M s390-ccw-virtio "$@" + ;; + amd64) + KERNEL_CMDLINE="$KERNEL_CMDLINE console=ttyS0" + ;; + esac fi + if test -n "$SSHPORT"; then NETDEV="$NETDEV,hostfwd=tcp:127.0.0.1:$SSHPORT-:22" fi -- cgit v1.2.3