QEMU Emulate Raspberry Pi 3 and 4
· 9 min read
In this blog, QEMU is employed to emulate Raspberry Pi 3/4 in mac M1 host(it's also supposed to work in Windows/Linux with a little tweak). I will demonstrate two different ways to emulate Raspberry Pi 3 and Raspberry Pi 4 in respect. These two ways are different by using different QEMU machines as you would like to use:
-machine raspi3b
: raspberry pi 3b machine to emulate Raspberry Pi 3.-machine virt
: general arm machine to emulate Raspberry Pi 4.
note
In mac M1 with setting -machine virt
, I use the hardware acceleration by -accel hvf
. In Windows(x86_64), the hardware acceleration for aarch64
is not available, so removing the hardware acceleration will work as well in Windows.
For both of these two, we still need prepare some common steps before running QEMU:
- Extract the appropriate kernel, device tree or root filesystem