Skip to main content
JSchn.1
Associate II
Feb 3, 2020 2:23 PM UTC
Question

Preempt RT Patch for OpenSTLinux

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

This topic has been closed for replies.

9 replies

Fee
Associate II
Feb 5, 2020 8:43 AM UTC

I did patch the 4.19.9 Kernel that the OpenStLinux uses with the PREEMT RT Patch 4.19.10-rt7 (see here: https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/4.19/older/) 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: https://www.kernel.org/doc/html/v4.10/process/applying-patches.html).

OBaselga
Associate II
Jun 23, 2021 9:47 AM UTC

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?

Fee
Associate II
Jun 23, 2021 10:11 AM UTC

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.

JSchn.1
JSchn.1Author
Associate II
Feb 7, 2020 3:10 PM UTC

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.

Fee
Associate II
Feb 10, 2020 6:17 AM UTC

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

JSchn.1
JSchn.1Author
Associate II
Feb 12, 2020 2:40 PM UTC

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?

Fee
Associate II
Feb 13, 2020 6:31 AM UTC

Hi,

I took the provided Kernel by STM (the one you find in the wiki: https://wiki.st.com/stm32mpu/wiki/STM32MP1_Developer_Package_-_Linux_kernel). 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:https://wiki.st.com/stm32mpu/nsfr_img_auth.php/b/b9/Linux.README.HOW_TO.txt). 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!

mishuk
Associate III
Apr 29, 2021 1:02 PM UTC

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 ?

OBaselga
Associate II
Jun 23, 2021 9:41 AM UTC

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