From 45ce0912c774005aa16260a3490fa5b3bed547ec Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Wed, 30 Oct 2024 08:21:16 +1100 Subject: [PATCH] fix to running armhf. added a ppc64el setup that doesn't work well --- vm.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/vm.sh b/vm.sh index f336f4e..6a44655 100755 --- a/vm.sh +++ b/vm.sh @@ -40,7 +40,8 @@ case "$ARCH" in QEMU=qemu-system-arm ARGS=( -M virt -cpu cortex-a15 -m 4G -nographic -serial stdio - -kernel armhf/vmlinuz -initrd armhf/initrd.gz + #-kernel armhf/vmlinuz -initrd armhf/initrd.gz + -kernel vmlinuz-6.1.0-25-armmp -initrd armhf-initrd.img -append "console=ttyAMA0 root=/dev/vda1 roottype=ext4$APPEND" -chardev socket,id=QEMU,server=on,wait=off,path=QEMU-armhf -mon chardev=QEMU,mode=readline @@ -94,11 +95,32 @@ case "$ARCH" in -netdev vde,sock=/run/vde.ctl,id=unet ) ;; + ppc64el) + QEMU=qemu-system-ppc64le + ARGS=( + -M pseries -cpu power8 -m 4G -smp 4 + -serial stdio + -kernel ppc64el/vmlinux + -initrd ppc64el/initrd.gz + #-append "root=/dev/ram0" + #-boot c + -append "root=/dev/sda2 roottype=ext4$APPEND" + #-chardev socket,id=QEMU,server=on,wait=off,path=QEMU-ppc64el + #-mon chardev=QEMU,mode=readline + -device virtio-blk-pci,id=blk0,drive=bootimg + -drive if=none,id=bootimg,format=raw,file=ppc64el/boot.img + -device virtio-blk-pci,id=blk1,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 ;; esac +pwd echo $QEMU "${ARGS[@]}" | sed 's/ -/\n -/g' >&2 exec $QEMU "${ARGS[@]}" -- 2.39.2