Open josephernest opened 3 years ago
Try native emulation as this guide --> (Wiki link) You may need qemu 5.1.0+ for it though for functioning keyboard and mouse.
@dhruvvyas90 This worked indeed:
qemu-5.2.0\qemu-img.exe resize 2020-12-02-raspios-buster-armhf-lite.img 4G
qemu-5.2.0\qemu-system-aarch64.exe -M raspi3 -append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootdelay=1" -dtb bcm2710-rpi-3-b.dtb -sd 2020-12-02-raspios-buster-armhf-lite.img -kernel kernel8.img -m 1G -smp 4 -serial stdio -usb -device usb-mouse -device usb-kbd
Thank you very much :)
Little questions:
Is there a way to make it work with Rpi4 emulation? -M raspi4
does not work, it is not listed in qemu-system-aarch64.exe -machine help
anyway. As my goal was to test custom built distribution for Rpi4, is there a way to have something close to a RPi4 with a -cpu
parameter maybe? Or do we have to wait for a qemu-system-aarch64.exe
that supports machine raspi4
?
IIRC, this RaspiOS Lite version is armhf
and 32-bit. Is it normal that it works with qemu-system-aarch64.exe
(working) and not qemu-system-arm.exe
(I tried, non working)?
what is the difference between using "native emulation" and your repo's kernels?
i think native emulation is emulation of the actual raspberry pi and the other is just emulation of a generic board to run raspberry pi os
@josephernest Try this for non-native emulation: qemu-system-arm.exe -M versatilepb -cpu arm1176 -m 256 -drive "file=2021-01-11-raspios-buster-armhf.img,if=none,index=0,media=disk,format=raw,id=disk0" -device "virtio-blk-pci,drive=disk0,disable-modern=on,disable-legacy=off" -net nic -net "user,hostfwd=tcp::5022-:22" -kernel kernel-qemu-5.4.51-buster -dtb versatile-pb-buster-5.4.51.dtb -append "root=/dev/vda2 panic=1"
I'm using:
kernel-qemu-5.4.51-buster
versatile-pb-buster-5.4.51.dtb
2020-12-02-raspios-buster-armhf-lite.img
from https://www.raspberrypi.org/software/operating-systems/Then
gives an endless reboot:
Any idea?
PS: is it also possible to test RPi4 specific distributions? Or is only Raspi 2 / 3 supported in this repo?