mirror of https://github.com/akuker/RASCSI.git
Created Run PiSCSI Under Qemu (markdown)
parent
aaf3a31f71
commit
f5c858ccea
|
@ -0,0 +1,70 @@
|
|||
# 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](https://github.com/PiSCSI/piscsi/releases)
|
||||
|
||||
- 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
|
||||
```
|
||||
|
||||
- Download custom Kernel and Device Tree for Qemu
|
||||
- [Raspberry Pi 3 Device Tree](https://github.com/farabimahmud/emulate-raspberry-pi3-in-qemu/blob/main/bcm2710-rpi-3-b-plus.dtb)
|
||||
- [64 bit Linux Kernel 8](https://github.com/farabimahmud/emulate-raspberry-pi3-in-qemu/blob/main/kernel8.img) (If you're using a 64 bit image)
|
||||
- [32 bit Linux Kernel 7](https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-5.10.63-bullseye) (If you're using a 32 bit "Hard Float" image)
|
||||
|
||||
# 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
|
||||
|
||||
* https://github.com/dhruvvyas90/qemu-rpi-kernel/wiki
|
||||
* https://github.com/farabimahmud/emulate-raspberry-pi3-in-qemu
|
Loading…
Reference in New Issue