I'm trying to emulate Raspberry Pi 3 B in QEMU and I was able to successfully boot the oldest OS release from here: https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2020-08-24/2020-08-20-raspios-buster-arm64-lite.zip

I used the following sequence of commands (on MacOS host) to obtain the kernel and dtb files:

wget "${URL}"
FILENAME=$(basename $URL)
NAME=$(basename $URL .zip)

hdiutil mount "${NAME}.img" -mountpoint "/Volumes/${NAME}"
mkdir $NAME

# Copy kernel files
cp -r /Volumes/$NAME/kernel*.img ./$NAME/
# Copy dtb files
cp -r /Volumes/$NAME/*.dtb ./$NAME/
hdiutil unmount "/Volumes/${NAME}"

qemu-img convert -f raw -O qcow2 "${NAME}.img" "${NAME}.qcow"

# resize the image so it can be used as SD card
qemu-img resize -f qcow2 "${NAME}.qcow" 2G

and then the following command to launch the VM in QEMU:


qemu-system-aarch64 \
    -M raspi3 \
    -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1" \
    -dtb ./$NAME/bcm2710-rpi-3-b.dtb \
    -drive id=card0,if=none,format=qcow2,index=0,file=./$NAME.qcow \
    -device sd-card,drive=card0 \
    -kernel ./$NAME/kernel8.img \
    -m 1G \
    -smp 4 \
    -serial stdio \
    -usb \
    -device usb-mouse \
    -device usb-kbd

This works with the above release, but not the two later releases downloadable from here:

Instead of successful boot I get just a black QEMU window and no output in the terminal.

Is there any way I can debug this to understand the differences between these OS releases and why the two don't work?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.