My progress on real RISC-V hardware

I’ve shared some info on your awesome progress on Reddit, and someone there is asking if there’s an SD card image that be used to play with.

6 Likes

I boot from USB disk, SD card is left untouched. I may upload test live USB image later. Note that it have known problems and not yet ready for general use.

SD card has 3 problems:

  1. It is not yet supported by Haiku.
  2. It should include 2 additional partitions with low-level firmware code.
  3. It is slow, at least on Linux.
4 Likes

An image which can be dd-d to a drive should be sufficient, and of course the expectations would be set that this is pre-pre alpha.

Also… @X512… I’ve been on the edge of my seat these past few months reading and waiting for your updates. This is awesome work, and I wish I was at your level.

5 Likes

Also people who want to test should aware that video card is mandatory, there are no text mode. Currently only Radeon graphics are included and tested.

3 Likes

I also posted on SiFive Forum.

brucehoult seems also registered on SiFive forum.

7 Likes

Fantastic progress Ilya. You are a true star in the Haiku community :slight_smile:

8 Likes

Great progress @X512 !!!

2 Likes

time to build a riscv system

1 Like

My ears are burning, so I guess I had to register.

Great work and I’ve love to try it on my Unmatched if you make an SD card image available.

One comment: I see you’re calculating some table offsets based on multiplying the HART ID by a constant. That will work for the FU740 where the HART IDs are 0-4, but it’s not portable. RISC-V does not require that HART IDs are consecutive or even necessarily small. All that is required is that one of the HARTs has ID 0.

There’s a maybe useful blog post about some of this boot stuff here: All Aboard, Part 6: Booting a RISC-V Linux Kernel

Obviously you’ve got past all that already, but maybe not in a generic way for other SoCs. Might be worth checking.

16 Likes

I think some credits are due also to all the developers that laid the groundwork for this, the base was there and with the great work @X512 did he pulled Haiku again a step higher on the ladder! :clap:
Let’s not forget the work done by @kallisti5 also :clap:

13 Likes

Shout out to Haiku Inc, too for funding the boards!

5 Likes

Congratulations on your progress!

2 Likes

clap clap, Very nice !
I think to switch back after 15 years w/o Be :stuck_out_tongue:

2 Likes

Generic reminder to X512 to get these patches updated in gerrit. We have quite the backlog of riscv64 pull requests :slight_smile:

10 Likes

I hope I can do this next week. PCI code is a bit messy and it change some cross platform part, but still work on x86.

18 Likes

Great reply, achievement unlocked for the first time on forum :slight_smile:

17 Likes

FreeBSD has HiFive Unmatched Ethernet controller driver: freebsd-src/if_cgem.c at 373ffc62c158e52cde86a5b934ab4a51307f9f2e · freebsd/freebsd-src · GitHub.

14 Likes

I tried to use packagefs Haiku version and run some applications.

Python currently fails:

> python
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site

> PYTHONHOME=/boot/system/lib/python2.7 python
ImportError: No module named site

Bison binary is from Linux for some reason and don’t run on Haiku:

~/Tests/jam> bison
runtime_loader: /boot/system/bin/bison: Unhandled pheader type in count 0x6474e553
runtime_loader: /boot/system/bin/bison: Unhandled pheader type in parse 0x6474e553
~/Tests/jam> readelf -d /bin/bison

Dynamic section at offset 0x57e10 contains 25 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000c (INIT)               0x403000
 0x000000000000000d (FINI)               0x43fff4
 0x0000000000000019 (INIT_ARRAY)         0x458e00
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x458e08
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x0000000000000004 (HASH)               0x4003c0
 0x000000006ffffef5 (GNU_HASH)           0x400730
 0x0000000000000005 (STRTAB)             0x401328
 0x0000000000000006 (SYMTAB)             0x4007e8
 0x000000000000000a (STRSZ)              1348 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000015 (DEBUG)              0x0
 0x0000000000000003 (PLTGOT)             0x459000
 0x0000000000000002 (PLTRELSZ)           2352 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x401ab0
 0x0000000000000007 (RELA)               0x4019c0
 0x0000000000000008 (RELASZ)             240 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x401960
 0x000000006fffffff (VERNEEDNUM)         1
 0x000000006ffffff0 (VERSYM)             0x40186c
 0x0000000000000000 (NULL)               0x0
10 Likes

After setting PYTHONHOME, Python is running, but it can’t run haikuporter:

~/haikuporter> PYTHONHOME=/boot/system python haikuporter
Traceback (most recent call last):
  File "haikuporter", line 13, in <module>
    from HaikuPorter.Main import Main
  File "/boot/home/haikuporter/HaikuPorter/Main.py", line 15, in <module>
    from .BuildPlatform import buildPlatform
  File "/boot/home/haikuporter/HaikuPorter/BuildPlatform.py", line 9, in <module>
    from .DependencyResolver import DependencyResolver
  File "/boot/home/haikuporter/HaikuPorter/DependencyResolver.py", line 14, in <module>
    from .ProvidesManager import ProvidesManager
  File "/boot/home/haikuporter/HaikuPorter/ProvidesManager.py", line 9, in <module>
    from . import BuildPlatform
ImportError: cannot import name BuildPlatform
6 Likes

Older haikuporter version is running.

screenshot92

19 Likes