How to play with a RiscV version of Haiku in TinyEMU or QEMU?

1 Like

Other than running Haiku (RISCV) in RVVM, what am I looking at? I see you have Pulse running. I was just about to ask about getting Mandelbrot running in RISCV, but you may already have done that! Where can I get the compiled version of Pulse or how to Jam it myself? I assume RVVM is more robust (capable of more cores/threads) than QEMU? Should I see about switching to it? Is the command line similar?

RVVM run faster than QEMU, but Haiku upstream currently do not fully support RVVM (no keyboard/mouse). It need my Device Manager v2 branch: GitHub - X547/haiku at device_manager2.

1 Like

Can you summarise/give instructions on how to set up a Risc-V Haiku virtual machine?

Well, first, do you want to set it up on a Windows system or a Haiku x86_64 system?

On a macOS arm64 system.

You mean an M1 or greater Mac? If an Apple Silicon (M1 or greater)-native version of QEMU is available for macOS, then you would download/install that. Then download a RiscV revision of Haiku. Then follow the proper guide to place u-boot and the revision of Haiku where they need to go. Then execute the proper command line for macOS Terminal to then start up QEMU and load/execute Haiku (RiscV) in it.

It just says: Guest has not initialised the display (yet)
When I look at serial0 it has KDLed.

Yeah, the Terminal is your serial display. Which revision of Haiku are you using? You are making sure it is from the RiscV page, right?

I am using the latest haiku-master-hrev57476-riscv64-mmc.image.
My command is:

coolcoder613@ebmacbook ~/Downloads @ qemu-system-riscv64 -M virt -m 1G -device ati-vga -kernel u-boot.bin \
.................................... -drive file=haiku-master-hrev57476-riscv64-mmc/haiku-master-hrev57476-riscv64-mmc.image,format=raw,if=virtio \
.................................... -usb -device usb-ehci,id=echi -device usb-kbd -device usb-tablet

Try using the previous version 57475.

It doesn’t work, same KDL.

That doesn’t make sense… I’m RUNNING Haiku (RiscV) hrev57475 in QEMU on both my Windows 11 system and my Haiku x86_64 system. It can’t be the build. I’m thinking it may be some weird compatibility issue with the macOS version of QEMU.

1 Like

What is your command line?

KDL:

publish device: node 0xffffffc0033ba510, path disk/virtual/virtio_block/0/raw, module drivers/disk/virtual/virtio_block/device_v1
DMAResource@0xffffffc0033ba470: low/high 0/ffffffffffffffff, max segment count 4294967295, align 1, boundary 0, max transfer 18446744073709551615, max segment size 4294967295
PANIC: initializing DMAResource failed: Out of memory
Welcome to Kernel Debugging Land...
Thread 14 "main2" running on CPU 0
Stack:
FP: 0xffffffc002e4bf80
FP: 0xffffffc002e4bfa0, PC: 0xffffffc002149008 <kernel_riscv64> arch_debug_call_with_fault_handler + 32
FP: 0xffffffc002e4bff0, PC: 0xffffffc0020d222a <kernel_riscv64> debug_call_with_fault_handler.localalias + 120
FP: 0xffffffc002e4c080, PC: 0xffffffc0020d3460 <kernel_riscv64> _ZL20kernel_debugger_loopPKcS0_Pvi + 272
FP: 0xffffffc002e4c100, PC: 0xffffffc0020d3706 <kernel_riscv64> _ZL24kernel_debugger_internalPKcS0_Pvi + 130
FP: 0xffffffc002e4c140, PC: 0xffffffc0020d3a0c <kernel_riscv64> panic + 78
FP: 0xffffffc002e4c200, PC: 0xffffffc002501e22 <virtio_block> _Z25virtio_block_set_capacityP24virtio_block_driver_info.localalias + 282
FP: 0xffffffc002e4c230, PC: 0xffffffc002501f4a <virtio_block> _ZL24virtio_block_init_devicePvPS_ + 140
FP: 0xffffffc002e4c260, PC: 0xffffffc0020e3842 <kernel_riscv64> _ZN12_GLOBAL__N_16Device10InitDeviceEv + 96
FP: 0xffffffc002e4c3a0, PC: 0xffffffc0020e686c <kernel_riscv64> _ZL10devfs_openP9fs_volumeP8fs_vnodeiPPv + 96
FP: 0xffffffc002e4c3e0, PC: 0xffffffc00210a574 <kernel_riscv64> _ZL10open_vnodeP5vnodeib + 42
FP: 0xffffffc002e4c420, PC: 0xffffffc00210f3d0 <kernel_riscv64> _ZL9file_openiPcib + 86
FP: 0xffffffc002e4c590, PC: 0xffffffc002114628 <kernel_riscv64> _kern_open + 146
FP: 0xffffffc002e4c5c0, PC: 0xffffffc0021530e0 <kernel_riscv64> open + 44
FP: 0xffffffc002e4c630, PC: 0xffffffc0020f680c <kernel_riscv64> _ZN8BPrivate10DiskDevice11KDiskDevice5SetToEPKc + 114
FP: 0xffffffc002e4c720, PC: 0xffffffc0020f8498 <kernel_riscv64> _ZN8BPrivate10DiskDevice18KDiskDeviceManager5_ScanEPKc.localalias + 370
FP: 0xffffffc002e4c810, PC: 0xffffffc0020f842e <kernel_riscv64> _ZN8BPrivate10DiskDevice18KDiskDeviceManager5_ScanEPKc.localalias + 264
FP: 0xffffffc002e4c900, PC: 0xffffffc0020f842e <kernel_riscv64> _ZN8BPrivate10DiskDevice18KDiskDeviceManager5_ScanEPKc.localalias + 264
FP: 0xffffffc002e4c9f0, PC: 0xffffffc0020f842e <kernel_riscv64> _ZN8BPrivate10DiskDevice18KDiskDeviceManager5_ScanEPKc.localalias + 264
FP: 0xffffffc002e4cae0, PC: 0xffffffc0020f842e <kernel_riscv64> _ZN8BPrivate10DiskDevice18KDiskDeviceManager5_ScanEPKc.localalias + 264
FP: 0xffffffc002e4cb30, PC: 0xffffffc0020f858e <kernel_riscv64> _ZN8BPrivate10DiskDevice18KDiskDeviceManager17InitialDeviceScanEv.localalias + 166
FP: 0xffffffc002e4cf70, PC: 0xffffffc002118944 <kernel_riscv64> vfs_mount_boot_file_system + 868
FP: 0xffffffc002e4cfc0, PC: 0xffffffc002096fbc <kernel_riscv64> _ZL5main2Pv + 152
FP: 0xffffffc002e4cfe0, PC: 0xffffffc0020b4342 <kernel_riscv64> _ZL19common_thread_entryPv + 44
FP: 0x0, PC: 0xffffffc002147e44 <kernel_riscv64> arch_thread_entry + 0

.\qemu-system-riscv64 -kernel u-boot.bin -M virt -m 4096 -device ati-vga -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0 -drive file=haiku-mmc.image,if=none,format=raw,id=x0 -device usb-ehci,id=ehci -device usb-tablet -device usb-kbd -device ramfb -serial stdio -smp 3

However, I think it’s a little different on my Haiku x86_64 system, I can check…

I tired your command line and it worked!

Is there any networking support?

Excellent! What were the differences between the one you used and the one I gave you?

No networking support, to my knowledge. I’d love it, if there were, but… not sure how much “patch-thru” there is (if any) between QEMU’s emulated platform and the host platform.

./rvvm fw_jump.bin -k u-boot.bin -i drive.img -m 2G -smp 2 -res 1280x720

u-boot.bin: found on the rvvm git page
drive.img: I think the haiku riscv image should be used

fw_jump.bin: I don’t understand where I can find this file

thank you so much for the support