#StackBounty: #pi-3 #qemu #virtualization Unable to boot two latest releases of Raspberry Pi OS

Bounty: 50

I’m trying to emulate Raspberry Pi 3 B in QEMU and I was able to successfully boot the oldest OS release from here:

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:


    -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 
    -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?

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.