Progress on running Haiku on VisionFive 2

USB Audio sound is working.

Node tree:

Node("Devices Root"): no driver
  Node("Device Manager"): system/device_manager/driver/v1
  Node("Root subnode"): bus_managers/fdt/driver/v1
    Node("Root"): no driver
      Node("osc"): drivers/clock/fixed_clock/driver/v1
      Node("gmac1_rmii_refin"): drivers/clock/fixed_clock/driver/v1
      Node("gmac1_rgmii_rxin"): drivers/clock/fixed_clock/driver/v1
      Node("i2stx_bclk_ext"): drivers/clock/fixed_clock/driver/v1
      Node("i2stx_lrck_ext"): drivers/clock/fixed_clock/driver/v1
      Node("i2srx_bclk_ext"): drivers/clock/fixed_clock/driver/v1
      Node("i2srx_lrck_ext"): drivers/clock/fixed_clock/driver/v1
      Node("tdm_ext"): drivers/clock/fixed_clock/driver/v1
      Node("mclk_ext"): drivers/clock/fixed_clock/driver/v1
      Node("jtag_tck_inner"): drivers/clock/fixed_clock/driver/v1
      Node("bist_apb"): drivers/clock/fixed_clock/driver/v1
      Node("stg_apb"): drivers/clock/fixed_clock/driver/v1
      Node("gmac0_rmii_refin"): drivers/clock/fixed_clock/driver/v1
      Node("gmac0_rgmii_rxin"): drivers/clock/fixed_clock/driver/v1
      Node("clk_rtc"): drivers/clock/fixed_clock/driver/v1
      Node("hdmitx0_pixelclk"): drivers/clock/fixed_clock/driver/v1
      Node("mipitx_dphy_rxesc"): drivers/clock/fixed_clock/driver/v1
      Node("mipitx_dphy_txbytehs"): drivers/clock/fixed_clock/driver/v1
      Node("cpus"): no driver
        Node("cpu@0"): no driver
          Node("interrupt-controller"): no driver
        Node("cpu@1"): no driver
          Node("interrupt-controller"): no driver
        Node("cpu@2"): no driver
          Node("interrupt-controller"): no driver
        Node("cpu@3"): no driver
          Node("interrupt-controller"): no driver
        Node("cpu@4"): no driver
          Node("interrupt-controller"): no driver
      Node("soc"): no driver
        Node("pmu"): no driver
        Node("cache-controller@2010000"): drivers/misc/fu740_cache/driver/v1
        Node("aon_syscon@17010000"): drivers/misc/syscon/driver/v1
        Node("stg_syscon@10240000"): drivers/misc/syscon/driver/v1
        Node("sys_syscon@13030000"): drivers/misc/syscon/driver/v1
        Node("clint@2000000"): no driver
        Node("plic@c000000"): drivers/interrupt_controllers/plic/driver/v1
        Node("clock-controller"): drivers/clock/jh7110_clock/driver/v1
        Node("clock-controller@295C0000"): no driver
        Node("clock-controller@19810000"): no driver
        Node("spi@13010000"): no driver
          Node("nor-flash@0"): no driver
        Node("otp@17050000"): no driver
        Node("usbdrd"): no driver
          Node("usb@10100000"): no driver
        Node("timer@13050000"): no driver
        Node("wdog@13070000"): no driver
        Node("rtc@17040000"): no driver
        Node("pmu@17030000"): no driver
        Node("serial@10000000"): no driver
        Node("serial@10010000"): no driver
        Node("serial@10020000"): no driver
        Node("serial@12000000"): no driver
        Node("serial@12010000"): no driver
        Node("serial@12020000"): no driver
        Node("dma-controller@16050000"): no driver
        Node("gpio@13040000"): no driver
          Node("uart0-0"): no driver
            Node("tx-pins"): no driver
            Node("rx-pins"): no driver
          Node("mmc0-pins"): no driver
            Node("mmc0-pins-rest"): no driver
          Node("sdcard1-pins"): no driver
            Node("sdcard1-pins0"): no driver
            Node("sdcard1-pins1"): no driver
            Node("sdcard1-pins2"): no driver
            Node("sdcard1-pins3"): no driver
            Node("sdcard1-pins4"): no driver
            Node("sdcard1-pins5"): no driver
          Node("pcie0_perst_default"): no driver
            Node("perst-pins"): no driver
          Node("pcie0_perst_active"): no driver
            Node("perst-pins"): no driver
          Node("pcie0_wake_default"): no driver
            Node("wake-pins"): no driver
          Node("pcie0_clkreq_default"): no driver
            Node("clkreq-pins"): no driver
          Node("pcie1_perst_default"): no driver
            Node("perst-pins"): no driver
          Node("pcie1_perst_active"): no driver
            Node("perst-pins"): no driver
          Node("pcie1_wake_default"): no driver
            Node("wake-pins"): no driver
          Node("pcie1_clkreq_default"): no driver
            Node("clkreq-pins"): no driver
          Node("i2c2-0"): no driver
            Node("i2c-pins"): no driver
          Node("i2c5-0"): no driver
            Node("i2c-pins"): no driver
          Node("hdmi-0"): no driver
            Node("cec-pins"): no driver
            Node("hpd-pins"): no driver
        Node("gpio@17020000"): no driver
        Node("trng@1600C000"): no driver
        Node("sec_dma@16008000"): no driver
        Node("crypto@16000000"): no driver
        Node("i2c@12060000"): no driver
        Node("i2c@10030000"): no driver
        Node("i2c@10040000"): no driver
        Node("i2c@10050000"): no driver
          Node("rm68200_panel@45"): no driver
        Node("i2c5@12050000"): no driver
          Node("eeprom@50"): no driver
          Node("axp15060_reg@36"): no driver
        Node("sdio0@16010000"): busses/mmc/designware_mmc/driver/v1
          Node("MMC Bus Manager"): bus_managers/mmc/driver/v1
        Node("sdio1@16020000"): busses/mmc/designware_mmc/driver/v1
          Node("MMC Bus Manager"): bus_managers/mmc/driver/v1
            Node("MMC Device"): drivers/disk/mmc_disk/driver/v1
        Node("vin_sysctl@19800000"): no driver
        Node("jpu@11900000"): no driver
        Node("vpu_dec@130A0000"): no driver
        Node("vpu_enc@130B0000"): no driver
        Node("reset-controller"): drivers/reset/jh7110_reset/driver/v1
        Node("stmmac-axi-config"): no driver
        Node("ethernet@16030000"): drivers/network/dwmac/driver/v1
          Node("ethernet-phy@0"): no driver
          Node("MII Device"): no driver
        Node("ethernet@16040000"): drivers/network/dwmac/driver/v1
          Node("ethernet-phy@1"): no driver
          Node("MII Device"): no driver
        Node("gpu@18000000"): no driver
        Node("can@130d0000"): no driver
        Node("can@130e0000"): no driver
        Node("tdm@10090000"): no driver
        Node("spdif0@100a0000"): no driver
        Node("pwmdac@100b0000"): no driver
        Node("i2stx@100c0000"): no driver
        Node("pdm@100d0000"): no driver
        Node("i2srx_3ch@100e0000"): no driver
        Node("i2stx_4ch0@120b0000"): no driver
        Node("i2stx_4ch1@120c0000"): no driver
        Node("pwm@120d0000"): no driver
        Node("spdif_transmitter"): no driver
        Node("spdif_receiver"): no driver
        Node("pwmdac-transmitter"): no driver
        Node("dmic_codec"): no driver
        Node("spi@10060000"): no driver
        Node("pcie@2B000000"): busses/pci/plda/driver/v1
          Node("PCI Bus Manager"): bus_managers/pci/driver/v1
            Node("PCI Device"): no driver
            Node("PCI Device"): busses/usb/xhci/driver/v1
              Node("USB Bus Manager"): bus_managers/usb/driver/v1
                Node("USB device"): bus_managers/usb/hub/driver/v1
                  Node("USB device"): bus_managers/usb/hub/driver/v1
                    Node("USB device"): busses/hid/usb_hid/driver/v1
                      Node("HID Device"): drivers/input/hid_input/driver/v1
                    Node("USB device"): busses/hid/usb_hid/driver/v1
                      Node("HID Device"): drivers/input/hid_input/driver/v1
                    Node("USB device"): drivers/audio/usb_audio/driver/v1
                Node("USB device"): bus_managers/usb/hub/driver/v1
        Node("pcie@2C000000"): busses/pci/plda/driver/v1
          Node("PCI Bus Manager"): bus_managers/pci/driver/v1
            Node("PCI Device"): no driver
            Node("PCI Device"): drivers/disk/nvme_disk/driver/v1
        Node("mailbox@0"): no driver
        Node("mailbox_client@0"): no driver
        Node("dssctrl@295B0000"): drivers/misc/syscon/driver/v1
        Node("dc8200@29400000"): no driver
          Node("port"): no driver
            Node("endpoint@0"): no driver
            Node("endpoint@1"): no driver
        Node("hdmi@29590000"): no driver
          Node("ports"): no driver
            Node("port"): no driver
              Node("endpoint@0"): no driver
        Node("mipi@295d0000"): no driver
          Node("ports"): no driver
            Node("port"): no driver
              Node("endpoint@0"): no driver
          Node("display-timings"): no driver
            Node("timing0"): no driver
        Node("dsi-host"): no driver
        Node("hdmi-output"): no driver
        Node("mipi-dphy@295e0000"): no driver
        Node("snd-card"): no driver
          Node("simple-audio-card,dai-link@0"): no driver
            Node("cpu"): no driver
            Node("codec"): no driver
        Node("e24@0"): no driver
          Node("dsp@0"): no driver
        Node("dmc@100b0000"): no driver
      Node("aliases"): no driver
      Node("chosen"): no driver
      Node("memory@80000000"): no driver
      Node("reserved-memory"): no driver
        Node("opensbi"): no driver
      Node("gpio-restart"): no driver
      Node("firmware"): no driver
      Node("config"): no driver
      Node("__symbols__"): no driver
  Node("Root subnode"): drivers/null/driver/v1
  Node("Root subnode"): drivers/random/driver/v1
  Node("Root subnode"): drivers/zero/driver/v1
35 Likes

Will this also fix USB audio on other hardware?

EDIT: Nevermind, just saw this thread from waddlesplash.

3 Likes

Has anyone managed to use the GPIOs on the VisionFive 2 ? I don’t own one yet but I have a small fantasy of patching / rewriting Pulse so I can have a case with four CPU bars like this, as a nod to the ancient BeBox Dual 133 :slight_smile:

3 Likes

I must admit that in these weeks I’m trying to modify a BeBox-shaped Raspberry case to fit the dimensions of the VisionFive2 because I liked the idea of having the push buttons.

Maybe we should open a dedicated thread in the forum to talk about the case for VisionFive 2 without cluttering up the software development that is bringing X512

2 Likes

Thank you for this, my VF2 finally arrived and this made some of the initial steps trivial. Would only add that you don’t have to wget the files, you can copy with ssh like this:

ssh root@visionfive2 "cat > u-boot-spl.bin.normal.out" < u-boot-spl.bin.normal.out 
ssh root@visionfive2 "cat > visionfive2_fw_payload.img" < visionfive2_fw_payload.img 

I also copied tha sha256sum file and checked the copies before continuing.

Right now I’m ready to boot Haiku on it in principle but I guess the situation is still that there are no automated builds and nobody has shared a recent image so next I’d have to build my own?

2 Likes

Yep, building your own is the way to go for now.

2 Likes

Eventually got an image built with Clee’s instructions and Haiku booting on the VisionFive 2. Had a hard time finding a mouse that worked but after going through a few I found an old Logitech G700 that did the trick. Very cool to see Haiku running on this little system!

Phone camera shot of screen with neofetch and “About this system” to celebrate:

20 Likes

I don’t wanna sound like a killjoy, but one GiB of ram used with just 18 pkgs installed…?, what’s going on with haiku on RISCV?

I mean, its still in the works.

It’s probably a debug build. Release builds run lighter.

1 Like

No, i think something else is going on, because the x86 nightlies are also debug builds with more pkgs installed and yet they don’t even use half a gig of ram.

The code density of a CISC processor is usually much higher than that of a RISC processor also. When Amiga switched from the 68000 series to PowerPC, the memory usage of the programs from the same C source became 30% bigger and needed 30% bigger caches to get proportional performance per clock.

4 Likes

RISC-V has compressed instructions, so code density should be about as good as for x86.

2 Likes

Honestly the RISC-CISC distinction these days is so blurry, that it doesn’t really matter much at all. Even x86 processors have been RISC at their core for years, implementing a CISC ISA on top.

The hybridization has helped the x86-64 a lot!

Code density should be not a problem for RISC-V vs x86.

Check system caches/memory/processes - unless hidden… usually you’ll see what is stealing or “reserving” those valuable memory resources…

On some highmem systems (i.e. >4GB RAM), I get about 1GB RAM memory reserved with Haiku x64. Reasons may vary.

Yay! Getting closer.

I’ve just been trying the latest @nightly-mmc build of X512’s device_manager2 branch (is this the “best” branch now?) and here’s how it turned out:

  • Haiku KDL’s as soon as I remove a USB device. I can provide the crash log if you want it X512 but it seems you’re aware of this?

  • My USB keyboard often stops working after about 10 or 15 minutes.

  • If I plug in an ethernet cable, Haiku registers that port as being “Connected” but I dont get a DHCP IP address as I do under x86 Haiku.

  • I have got a TP-Link TL-WN725N USB wifi adapter which uses the Realtek RTL8188EUS chipset. This works with Haiku x86 but doesn’t work with Haiku rv64, I presume because you haven’t included the realtek firmware files in the rv64 image? I’d highly recommend the WN725N btw. I’ve had these working with Haiku, FreeBSD, NetBSD, Linux… its pretty much the best supported USB wifi adapter out there.

  • I have noticed that both gcc and web+ are missing from the nightly. I can’t remember now if gcc is normally included in Haiku nightlies? If its not, can we ignore the convention for this and include gcc and the Haiku dev essentials anyway seeing as we’ll have to build almost everything ourselves?

Have you been able to get web+ or any other browsers to build under rv64 yet X512? Ideally we’d be able to use GNOME web / epiphany but I expect that’s harder to build (more dependencies) than web+ right?

MII chip need some vendor-specific initialization sequence that is not yet implemented. Run dhcp command in U-Boot before booting Haiku to solve problem.

Currently only Netsurf browser is available. Other browsers need a lot of time to build.

2 Likes

Ah yes! Ethernet is working after running dhcp (then boot) in U-Boot.

I can’t see Netsurf as an available package under HaikuDepot or pkgman?

HaikuDepot says that the realtek_wifi_firmwares package is installed so that’s probably not why my USB wifi adapter isn’t working. Maybe that’s not working for the same reason that ethernet doesn’t “just work”?