Haiku runs on HiFive Unmatched

I finally managed to run Haiku on real HiFive Unmatched hardware.

Post on Haiku forum: https://discuss.haiku-os.org/t/my-progress-on-real-risc-v-hardware/10963.

Note that some information (CPU frequency, copyright year) in about window is currently wrong.

Patchset and test USB image is available here: GitHub - X547/Haiku-riscv: Haiku port to RISC-V architecture. SD card is not supported, use USB or NVMe.

7 Likes

That is pretty cool. I remember seeing BeOS while in college and being really interested in it then the company went bust or disappeared. Good to see it still being cared for and developed.

1 Like

Hopefully it’s still as fast and lightweight as it (and Linux) were in the 90s!

2 Likes

Ffmpeg and graphics editor is compiled. System is already quite stable. Software video decoding is quite slow.

1 Like

Just posting a short update here. Haiku’s mainline source code is now inching towards booting on the Unmatched thanks to X512’s hard work. (at the moment, X512’s branch is booting to a full desktop. mainline haiku is booting into our kernel)

Here’s a high level view for anyone interested:

  • u-boot on an SD card
  • Write Haiku’s RISC-V image to a USB drive
  • Boot Haiku on the Unmatched via EFI

I submitted this to u-boot to make things a little easier:
https://lists.denx.de/pipermail/u-boot/2021-August/458032.html

tldr; I feel like making your SD card “Just firmware (aka u-boot)” and loading the OS from a USB drive / NVMe makes sense as a model for operating systems to follow.

The MMC access speed is slow, and breaking apart os from firmware means projects can release generic “rv64gc” operating system images that “just boot via EFI” on riscv64 hardware

3 Likes

wow!

ive gotta give this a try when i have some more time!

Now you download nightly Haiku image and run on HiFive Unmatched

RISCV64 - Unsupported Builds | Haiku Files (haiku-os.org)

4 Likes

Not yet, but close. This patch chain should be merged for functional system: https://review.haiku-os.org/c/haiku/+/4494.

lol I thought it was done :smiley:

I just merged several more patches last night. X512’s work took place in a forked repository, and a lot of cleanup work was needed to make it “upstreamable”.

Upstream Haiku is roughly two “workaround” patches away from booting to a desktop on the SiFive Unmatched:

With the two patches above applied to Haiku’s source code, Haiku is booting on my SiFive unmatched. We include our radeon_hd video card driver… which works just fine on RISCV64.

2 Likes

How far along is it now? :slight_smile:
Any subjective feeling about the actual performance of Haiku on the unmatched? Is AMD like 550 etc also supported?

1 Like

I know this reply is late, but the Haiku port has kinda stalled. Our kernel loads, however after upgrading to GCC 11 we’re seeing a crash at bootup in userspace.

We have been debugging it for the last few months, but really haven’t gotten anywhere.

If anyone is looking for a project, we could definitely use some help :slight_smile: The issue can be reproduced in qemu as well as on the Unmatched which makes the bar to entry to test low.

  1. download our latest riscv64 build RISCV64 - Unsupported Builds | Haiku Files
  2. download u-boot for qemu or the unmatched firmware/u-boot/riscv64 at master · haiku/firmware · GitHub
  3. run in qemu
qemu-system-riscv64 -M virt -m 4G -kernel u-boot.bin -drive file=haiku-mmc.image,format=raw,id=hd0 -device virtio-blk-pci,drive=hd0 -device ati-vga -device qemu-xhci,id=usb -device usb-kbd -device usb-tablet
1 Like

I know this reply is late, but the Haiku port has kinda stalled. Our kernel loads, however after upgrading to GCC 11 we’re seeing a crash at bootup in userspace.

Scratch that. We got it working again. icu 57 compiled with gcc 8.x works, icu 66+ compiled with gcc 11.x doesn’t work and crashes :expressionless: Thanks to @X512 for figuring this one out.

The steps above with a nightly image of Haiku hrev56124 or later boot in qemu + on the unmatched to a desktop :tada:

We have a lot of bootstrapping to do, but things are functional which is nice :slight_smile:

2 Likes

Had been considering updating to new Ubuntu or trying OpenSUSE or Fedora, but hey, why not try something completely different.

Would someone be kind enough to give me (or point me to) a “for dummies” roadmap for nuking and paving my SD card and NVME and installing Haiku on the SSD? Previous instructions I see only mention USB, but I’m hoping I can put it on the big SSD I have been using in the Unmatched.

SD Card Prep - unmatched-uboot.sh\kallisti5\3rdparty - haiku - Haiku's main repository

USB from Image: Booting our RISC-V images | Haiku Project

I’m also a bit confused about image with the GCC11 talk and the note on the link above about limitations of hrev55697. The last post here in May seems to indicate that whatever GCC11 roadblock limiting to that version has been solved, so is RISCV64 - Unsupported Builds | Haiku Files 56681 good to go for working order on the Unmatched?

Thanks for any clarity or direction anyone can provide.

See here:

The GCC11 ICU stuff was solved. It seems like some bug within ICU 70 on riscv64. We downgraded to ICU6x which solved the issue for now.

I just got qemu working with one patch we’re working on finalizing. The post above links to a quick document on how to build and start the full desktop on qemu-system-riscv64

A quick screenshot showing haiku parsing the FDT and it showing up in device manager (pretty neat! Cool to see the PCI bus being presented by FDT)

1 Like