Progress on running Haiku on VisionFive 2

My VF2 just arrive. I’am tested it. Work on Debian. Now I wait for X512 works with a little stable version of Haiku for RiscV.

Cheers!

1 Like

Congrats on getting Haiku booting on the VF2 so quickly X512! Super impressive work yet again.

I’ve ordered one now, overcome with the sheer novelty value of being able to run Haiku on a new and exciting arch. Hopefully you’ll be able to get USB working before mine arrives? :wink:

This has made me wonder. How is it that you’ve been able to get Haiku booting to the desktop and mostly usable on at least two RV boards now but we still don’t have a comparable status ARM port of Haiku when many more devs have had access to ARM boards for much longer than we’ve had RV SBCs?

ARM has never been a good target. ARM has so many different architectures and ways to boot. Each of them being more like its own platform and needing different drivers. It has been a moving target all this time. IIRC Haiku almost booted on gumstix arm boards, but who even remembers them now?

It is starting to become simpler with UEFI, ACPI and devicetrees, ARM chips still need a lot of different drivers. The Risc-V port also made haiku a lot more portable which also helps ARM and other targets.

And the most important part: there needs to be a person willing to spend time and energy on it, it is a hard task and it is hard to stay motivated. So keep motivating and encouraging people…

15 Likes

I finally got Haiku desktop with USB working. Booted from NVMe. Four CPU cores are working.

63 Likes

That is super hot! Would love to try this soon. <3

Amazing! Less than three hours after I posted you have USB working! Is that USB 2.0 and 3.0?

I presume the visionfive 2 HDMI doesn’t support audio yet does it? I’ve got some dirt cheap USB C headphone adapters (“sounds cards”) I’ll have to see if they work with haiku x86 then maybe I can use it on RV for audio? I presume the onboard audio isn’t supported yet?

It is XHCI (USB 3).

It will probably work in the same way as in x86 (with some glitches).

There are an audio jack on the left side. It is not supported yet by Haiku but seems not complicated to support.

10 Likes

So how is performance on this board? is it worth buying?, great work BTW, the speed at which you make progress is impressive, it makes us happy to see it every time.

5 Likes

X512 may correct me if he knows better but the phoronix benchmarks I saw put it in the same ballpark as a RPi 3 in terms of its CPU. This will partly be because all compilers, libraries and apps are optimised for x86 and/or ARM but not RISCV yet.

EDIT

I’m not sure phoronix have benchmarked the visionfive 2 yet so maybe I was thinking of tests they did on the Unmatched. I don’t think there’s a world of difference between the two tho so my comparison could still be good enough. I’m not expecting it to be as fast as my RPi 4 but I’m encouraged by the fact it has an open source mesa GPU driver in the works.

Optimization to riscv maybe be a 10-15% cpu speed. RPi4 prize is now very unsatisfacted, because ARM on RPi4 is fast. Vision Five have a other issures, like m.2 port or UEFI in Uboot. The Power o RiscV is open architeture and software drivers. Maybe a SWOT analise (+ and -) talk you more.

There might also be a lack of developer interest in an ARM port due to ARM being a closed ISA.

The Core of ARM is under licence and it’s cost (high price), many of developer choose a ARM becase is in new technlogy and monetary gain. Majority of Engeeners don’t like RISCV, open project is excelent to open source, not for monetization. An idea of SBC is not a speed.
Many of years be a intel 8051, now when RPi look a light of sun, the era of old intel pass.

1 Like

tqh summed up the problem very well. It is not so much lack of interest, but lack of time and ever changing hardware. I have over the years bought several ARM devices, and each of them became obsolete and possibly broken before I could even get started on porting Haiku to it. I still own some of them, and maybe I’ll get back to Haiku hacking on at least one (the other is way too old and it would not make sense anymore to get Haiku running there, and the architecture is very strange, 2 CPU cores of which only one has an MMU…)

There is no problem at all with it being a “closed” ISA (what does that even mean? That issue has been solved since at least the 6502 cloning the ISA of the Motorola 6800 but swapping the CPU pins around so it wouldn’t be fully compatible, or the z80 being a clone of the 8080 but renaming the mnemonics in the assembler so people would notice, but lawyers wouldn’t).

There were problems with each machine using an ARM CPU being essentially a completely different architecture, with a different UART to send debug to, a different way to program the framebuffer, and so on. When we started, even the MMU wasn’t standard and was different between various ARM generations.

Recently this is solved by having UEFI for all machines, meaning we can get at least the bootloader running on any machine without any new code. This benefits both RISC-V and ARM, since they have both standardized on UEFI, and as a result, the ARM port has started to make some progress again.

So, TL;DR: it is not a problem of closed ISA, but of lack of architecture standardization for anything but the CPU itself.

8 Likes

Not visionfive 2 but Haiku generally not supports audio over hdmi.

Well, that all depends on the drivers. On modern x86 PCs with Intel graphics, it is not done yet because it requires collaboration between the graphics driver and the sound driver, both of which are rather complicated things designed by Intel. But on other chipset designs, it may be a lot easier.

This probably would be good to post as an official haiku news post. Do not ask me how though…

4 Likes

Just make a pull request to the website, which is hosted on github at GitHub - haiku/website: The Haiku website. (Pull requests are accepted; please file issues at https://dev.haiku-os.org).. There is a “news” section, but it is rarely used nowadays since all developer blogs also get to the homepage. But it’s available.

1 Like

@X512 are you planning to merge your current progress with the upstream haiku sources? I’m asking because I’m seriously considering getting one of these VisionFive 2 boards (just after getting my next paycheck! :sweat_smile:) for use with haiku (no dual-boot), so I’d like to give it a try.

Thank you very much,
Luca

Some PCI refactor is needed in upstream Haiku to add VisionFive 2 support (multiple domains, separate MSI interrupt controller per domain, resource allocation).

Current VisionFive 2 support code is published here: Commits · X547/haiku · GitHub.

9 Likes

Thank you very much for your reply. So, at least in theory, if I build the visionfive2 branch from your repo, I should get a bootable haiku, right? Is there any special param that I should pass to the configure script? Can you share the build commands you use to build your images?

I know that I’m asking a bit too much infos, please don’t get offended.

Thanks a lot,
Luca