Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Raspberry Pi Zero W image in qemu

I had generated a core-image-minimal using yocto for Raspberry Pi zero W.
I'm trying to run it using qemu-system-arm using this command:

sudo qemu-system-arm -kernel uImage-1-4.19.93+git0+3fdcc814c5-r0-raspberrypi0-wifi-20200208095028.bin \
-cpu arm1176 \
-m 512 \
-M raspi2 \
-no-reboot \
-serial stdio \
-append "root=/dev/sda2 panic=1 rootfstype=ext4 rw init=/bin/bash" \
-drive "file=core-image-minimal-raspberrypi0-wifi-20200208095028.rootfs.tar.bz2,index=0,media=disk,format=raw"

but the emulator run as a blank screen.

my changes inside local.conf:

MACHINE ??= "raspberrypi0-wifi"
RPI_USE_U_BOOT = "1"
ENABLE_UART = "1"
IMAGE_FSTYPES = "tar.bz2 ext4.xz"
SDIMG_ROOTFS_TYPE = "ext4.xz"
DISTRO_FEATURES_remove = "x11"
like image 638
Baron Leonardo Avatar asked Nov 20 '25 06:11

Baron Leonardo


1 Answers

Raspberry Pi 2 has a different processor BCM2836 (quad core) and different memory map that RPiZero or RPi1 What I did was to modify and recompile QEMU to support Raspberry Pi Zero W. You can find my patched fork at: https://github.com/igwtech/qemu

like image 146
Javier Munoz Avatar answered Nov 22 '25 18:11

Javier Munoz