Skip to content

Latest commit

 

History

History
85 lines (57 loc) · 1.61 KB

File metadata and controls

85 lines (57 loc) · 1.61 KB

Linux ARM64 Runtime Guide

Linux ARM64 support has two separate native pieces:

  1. the FMI4j JNI importer runtime;
  2. the FMU model binary itself.

Both must match the running JVM architecture.

FMI4j Runtime Folder

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

FMU Binary Folders

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.

Native Build

If building on a Linux ARM64 machine:

scripts/build-linux-aarch64.sh

Expected 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.so

The 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