Linux ARM64 support has two separate native pieces:
- the FMI4j JNI importer runtime;
- the FMU model binary itself.
Both must match the running JVM architecture.
This fork reserves the following runtime resource folder for Linux ARM64:
native/fmi/linux-aarch64/libfmi4j-import.so
The runtime loader maps:
os.name = Linux
os.arch = aarch64 or arm64
to:
linux-aarch64
For FMU model binaries, the loader now tries multiple folder names on Linux ARM64:
binaries/aarch64-linux-gnu/<modelIdentifier>.so
binaries/linux-aarch64/<modelIdentifier>.so
binaries/linux64/<modelIdentifier>.so
The first existing file wins. This preserves compatibility with older FMUs while allowing FMI platform tuple naming for ARM64 FMUs generated by tools such as OpenModelica.
If building on a Linux ARM64 machine:
scripts/build-linux-aarch64.shExpected output:
build/native/linux-aarch64/libfmi4j-import.so
Package it into the runtime resources:
mkdir -p fmi-import/src/main/resources/native/fmi/linux-aarch64
cp build/native/linux-aarch64/libfmi4j-import.so \
fmi-import/src/main/resources/native/fmi/linux-aarch64/Verify the binary architecture:
file build/native/linux-aarch64/libfmi4j-import.soThe verified Linux ARM64 runtime included in this fork reports:
ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked
Then build the JVM artifact:
./gradlew clean :fmi-import:jar -PskipBuildNative=true