fix to running armhf.
authorRalph Ronnquist <rrq@rrq.au>
Tue, 29 Oct 2024 21:21:16 +0000 (08:21 +1100)
committerRalph Ronnquist <rrq@rrq.au>
Tue, 29 Oct 2024 21:21:16 +0000 (08:21 +1100)
added a ppc64el setup that doesn't work well

vm.sh

diff --git a/vm.sh b/vm.sh
index f336f4e7e78cd2b5d4f6767e000e38c8c0c4bf80..6a44655e1fc6b72e799c1b28a176b044b5a872cc 100755 (executable)
--- 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[@]}"