Matching QEMU specs to hardware ARM-based devices?

Curious if anyone has some existing QEMU configuration to allow a CHR to proximate some of the ARM-based hardware devices. I can get the ports, memory and CPU type to be close, which is likely good enough for testing config that largely depends on port counts.

But... curious someone already has some QEMU -cpu etc mapping to known MikroTik devices? The docs show quite of options:
https://qemu-project.gitlab.io/qemu/system/arm/cpu-features.html
Now QEMU defaults likely are fine, but if someone already knows what the RB5009 (or others) looks like in QEMU configuration, that be helpful

For example, ChatGPT suggests this for RB5009:

qemu-system-aarch64 \
  -machine virt,gic-version=3 \
  -cpu cortex-a53,pmu=on,crc=on,aes=on \
  -smp 4 \
  -m 1024 \
  -nographic

Never tried to emulate specific MT device CPU, but ChatGPT suggestion for RB5009 seems to be wrong, RB5009 has CPU model 88F7040, which is Marvell ARMADA 7040 and it is Cortex-A72 core, not Cortex-A53 as set in -cpu param, some params can be set that can match CPU spec to values from CPU product brochure.

Probably similar brochures/docs can be found for other MT devices CPUs for setting QEMU params, for eg. I didn’t found manufacturer brochure for Qualcomm IPQ6010 SoC used in Chateau 5G R17 ax and some other ax devices, but there are some tech. docs for boards which are using same SoC on device.report site - https://device.report/qualcomm/ipq6010, like it is Cortex-A53 core, etc…

Also on Wireless CAT wiki some useful CPUs info can be found, like for mentioned Qualcomm IPQ6010.

LOL, and why I ask real people :wink:

ChatGPT told me, which sounded "light" to me for RB5009:

Short answer: you can’t precisely emulate a “Marvell Armada” SoC in QEMU , but you can get very close by emulating a generic ARMv8 Cortex-A53 quad-core system with 1 GB RAM , which is what Armada 7K/8K class chips are built around.

And now checking Gemini and Claude, they think:

  -machine virt \
  -cpu cortex-a72 \
  -smp 4 \
  -m 1G

@optio, FWIW, I want to add some more templates for various hardware-emulated images to my mikropkl UTM images since I find myself adding 5 or 8 ports all the time... But was thinking I could also match CPU/memory to real devices. Still be virtio for network so never going to that close, but thought I'd try.

1 Like

Here are the profiles I'm thinking, being a little generic to some...

CCR (mid) - neoverse-n1 / 12 cores / 8G mem / 12 ethernet
CCR (low) - neoverse-n1 / 8 cores / 4G mem / 12 ethernet
RB5009 - cortex-a72 / 4 cores / 1G mem / 8 ethernet
hAPbe - cortex-a52 / 4 cores / 2G mem / 5 ethernet
hAPax - cortex-a52 / 4 cores / 1G mem / 5 ethernet
L009 - cortex-a52 / 2 cores / 512k mem / 8 ethernet

And I'm not sure the LLM suggested pmu=on,crc=on,aes=on can be expressed in UTM, although didn't check that part. Plus on UTM QEMU there is max of 16 network adapters if I recall, so thus limited some CCR since they are already abstractions