-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
After the long discussions in #3873 and #3875, I investigated the real time options a bit more in depth and created a summary.
LinuxCNC has quite a number of available real time cores. Some of them are broken, others work fine. What I found so far:
All userspace variants are configured by --with-realtime=uspace and built if the needed library is installed. During runtime, a variant is detected using the kernel name, version and other hints and selected automatically or also not if your kernel name doesn't match expectations.
Format: {Text shown at start of LinuxCNC}:{My short description}
- User Space:
--with-realtime=uspace- POSIX non-realtime: Any old kernel or you forgot
make setuid- Works, but big latency
- Basically what starts when you don't have any other realtime or it is not properly detected
- POSIX realtime: PREEMPT_RT
- Works
- Probably the most used option
- Debian stock RT kernel works fine
- XENOMAI (posix-skin) realtime: Xenomai2: Might be / Xenomai3: Works / Xenomai4: Not compatible
- Works: I managed to get it running with Xenomai3
- Probably seldom used due to no up to date compiled kernel package is available
- LXRT realtime: RTAI Userspace
- Seams to be broken after 2.8.4. I had no success, 2.8.4 is buster where I don't have a VM. In Bookwork/Trixie I was not able to compile 2.8.4. 2.9.* and master builds but has an error starting.
- POSIX non-realtime: Any old kernel or you forgot
- Kernel Space:
--with-realtime=/usr/realtime-$VERSION- Nothing: RTAI Kernelspace
- Works in 2.9
- Broken in Master: Ruckig broke RTAI #3875
- @NTULINUX maintains a kernel which is available in the LinuxCNC Debian repo: https://github.com/NTULINUX/RTAI
- Nothing: RTAI Kernelspace
RTAI is not maintained any more, last commit ~4 years ago.
To help others wanting to try Xenomai3, I created a repo with all you need to get it running:
https://github.com/hdiethelm/xenomai3-linuxcnc
Xenomai4 has a new API: EVL. I did not found a posix skin. I managed to get the kernel and tools built for anybody interested in creating a Xenomai4 module for LinuxCNC:
https://github.com/hdiethelm/xenomai4-linuxcnc
If there is interest, I could try to create a Xenomai4 userspace module. Looking at the code and what I have read so far, this should be not to complicated.
BTW: Is it fine starting this discussion here or should I move it to the forum?