From: Ralph Ronnquist Date: Sat, 21 Sep 2024 02:51:42 +0000 (+1000) Subject: added riscv64 VM X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=0dbe321e78bdac343bd58f82374b272ff1f3fd30;p=rrq%2Fbespoke-installer.git added riscv64 VM --- diff --git a/vm.sh b/vm.sh index c75ff8a..910cda3 100755 --- a/vm.sh +++ b/vm.sh @@ -78,6 +78,21 @@ case "$ARCH" in -netdev vde,sock=/run/vde.ctl,id=unet ) ;; + riscv64) + QEMU=qemu-system-riscv64 + ARGS=( + -M virt -smp 4 -m 4G -nographic -serial stdio + -kernel riscv64/build/initrd/boot/vmlinux-6.10.9-riscv64 + -initrd riscv64/initrd.gz + -append "console=ttyS0 root=/dev/vda1 roottype=ext4$APPEND" + -chardev socket,id=QEMU,server=on,wait=off,path=QEMU-riscv64 + -mon chardev=QEMU,mode=readline + -device virtio-blk-pci,drive=hd + -drive if=none,id=hd,file=$IMG,format=raw + -device virtio-net-pci,netdev=unet + -netdev vde,sock=/run/vde.ctl,id=unet + ) + ;; *) echo "unknown \$1=$1" >&2 exit 1