Qemu showing as black screen for ARM (VM)

1

So I'm using this site to setup Qemu on my Lubuntu VM.

https://azeria-labs.com/emulate-raspberry-pi-with-qemu/

My errors happen when im trying to run the Qemu but the screen appears as black and it says "Guest has not initialized the display (yet)."

Looking at the error it says:

Error: invalid dtb and unrecognized/unsupported machine ID

r1=0x00000183 r2=0x00000100

r2[]=05 00 00 00 01 00 41 54 01 00 00 00 00 10 00 00

Available machine support:

ID (hex) NAME

ffffffff Generic DT based system

ffffffff ARM-Versatile (Device Tree Support)

Please check your kernel config and/or bootloader.

As you can see I used the latest kernel and raspberry image (Buster), so I'm not exactly sure if that's contributing to the error, because the source im using is pretty outdated.

$ qemu-system-arm -kernel ~/qemu_vms/kernel-qemu4.19.50-buster -cpu arm1176 -m 256 -M versatilepb -serial stdio -append "root=/dev/sda2 rootfstype=ext4 rw" -hda ~/qemu_vms/2019-09-26-raspbian-buster.img

I couldn't do the redir part from the online example because for some reason it kept saying -redir: invalid option

Here is the visual output that it's giving me:

https://ibb.co/xDmj7D7 https://ibb.co/9YrmD2M

If anyone can tell me what I did wrong, the output should be something similar to the source im using thanks! : https://azeria-labs.com/emulate-raspberry-pi-with-qemu/

EDIT: Alright i've made some progress since the last time. So i forgot to include the dtb because buster needs this as well.

-dtb /.../versatile-pb.dtb \

https://github.com/dhruvvyas90/qemu-rpi-kernel Used the command format from there, but i encountered that my file was raw so i did a drive command to format=raw

Then another error popped up: vpb_sic_write: Bad register offset 0x2c

Solved with adding: -serial stdio source: https://github.com/dhruvvyas90/qemu-rpi-kernel/issues/75

It looks like im in the raspberry, but my Qemu still has a black screen saying: Guest has not initialized the display (yet)

linux
ubuntu
raspberry-pi
qemu
asked on Stack Overflow Oct 31, 2019 by Jordles • edited Jun 20, 2020 by Community

2 Answers

2

I had the same situation as described above with Raspbian Buster image and kernel. But when I switched to 2019-04-08-raspbian-stretch-full.img and kernel-qemu-4.14.79-stretch without any other changes, then I was able to get graphics (I mean mouse cursor, desktop, etc.) in QEMU. Looks like versatile-pb.dtb has to be corrected for Raspbian Buster.

Raspbian Stretch in QEMU

answered on Stack Overflow Mar 16, 2020 by CityAceE
0

I use the buster img and with the parameter -dtb versatile-pb-buster.dtb(you can download it from https://github.com/dhruvvyas90/qemu-rpi-kernel), then it works.

answered on Stack Overflow Dec 13, 2020 by payne.nie

User contributions licensed under CC BY-SA 3.0