Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Use correct qemu configuration for aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
byteduck committed Jul 22, 2024
1 parent 50cd09b commit c13e4ff
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions scripts/qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,31 @@ if [ -z "$DUCKOS_QEMU_ACCEL" ]; then
fi
fi

DUCKOS_QEMU_MACHINE=""
case $ARCH in
i686)
QEMU_SYSTEM="i386"
;;
aarch64)
QEMU_SYSTEM="aarch64"
DUCKOS_QEMU_MACHINE="-machine virt"
;;
*)
fail "Unsupported architecture $ARCH."
;;
esac

# Find which qemu binary we should use
if command -v wslpath >/dev/null; then
# We're on windows, use windows QEMU
if [ -z "$DUCKOS_WIN_QEMU_INSTALL_DIR" ]; then
DUCKOS_WIN_QEMU_INSTALL_DIR="C:\\Program Files\\qemu"
fi
USE_KVM="0"
DUCKOS_QEMU="$(wslpath "${DUCKOS_WIN_QEMU_INSTALL_DIR}")/qemu-system-i386.exe"
DUCKOS_QEMU="$(wslpath "${DUCKOS_WIN_QEMU_INSTALL_DIR}")/qemu-system-$QEMU_SYSTEM.exe"
DUCKOS_IMAGE="$(wslpath -w "$DUCKOS_IMAGE")"
else
DUCKOS_QEMU="qemu-system-i386"
DUCKOS_QEMU="qemu-system-$QEMU_SYSTEM"
fi

DUCKOS_QEMU_DISPLAY=""
Expand All @@ -62,11 +76,12 @@ fi
# Run!
DUCKOS_QEMU_ARGS="
-s
-kernel kernel/duckk32
-kernel kernel/${KERNEL_NAME}
-drive file=$DUCKOS_IMAGE,cache=directsync,format=raw,id=disk,if=ide
-m 512M
-serial stdio
-device ac97
$DUCKOS_QEMU_MACHINE
$DUCKOS_QEMU_DISPLAY
$DUCKOS_QEMU_ACCEL"

Expand Down

0 comments on commit c13e4ff

Please sign in to comment.