Showing results for 
Search instead for 
Did you mean: 

Preempt RT Patch for OpenSTLinux

Associate III

Has the RT_preempt Patch been tested with OpenSTLinux on a STM32MP1 device? Are there any instructions on how to apply it?


I did patch the 4.19.9 Kernel that the OpenStLinux uses with the PREEMT RT Patch 4.19.10-rt7 (see here: and had no problems using it so far (but I also did not test it fully yet).

How to patch a kernel can be answered by google 😉 (example:

Associate III

Did you test the Ethernet Port with the RT Patch yet. Did not get that working using the patch-4.19.50. Might recheck with the one you suggested.


With the Patch i suggested i had no problems with the Etherne Port

Associate III

Using the patch you suggested failed compiling for me (I also got the already applied patch message).

linux-4.19.49/kernel/irq/manage.c:399:33: error: ‘struct irq_affinity_notify’ has no member named ‘work’; did you mean ‘swork’?

Could you kindly outline your steps to compile the kernel?



I took the provided Kernel by STM (the one you find in the wiki: I patched it with the STM patches and after that with the RT patch. I was following the README.HOW_TO that comes with the STM Kernel (you can also find it here: Step 3 is the patching process. Following the other steps to build the kernel was successful for me.

I am using the STM SDK Release 1.1.0 and Ubuntu 18.04.

Hope it helps you & good luck!

Associate III

I am also interested in RT patch running on STM32MP1 device. So, I duplicate question : has the RT_preempt Patch been tested with OpenSTLinux on a STM32MP1 device? I mean current available OpenSTLinux kernel 5.4.31. Can ST support answer this question ?

Hi @mishuk​,

I asked this question and a ST employee answered the following: "Actually we have sanity checked OpenSTLinux with kernel5.10 and PREEMPT_RT kernel config. But NOT with the full Linux RT patches on top." and then "I remind you that STM32MP15 has been design with a M4 coprocessor precisely to host real-time process and avoid need of Linux-RT in most case."

Hope it helps

Hi @Lukas Brückner​,

I'm following your suggestions but, instead of using the developer package, I'm accessing with "screen" command on Linux. When applying the patch, this error appears:

root@stm32mp1:# patch -p1 < patch-4.19.94-rt38.patch 
patching file arch/Kconfig
patch: can't open 'arch/Kconfig': No such file or directory

Do you know how to solve it?

Hi @Óscar Baselga​ ,

you cannot patch a running kernel. You have to apply the patches to the source code of the kernel and rebuild it then on your own.

For building the kernel you find information in the developer package in the file README.HOW_TO.txt which you can find here too.