My Haiku RISC-V port progress

Probably arch related. Noto has any arch.

Seems to be related to uname returning unknown?

9 Likes

After fixing uname, and adding vesa driver to haiku.hpkg (it was included only for x86) haiku-minimum.image with package_fs enabled is working:

screenshot69

25 Likes

When compiling on RISC-V Haiku, headers/posix/limits.h is not included for some reason. It is supposed to be included by #include_next in GCC limits.h.

screenshot70

7 Likes

don’t know but ut feals that this port finds/fixes alot of stuff other ports will hit? Nice work. Feels good when one working on this and another one are working in the Intel driver :smiley: . I need to boost my own development :wink:

5 Likes

Seems that our ARM port is getting some attention, with @pengphei working on it. See this thread for progress updates:

3 Likes

Network is working, but only when running TinyEMU on Linux. On Haiku it also should work in theory, but some strange errors occurs (bad packet checksum, malformed reply packets etc.). Currently there are no web browser compiled for riscv64 to test. Maybe it is possible to compile Netsurf without Haikuporter.

Screenshot_20210604_152943

18 Likes

Yes should be possible, I did this on amd64 couple of times.
doc: https://source.netsurf-browser.org/netsurf.git/plain/docs/building-Haiku.md

edit: it looks like upstream webkit also supports riscv64, so that can be investigated in the future ( 222959 – [CMake] Build fails on RISC-V with GCC 11 )

1 Like

maybe one of the commandline web browsers (link, etc.)?

Networking is working on Haiku host, but only 64 bit. TinyEMU embedded Slirp library is probably broken on 32 bits. Not working ping is fine because it is not supported by Slirp library, ping is used to check DNS resolver.

screenshot18

25 Likes

I fixed network for 32 bit TinyEMU. It was caused by hardcoded pointer size in slirp_config.h. File contents looks like it was generated by configure and then copied. Also I fixed bug in virtio_mmio driver, virtio completed packet counter is 16 bit, but driver used 32 bit counter to track what packets are already processed. That counter is intermened for each completed packet and expected to wrap on overflow.

I used Ubuntu disk image for download stability test. It worked fine but run out of disk space because 2GB is currently allocated for virtual machine disk.

screenshot72

23 Likes

Why is there 100% CPU use when downloading?

Because software CPU emulation is slow. No JIT is used.

Per-thread CPU usage when downloading:
screenshot73

6 Likes

Bad a$$ X512!

Makes sense. Awesome progress, of course. I guess the next thing to investigate is why some of the files have Jan 1, 1970 as the date. Maybe you already know? Maybe it is just the system clock starts there?

It is because TinyEMU have no calendar clock, only monotonic timer is available. But it can be easily added for example as additional HTIF function. TinyEMU is already customized for this port so probably there are no problem to customize it more.

Also note that Deskbar clock time is also wrong.

1 Like

Fixed. But already created files still has wrong date. Network time synchronization work.

screenshot74

18 Likes

You may want to review MTR (traceroute tool, in HaikuPorts)… :wink:

Still not working for riscv64.

Do you have an image we can download and a patch for Tinyemu to use under linux?