ghaza96
Posts: 1
Joined: Sun Oct 21, 2018 1:41 pm

Emulating Raspbian With Qemu in Arch linux

Sun Oct 21, 2018 1:55 pm

I'm new to Raspberry pi and to Qemu. I'm trying to emulate RaspbianOS on my Arch Linux host using qemu-system-arm. and I have run into some problems.

- The emulation works fine using the machine versatilepb but when invoking qemu-system-arm using -M raspi2, all I get is a black window.

What is the problem ? can I make it run using raspi2 or even virt as the machine type?

- Second, I used a Raspbian Stretch and the custom kernel was a jessie which I picked from [here][1]. When I replace the jessie custom kernel a stretch one, I get a black window with the message guest has not initialized display yet.

What is the role of the qemu-kernel and why does the qemu-stretch-kernel not work?

- Finallly, to work properly the image has to be mounted in order to add these lines to `/etc/udev/rules.d/90-qemu.rules` .

Code: Select all

KERNEL=="sda", SYMLINK+="mmcblk0" 
KERNEL=="sda?", SYMLINK+="mmcblk0p%n"
KERNEL=="sda2", SYMLINK+="root"
*what is their signification ? and why are they added ?*

Here is the command that I ran succesfully:

Code: Select all

qemu-system-arm -kernel kernel-qemu-4.4.26-jessie -cpu arm1176 -m 256 -M versatilepb \        
 -no-reboot -drive format=raw,file=2018-10-09-raspbian-stretch-lite.img

[1]: https://github.com/dhruvvyas90/qemu-rpi-kernel

Return to “Raspbian”