I am trying to build an image that supports both QEMU (For testing purposes before actual update rollouts) and actual hardware (Raspberry pi 3 or Intel NUC devices). I have tried using yocto project but facing difficulties in running it on QEMU.
Encountered repeated storage issues
Boot gets stuck waiting for:
sda1 / vda1
sda4 / vda4
Drops to a shell.
Fails to mount A/B partitions properly.
Indicates problems with partition layout or Mender’s expected partition names not matching the actual device.
Thanks for reaching out! However that usually is not easily possible. The reasons are - depending on the combination, one or more might apply:
storage names do not match. mmcblkX from SD/eMMC on ARM, vda on QEMU using virtio, sda on QEMU using ide/sata/scsi.
instruction set architectures do not match: ARM on Raspberry Pi, X86 on NUCs
QEMU does not necessarily emulate specific boards like the RPi (to be fair, it almost never does!)
different drivers required, different device trees, and so on
So in summary: no, this is not easily possible in the generic way. There might be very specific combinations of virtualized+board platforms which work, but definitely not in a general, freely choosable way.
Hi @TheYoctoJester, thanks for the update. So is it possible that we forget about the Raspberry Pi and have an Intel NUC supported image that can also run on QEMU ? If yes, any insight that in which direction should I look would be very helpful.