Progress on running Haiku on VisionFive 2

I tried to get the official Debian engineering release build 202303 to run, but I had HDMI issues. I got the same error as others had reported, but for some reason I could not resolve it. I assumed I needed to update the firmware based on other comments.

I followed the steps on this page Arch Linux Image for VisionFive 2 - Linux Distros - RVspace Forum as danboid suggested.

Arch booted without any trouble on an SD card, 32GB. The image found here: VisionFive2 - Google Drive Its quite funny that Arch works as advertised, but the official release has so many problems.

Once logged into the system I followed the steps.

pacman -S mtd-utils
flashcp -A -v /home/user/VisionFive2/firmware/u-boot-spl.bin.normal.out /dev/mtd0
flashcp -A -v /home/user/VisionFive2/firmware/visionfive2_fw_payload.img /dev/mtd2

The directory listed above has changed in the latest Arch build image. Tab completion works so just hit the tab key after typing firmw, and the correct directory will populate.

I compiled Haiku from the official sources following the guide, and wrote the haiku-mmc.image to my SD card, but that doesn’t work. I will at this point assume that I am missing something.

Returning to the official documentation, I burned haiku-master-hrev57076 to my SD card in the hopes of getting anything. Finally, after checking the switches position, I tried all combinations. I got something other than an error on the console.

Returning to my freshly compiled image on SD card, I tried once more.

Very close now, I can feel it!

1 Like

As X512 has already explained, u-boot needs to be configured to boot Haiku from NVMe:

env default -a -f
setenv boot_targets "mmc0 nvme0 dhcp"
setenv bootcmd_nvme0 "devnum=0; run nvme_boot"
saveenv

Does your USB keyboard work under VF2 Haiku? I can live without lots of things not working but no working keyboard support is a showstopper.

This is known issue tracked at #18432. It seems unrelated to RISC-V and specific to VL805-Q6 USB 3 chip. Hopefully issue can be fixed soon. For now various screen keyboards like KeyMap or my ScreenKeyboard can be used as workaround.

You may want to create new BFS partition in DriveSetup and run Installer to use more NVMe disk space.

2 Likes

Yes, it seems that USB keyboard is working but not at the same time as USB mouse, the mouse seems to override the keyboard when attached. I don’t see why Haiku wouldn’t be usable when this is fixed, ethernet works and a few more apps get built, if you can live without sound. I tried attaching my USB soundcard and Haiku mistakes it as a HID device when it seems you have supposedly enabled USB audio support? Ethernet isn’t fully working yet is it? I think we also have the option of borrowing the VF ethernet driver from OpenBSD.

I’ve noticed that although my backspace key works correctly in the Haiku keymap program, backspace functions as space in the Haiku terminal. All the other keys seem to work fine in the teminal.

Does jam not give us an option to define the size of the Haiku partition? If not, we should be able to hack the Haiku build scripts to create a larger partition rather than creating a second one.

1 Like

When I say USB soundcard its actually just a USB headphone jack adapter, a

4c4a:4155 Jieli Technology UACDemoV1.0

According to lsusb. These are the most affordable and most widely compat. USB audio devices. They work OOTB with Android, Linux, Windows, FreeBSD and its the only USB audio device I’ve ever got to work with NetBSD. They cost about £1.

I’m happy to send one to X512 even tho the postage would be more than its worth :smiley:

2 Likes

USB audio seems a victim of #18432 bug. There are also built-in audio jack on the board, it may be possible to write Haiku drivers for it.

5 Likes

Of course it does.

You just set HAIKU_IMAGE_SIZE, a convenient and recommended place to do this is in the UserBuildConfig file as documented here: UserBuildConfig.ReadMe « jam « build - haiku - Haiku's main repository

1 Like

What about a VNC server is compiled to RISC-V?
this would solve the USB problem temporarily, i.e. SSH and VNC, you enter the system from another computer. I like it so much in the case of sbc tiles.

1 Like

Is there a VNC server for Haiku?

Ethernet doesn’t seem to be fully working yet anyway so no, its probably not an option yet and I wouldn’t want to use anyway if it was an option.

EDIT

I’ve just learned about the Haiku remote desktop, which apparently works kinda like X forwarding.

Again, I have no real interest in this nor using Haiku as any kind of headless server. It’s supposed to be a desktop OS so mouse and keyboard input are must haves IMO.

1 Like

VisionFive2 is specific. It’s an SBC board, I have my own, I want to use it not as a Destop, but as a network-managed IoT center. I know that the main vision is to produce a system for Desktop, but as I wrote above, SBC is not an ideal computer for everyday use.

BTW. VNC is unofficial on BearShere or BeSly repository, I don’t remember where

While technically possible, It do not fit intended Haiku use case – to be desktop operating system. USB support should be fixed, some bugs also seems affect Haiku USB support in general, including x86 hardware.

Some people upload demo videos for VisionFive 2 as desktop system with Debian Linux: https://www.reddit.com/r/RISCV/comments/13yhij5/video_proof_that_the_visionfive_2_is_usable_as_a/

2 Likes

Ensure you are using X512’s haiku-src RISCV patches versus vanilla haiku-src.
Then, ensure Haiku splash screen and accessing boot menu screen works.

Note: (use VF2 v3.0.4+ firmware):

  • audio driver - not yet
  • Wifi driver - not yet tested with Haiku compatible hardware
  • Ethernet driver - in progress :checkered_flag:
  • USB3.0 xHCI Driver - :white_check_mark:
  • Video FB driver (1080p, worked for X512) :white_check_mark:
1 Like

Attempting to follow danboid’s footsteps, I re-built and burned the image to my nvme drive.

I have tried just burning the image, as well as manually assigning a GTP table and writing the files to the partitions. I get the following error on the console:

ethernet@16030000 Waiting for PHY auto negotiation to complete
 TIMEOUT !
phy_startup() failed: -110FAILED: -110ethernet@16040000 Waiting for PHY auto negotiation to complete
 TIMEOUT !
phy_startup() failed: -110FAILED: -110ethernet@16030000 Waiting for PHY auto negotiation to complete
 TIMEOUT !
phy_startup() failed: -110FAILED: -110ethernet@16040000 Waiting for PHY auto negotiation to complete
 TIMEOUT !
phy_startup() failed: -110FAILED: -110StarFive #

Is this a drive incompatibility?

That’s an error from the ethernet port, I doubt it is related to the drive?

Sorry, I did not see the post about the u_boot env need to be set.
Testing now.

Edit: nevermind about the errors!

Check that:

  1. ROM firmware is updated.
  2. U-Boot is configured to boot from NVMe using UEFI.
  3. visionfive2 branch is used.
  4. @minimum-mmc build target is used. @minimum-raw image need additional preparations like manually making ESP partition and copying Haiku EFI boot loader.
  5. Haiku image is written to NVMe, not SD card. SD card is not supported yet by Haiku and you will get “no boot partitions!” KDL.
4 Likes

Success. Does this make me number 3?

27 Likes

yep, you’ve made the podium - now you have to do a “shoey” :face_vomiting:

4 Likes

Definitely! :wink:
This is my favourite one: https://youtu.be/tGV0lAgr4so

Sorry for being OT.

5 Likes

I’d love to try this out! Is there any way you could share your current image?

1 Like