qemu How to emulate a Raspberry Pi 3 and boot FreeBSD?

I've spent the better part of the day trying to figure this out. But as I'm new to QEMU, I can't seem to figure it out. Writing up all the different ways would take way too long to condense together into a readable form. Rest assured that I've worked my way through all of this and countless Linux-based instructions that won't help:


This is why I'm asking if someone has figured out a working qemu-system-aarch64 command to get this up and running.

My goal is to be able to test (and mess with) images for various Pi's that currently run on Raspbian.

Please note that I'm not looking to emulate FreeBSD on a Raspberry Pi or Linux in general (there are countless guides for that), I'd like to run an emulated Raspberry Pi 3 in QEMU running FreeBSD instead of Raspbian.

Any kind of useful pointer is highly appreciated, thank you!
 
Have you tried "qemu-system-aarch64 -M raspi3b ..."? You can see which boards are supported with "qemu-system-aarch64 -M help".
From https://www.qemu.org/docs/master/system/target-arm.html :
Because Arm systems differ so much and in fundamental ways, typically operating system or firmware images intended to run on one machine will not run at all on any other. This is often surprising for new users who are used to the x86 world where every system looks like a standard PC. (Once the kernel has booted, most userspace software cares much less about the detail of the hardware.)

If you already have a system image or a kernel that works on hardware and you want to boot with QEMU, check whether QEMU lists that machine in its -machine help output. If it is listed, then you can probably use that board model. If it is not listed, then unfortunately your image will almost certainly not boot on QEMU. (You might be able to extract the filesystem and use that with a different kernel which boots on a system that QEMU does emulate.)
 
Tried it occasionally some time ago with optiion -M raspi3b with a working rpi3 SD image. It gives a black vm screen and the host cpu causes high load on all cores but nothing happens. I have no idea what the CPU is doing. Iy might be in a boot-loop.
 
Back
Top