cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] How to make Yocto to patch the kernel with Preempt-RT? for STM32MP1

A.M.
Associate III

Hi!

STM32MP1 provides a real-time core, and we use it for the hard-real time. But additionally, we would need the application running on the two fast cores to also be real-time. (with softer constraints but still better than standard scheduling on Linux).

For this, I added to the yocto project, at (not the best place, but just trying to make it to work for now):

Layers/meta-st/meta-st-openstlinux/conf/distro/openstlinux-weston.conf

PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"
COMPATIBLE_MACHINE = "(stm32mp1)"

But then, I get the following errors:

ERROR: Nothing PROVIDES 'quilt-native'

quilt-native was skipped: incompatible with machine stm32mp1 (not in COMPATIBLE_MACHINE)

ERROR: Required build target 'st-image-weston' has no buildable providers.

Missing or unbuildable dependency chain was: ['st-image-weston', 'quilt-native']

12 REPLIES 12
Bernard PUEL
ST Employee

You can check https://wiki.st.com/stm32mpu/wiki/X-LINUX-RT_OpenSTLinux_Expansion_Package.

Depending on your application the results can change but with minimal application you can be under 50us Max latency.

A.M.
Associate III

CyclicTest must be run for at least few hours under stress to get significant max value. The -l=1000 seems too short to either get into the worse situations or to really stress the system. I went for 200000 and play with video/3D in the while.

I am happy to see the RT patch public :)

Thank you

Bernard PUEL
ST Employee

Yes you are right. Generally better to run for 10h test if you have high constraints on real time on your system. But moving linux to linux RT is just the first step if you have high realtime constraints. As you can see on the results (cyclictest), although the average latency is highly improved with linux rt, max latency reduction needs additionnal work. This work is some tuning depending on your system realtime constraints and your system features.

for exemple:

  • systemd is bringing some high latency during boot and after (you could switch to sysvinit)
  • dhcp same. Moving to static IP @ (when possible) will help ...