Integrating Xenomai 4 on BeagleY-AI: Hard Real-Time Linux
May 28, 2025
Why Xenomai?
While Preempt-RT provides soft real-time capabilities, Xenomai 4 delivers hard real-time performance via its EVL (Evolvable Linux) core. This dual-kernel approach achieves:
- Sub-10μs latency for time-critical tasks
- Deterministic interrupt handling
- Coexistence of real-time and Linux applications
Prerequisites
- BeagleY-AI running Debian 12.11 2025-05-21 XFCE
- Host Machine: Ubuntu 22.04+ (64-bit) with ARM cross-compiler
Step 1: Obtain Kernel Sources
(Host Machine)
1.1 Clone Beagleboard’s Linux Kernel
1.2 Fetch Xenomai EVL Patches
Step 2: Merge EVL into TI Kernel
2.1 Create a Merge Branch
2.2 Resolve Merge Conflicts
Focus on:
arch/arm64
(TI-specific changes vs. Xenomai’s EVL modifications)drivers/
(e.g., SPI, PWM, or Ethernet drivers)kernel/sched
(scheduler conflicts between RT and EVL)
Step 3: Configure the Kernel
3.1 Start with BeagleY’s Default Config
3.2 Enable Xenomai EVL
Key Options:
()
[
[ )
Step 4: Build the Kernel
4.1 Compile Kernel & Modules
4.2 Package Artifacts
Step 5: Deploy EVL Kernel
5.1 Install on Target
(Target Device BeagleY-AI)
- Copy
arch/arm64/boot/Image
to/BOOT/
- Extract modules to
/lib/modules
- Update
/boot/firmware/extlinux/extlinux.conf
:
microSD (default)
/Image
=ttyS2,115200n8 root=/dev/mmcblk1p3 ro rootfstype=ext4 resume=/dev/mmcblk1p2 rootwait net.ifnames=0 quiet
console/
/ti/k3-am67a-beagley-ai.dtb
/overlays/k3-am67a-beagley-ai-csi0-tevs-rpi22.dtbo
/initrd.img
Validate the kernel version with uname -r
and will get:
Step 6: Build & Install Xenomai Libraries
(Native on BeagleY-AI)
6.1 Clone Source
&&
6.2 Build libevl
&&
6.3 Validate with EVL test
Expected Output:
$ sudo evl test
basic-xbuf: OK
clock-timer-periodic: OK
clone-fork-exec: OK
detach-self: OK
duplicate-element: OK
element-visibility: OK
fault: OK
fpu-preload: OK
fpu-stress: OK
heap-torture: OK
mapfd: OK
monitor-deadlock: OK
monitor-deboost-stress: OK
monitor-event: OK
monitor-event-targeted: OK
monitor-event-untrack: OK
monitor-flags: OK
monitor-flags-broadcast: OK
monitor-flags-inband: OK
monitor-pi: OK
monitor-pi-deadlock: OK
monitor-pi-deboost: OK
monitor-pi-stress: OK
monitor-pp-dynamic: OK
monitor-pp-lazy: OK
monitor-pp-lower: OK
monitor-pp-nested: OK
monitor-pp-pi: OK
monitor-pp-raise: OK
monitor-pp-tryenter: OK
monitor-pp-weak: OK
monitor-recursive: OK
monitor-steal: OK
monitor-trylock: OK
monitor-wait-multiple: OK
monitor-wait-requeue: OK
observable-hm: OK
observable-inband: OK
observable-onchange: OK
observable-oob: OK
observable-race: OK
observable-thread: OK
observable-unicast: OK
poll-close: OK
poll-flags: OK
poll-many: OK
poll-multiple: OK
poll-nested: OK
poll-observable-inband: OK
poll-observable-oob: OK
poll-sem: OK
poll-xbuf: OK
proxy-echo: OK
proxy-eventfd: OK
proxy-pipe: OK
proxy-poll: OK
ring-spray: OK
rwlock-read: OK
rwlock-write: OK
sched-quota-accuracy: 99.0%
sched-tp-accuracy: OK
sched-tp-overrun: OK
sem-close-unblock: OK
sem-flush: OK
sem-timedwait: OK
sem-wait: OK
simple-clone: OK
stax-lock: OK
stax-warn: OK
thread-mode-bits: OK
Conclusion
- Coming soon
Next Steps:
- Coming soon