Bitbake -k linux-toradex-rt fails

We just want a standard 2.8 image, but with realtime latency! (We still need all the usual goodies like the gadget driver and such so minimal modifications are desirable)

patching file sound/core/pcm_native.c
Hunk #1 succeeded at 136 (offset 1 line).
Hunk #2 succeeded at 151 (offset 1 line).
Hunk #3 succeeded at 159 (offset 1 line).
Hunk #4 succeeded at 177 (offset 1 line).
Patch patch-4.9.115-rt94.patch does not apply (enforce with -f)
ERROR: linux-toradex-rt-4.9-2.3.x+gitAUTOINC+d899927728-r0 do_patch: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /home/steve/oe-core/build/tmp-glibc/work/colibri_imx6-angstrom-linux-gnueabi/linux-toradex-rt/4.9-2.3.x+gitAUTOINC+d899927728-r0/temp/log.do_patch.18449
ERROR: Task (/home/steve/oe-core/build/…/layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex-rt_4.9-2.3.x.bb:do_patch) failed with exit code ‘1’

This is a duplicate of the following questions:

https://www.toradex.com/community/questions/36200/linux28-real-time-patch-linux-toradex-rt-4923x-doe.html

Please help yourself:

http://git.toradex.com/cgit/meta-toradex-nxp.git/commit/?h=rocko-next&id=850fb2c12f446023c3d186f6050c9a5fec998266

Hello @marcel.tx,

While I appreciate that the problem might be fixed with the branch you point at above, I think it shows a problem with the current linux-toradex-rt provider for mx6.

Namely, linux-toradex and linux-toradex-rt for iMX6 use the same branch on the Git repository (toradex_4.9-2.3.x-imx). As of today, the branch is based on upstream Linux 4.9.166, but the latest PREEMPT_RT patch is for 4.9.146. Also, the fact that linux-toradex-rt` doesn’t work with 2.8b6 shows that this was not tested.

I assume that the PREEMPT_RT patch is important for many users of Toradex modules. Hence, my question is how Toradex supports the use case of real-time kernels in general?

ps: Please note that I don’t have a problem with the specific issue presented here, which was fixed quickly.

Many thanks!

While I appreciate that the problem might be fixed with the branch you point at above, I think it shows a problem with the current linux-toradex-rt provider for mx6.

Namely, linux-toradex and linux-toradex-rt for iMX6 use the same branch on the Git repository (toradex_4.9-2.3.x-imx`). As of today, the branch is based on upstream Linux 4.9.166, but the latest PREEMPT_RT patch is for 4.9.146.

I fully agree, unfortunately, the original author of that linux-toradex-rt recipe had no understanding of what we are now talking about. To be honest, I see even more issues along those lines e.g. why exactly should any such heavily vendor modified downstream stuff even work with a mainline PREEMPT_RT patch?

Also, the fact that linux-toradex-rt doesn’t work with 2.8b6 shows that this was not tested.

Yes, none of this was ever much tested. However, I also don’t think we claim any such anywhere.

That said, of course, you may inquire here on this very forum about it and we may try to even help you but that is about it.

I assume that the PREEMPT_RT patch is important for many users of Toradex modules.

That is a very good question. However, anything any of our customers may be using may be very important for them.

Hence, my question is how Toradex supports the use case of real-time kernels in general?

All of this is really provided as-is for your convenience and you may do with it whatever you please but that is about it. You may want to have a look at our new offering Torizon where at least there are plans to support a real-time optimised variant as well:

https://www.toradex.com/operating-systems/torizon

ps: Please note that I don’t have a problem with the specific issue presented here, which was fixed quickly.

Understood.

For more information about our support strategy please have a look at the following article on our developer website:

https://developer.toradex.com/knowledge-base/toradex-embedded-linux-bsp-support-strategy