Visionfive 2 risc-v

Hi Folks

Wanted to try something different as a challenge and as I have a visionfire 2 and a few other bits plan to see if RiscV is ready for the smart home

Dose anyone have experience with getting OH working on VF2 reading around seems can be done via diet pi

I don’t know board you mention, but I am pretty sure you can run Java on risc architecture. One of most problematic platforms I recall was MIPS/MIPSEL mainly due to constrained hardware. Yet it got better support with loongson arch which used MIPS as a base, leading to jvm port GitHub - loongson/jdk: LoongArch port based on the OpenJDK source code

Now back to the topic - if you have a board - look first for a working Linux distro. Once you have working operating system, look at JVM, possibly Main - Main - OpenJDK Wiki can help you getting a base for further patchwork. I haven’t found any binary ready for download, hence get ready to build it from sources.

For building from sources you can try setting up yocto project which will have a target architecture and cross compiler (meta-risc could be interesting starting point). This way you can utilize much more powerful desktop/server machine rather than 2-4 core SBC.

1 Like

They also seem to provide Debian images on which the diet pi image is probably based:

Debian has an openjdk-17-jdk package for riscv in their repos.

So it might just work after flashing an image and doing the usual apt installation. :slight_smile:

One thing you’ll probably run into with this new architecture is that some native libraries still need to be recompiled. E.g. the default serial library used by openHAB doesn’t yet support riscv.

As far I know this is the only one place where native libs are used in core, there is a way to swap it with another serial port provider which does not use native libraries: OH3.X & OH4.X Alternative Java serial provider. It works on various flavors of arm-ed linux, it should also fly with riscv.

IIRC Karaf also uses some native libraries to speed up processing when using the Console. It will probably still work but not as smooth.

It could also be that Netty (used for MQTT) depends on some native libs which may not be available for risc-v.

As far I can see, primary use of native libs in Karaf is jline, it is conditional and used for file descriptor allocation. Interestingly, default order is reflective and only then native file descriptor creator:

Native part in netty is also optional for kernel’s epoll integration. It will help saving some cpu cycles for sure.

@arden Let us know how your experiment goes. I will keep my fingers crossed for your success! :slight_smile:

I’ve created an issue for the serial library to also support RISC-V :slight_smile: :


Thanks for the replies so far
I’ve tested the beta steam of diet pi as OpenHab is listed as working

It installed but web interface said no service found

Downloading latest debian imagine for testing now

Will be slower going than normal as nursing a broken arm will report back is it works later

1 Like

After updating the bootloader

I’ve done a manual installation on Debian

cmd line launches but web saying “No service was found”

picture attached


That’s some nice progress. :slight_smile:

Does it show any warnings/errors in the log files or when you enter the log:tail command in the Karaf Console?

1 Like

from a fresh start today have the following in logs

            Unresolved requirement: Import-Package: com.sun.jna.ptr
              -> Export-Package: com.sun.jna.ptr; bundle-symbolic-name="com.sun.jna"; bundle-version="5.12.1"; version="5.12.1"
     Unresolved requirement: Import-Package: io.methvin.watcher.hashing; version="[0.18.0,1.0.0)"
       -> Export-Package: io.methvin.watcher.hashing; bundle-symbolic-name=""; bundle-version="0.18.0"; version="0.18.0"

Unresolved requirement: Import-Package: org.openhab.core.ui.icon
→ Export-Package: org.openhab.core.ui.icon; bundle-symbolic-name=“org.openhab.core.ui.icon”; bundle-version=“4.0.3”; version=“4.0.3”; uses:=“org.openhab.core.i18n”
org.openhab.core.ui.icon [215]
Unresolved requirement: Import-Package: org.openhab.core; version=“[4.0.0,5.0.0)”
→ Export-Package: org.openhab.core; bundle-symbolic-name=“org.openhab.core”; bundle-version=“4.0.3”; version=“4.0.3”; uses:=“org.osgi.framework”

    at org.eclipse.osgi.container.Module.start( ~[org.eclipse.osgi-3.18.0.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$ ~[org.eclipse.osgi-3.18.0.jar:?]
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute( ~[org.eclipse.osgi-3.18.0.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel( ~[org.eclipse.osgi-3.18.0.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel( ~[org.eclipse.osgi-3.18.0.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel( ~[org.eclipse.osgi-3.18.0.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent( ~[org.eclipse.osgi-3.18.0.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent( ~[org.eclipse.osgi-3.18.0.jar:?]
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent( ~[org.eclipse.osgi-3.18.0.jar:?]
    at org.eclipse.osgi.framework.eventmgr.EventManager$ ~[org.eclipse.osgi-3.18.0.jar:?]

11:07:49.712 [WARN ] [f.transport.servlet.ServletController] - Can’t find the request for's Observer
11:08:04.469 [WARN ] [org.jline ] - Failed to save history
java.nio.file.AccessDeniedException: /nonexistent
at sun.nio.fs.UnixException.translateToIOException( ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException( ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException( ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.createDirectory( ~[?:?]
at java.nio.file.Files.createDirectory( ~[?:?]
at java.nio.file.Files.createAndCheckIsDirectory( ~[?:?]
at java.nio.file.Files.createDirectories( ~[?:?]
at org.jline.reader.impl.history.DefaultHistory.internalWrite( ~[?:?]
at ~[?:?]
at org.jline.reader.impl.history.DefaultHistory.add( ~[?:?]
at org.jline.reader.impl.LineReaderImpl.finish( ~[?:?]
at org.jline.reader.impl.LineReaderImpl.finishBuffer( ~[?:?]
at org.jline.reader.impl.LineReaderImpl.readLine( ~[?:?]
at ~[?:?]
at ~[?:?]
at ~[?:?]
[Fatal Error] log4j2.xml:1:1: Premature end of file.
org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Error parsing /opt/openhab/userdata/etc/log4j2.xml

Please double check if permissions are properly applied to /etc/openhab and /usr/share/openhab folders. To me premature end of file is fairly strange, as it is very rare for logging configuration to be a problem. Same thing applies to jline error which fails to store command history in a file.

With regard to JNA failures - it looks like partial failure, same for framework. The JNA itself comes in two jars, I’d need to check where the missing package is.
Would you be able to upload complete openhab.log somewhere (, Errors you see are hard to read from forum post.

i did a manual install as per openHAB on Linux | openHAB

so files are in /opt

here are the current permissions

user@starfive:~$ ls -al /opt
total 12
drwxr-xr-x 3 root root 4096 Oct 2 19:06 .
drwxr-xr-x 21 root root 4096 Aug 23 04:40 …
drwxr-xr-x 6 openhab openhab 4096 Oct 2 19:06 openhab

will upload more logs shortly

Root permissions might be fine, but then you need to run whole thing as a root as well. The setenv script has several environmental variables which might actually assume /etc/openhab and other locations. Look there, because you might need to revert them to /opt.

tried v3.4 and it comes but really slow


1 Like

not sure how to move this forward now

Any suggestions

Try running geekbench to compare board performance with others. For reference - I saw no major troubles running OH 3.0.x with ARM using this URVE Pi - Geekbench or that Rockchip RK3288 / URVE A18-pro + radiator - Geekbench boars.

Edit - you might need to think about heatsink/fan. Some processors throttle a lot without cooling, which makes them very slow. I am not sure how your visionfire board looks a like, do you have cooler on it?

seems its the initial sign-in thats slow can take several minutes,

once logged in is quite responsive to install addons etc