1 Run PiSCSI Under Qemu
Tony Kuker edited this page 2023-04-24 21:18:31 -05:00

Background

You can run the pre-built PiSCSI disk images under Qemu on other hosts. This process is only loosely documented and intended to be used by developers or "power users".

These commands have been used on a M1 Macbook Pro, but should also work the same on an Intel Linux host. The performance on x86_64 is going to be substantially slower than using another ARM platform.

Note: The instructions have only been tested for 64-bit images. The 32-bit instructions may not work and may need updates.

Download the PiSCSI disk image.

Take note whether it is the 32 or 64 bit variant. These can be pulled from the Releases Page

  • Unzip the image and resize it to a multiple of 2GB. 4GB should be plenty.
unzip image_20xx-xx-xx-PiSCSI-vxx.xx.xx-arm64-lite.zip
qemu-img resize 20xx-xx-xx-PiSCSI-vxx.xx.xx-arm64-lite.img 4G

Create launch script

Create a script named launch.sh (or whatever you want) in the same directory as the above files. Use the appropriate 32-bit or 64-bit command.

32-bit Qemu Launcher

TBD...

64-bit Qemu Launcher

#!/bin/bash

qemu-system-aarch64 \
    -M raspi3b \
    -cpu cortex-a72 \
    -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1" \
    -dtb bcm2710-rpi-3-b-plus.dtb \
    -sd 2023-04-25-PiSCSI-v23.04.01-arm64-lite.img \
    -kernel kernel8.img \
    -m 1G -smp 4 \
    -serial stdio \
    -usb -device usb-mouse -device usb-kbd \
	-device usb-net,netdev=net0 \
	-netdev user,id=net0,hostfwd=tcp::5555-:22 \

Make the script executable and launch it

chmod +x launch.sh
./launch.sh

What do the kernel names mean?

  • kernel.img is 32-bit for BCM2835 (RPi1 & Zero)
  • kernel7.img is 32-bit for BCM2836 (RPi2) and BCM2837 (RPi3)
  • kernel7l.img is 32-bit for BCM2711 (RPi4)
  • kernel8.img is 64-bit for BCM2837 (RPi3) or BCM2711 (RPi4)

References