How to qemu the different image binaries

Good afternoon VF2 fans, within the VF2 forum, there are 3 images I am aware of for the VF2:

How does one run these 3 VF2 images against qemu?
I know how to qemu run an older riscv fedora image for the hifive unmatched board:

qemu-system-riscv64
-bios none
-nographic
-machine virt
-smp 4
-m 2G
-kernel Fedora-Developer-Rawhide-20200108.n.0-fw_payload-uboot-qemu-virt-smode.elf
-object rng-random,filename=/dev/urandom,id=rng0
-device virtio-rng-device,rng=rng0
-device virtio-blk-device,drive=hd0
-drive file=fedora-rawhide-developer-20200108.n.0-sda.raw,format=raw,id=hd0
-device virtio-net-device,netdev=usernet
-netdev user,id=usernet,hostfwd=tcp::10000-:22

Thank you in advance

1 Like

I wish as part of VF2 tools/scripts, there was another tool that would launch the image with qemu so we could run it without the actual hardware and try things out. At present I don’t know how to run qemu against any vf2 image built be it buildroot, debian, archlinux, gentoo, fedora.

Doesn’t anybody else want this?

Ideally I felt it would make a lot of sense that it finds itself in this other set of tools kng in the vf2 community built. I personally find it was the best way to build the buildroot binaries and image. Even if we do have the hardware, it would make sense to qemu the image to try it out. Doesn’t it?

Thank you for listening.

1 Like

I noticed davidlt mentioned on libera irc chats he recently updated some documents to do with running qemu on riscv related to hifive unmatched boards however.

https://fedoraproject.org/wiki/Architectures/RISC-V/Installing#Boot_under_QEMU
It mentions uboot and spl files which comes up in the VF2 boot conversations a lot especially with the required firmware updates we’ve needed to do to run the later kernels.

# Launch QEMU
qemu-system-riscv64 \
  -bios u/usr/share/uboot/qemu-riscv64_spl/u-boot-spl.bin \
  -nographic \
  -machine virt \
  -smp 4 \
  -m 4G \
  -device loader,file=u/usr/share/uboot/qemu-riscv64_spl/u-boot.itb,addr=0x80200000 \
  -object rng-random,filename=/dev/urandom,id=rng0 \
  -device virtio-rng-device,rng=rng0 \
  -device virtio-blk-device,drive=hd0 \
  -drive file=Fedora-Developer-37-20221130.n.0-nvme.raw.img,format=raw,id=hd0 \
  -device virtio-net-device,netdev=usernet \
  -netdev user,id=usernet,hostfwd=tcp::10000-:22

There are notes here about fetching the dtb files from qemu…once again over my head LOL