problems with realtime kernel on Beaglebone AI

I’m trying to use a real time kernel on the Beaglebone AI to get MachineKit running. I’m able to run MachineKit on a non-rt kernel (4.14.108-ti-r113), but when I update to the latest ti-rt kernel (4.14.108-ti-rt-r134), I get an error:

user cannot gain I/O privileges - forgot ‘sudo make setuid’?

Any idea what’s going on? Is there a different kernel that is recommended?

I checked dmesg and saw this as well:

[ 811.654246] warning: process `rtapi:0’ used the deprecated sysctl system call with 8.1.2.

Let me know if we need to tweak the rt kernel config to support that…

I’m not sure, what does that involve? It’s probably worth a shot.

This seems to be the source of the problem: https://github.com/machinekit/machinekit-hal/blob/9fca994e08e3f8384498e78ea8e8baa1c899e4db/src/rtapi/rtapi_app.cc#L1457

The system call iopl seems to be returning an error:
http://man7.org/linux/man-pages/man2/iopl.2.html

Per Cern’s suggestion on the MachineKit forums, I simply removed the chunk of code that was throwing this error and all seems to be well.