How to set real time patch correctly? #honister
Hello,
I'm wondering what is the *best way to* patch properly kernel with RT-PATCH in distribution?(specific in HONISTER)
For an example I checkout HONISTER commit with has the kernel 5.15.36 which is LTS and now I want to patch with correct RT-patch to this version. which I can be found here: https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patch-5.15.36-rt41.patch.gz
Regards,
Haim
One painless way would be to set
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"
somewhere (e.g. distro.conf, machine.conf, local.conf... whatever fits best your case).
Setting this will fetch the kernel source from a branch that has the patch applied already.
Hi and what if the recipe is linux-xlnx then set PREFFERED_PROVIDER_virtual/kernel = “linux-xlnx-rt”?
By the way what the different between linux-yocto and linux-xlnx?
בתאריך שבת, 26 באוק׳ 2024 ב-16:55 מאת Gyorgy Sarvari <[email protected]
Quoted 10 lines
:
One painless way would be to set PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt" somewhere (e.g. distro.conf, machine.conf, local.conf... whatever fits best your case).
Setting this will fetch the kernel source from a branch that has the patch applied already.
Quoted 4 lines · חיים בכר
Hi and what if the recipe is linux-xlnx then set PREFFERED_PROVIDER_virtual/kernel = “linux-xlnx-rt”?
By the way what the different between linux-yocto and linux-xlnx?
linux-yocto (and its -rt variant) is the default kernel coming with Yocto. linux-xlnx comes from Xilinx, with their own modifications, and looking at meta-xilinx layer, there doesn't seem to be a recipe with the RT patch available.
If you are not using the default kernel, then possibly the simplest would be to create a bbappend for your kernel recipe, where you add the patch's uri to SRC_URI (assuming it applies cleanly on the vendor's kernel still), e.g:
SRC_URILappend = " https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patch-5.15.36-rt41.patch.gz"
After fetching the source bitbake will extract the patch and apply it automatically before compiling.
(If the patch doesn't apply on the xlnx kernel, then maybe Xilinx support has some extra info on this? Adapting that patch could be a non-trivial task)
Do you know if there any example of setting the rt patch with Xilinx kernel? the default procedure not working as you say it’s for the vanilla kernel.
Regards,
Haim
Based on some random googling[0], the RT patch is not supported officially by the Xilinx kernel - and there is a not too nice unofficial way, which doesn't look something that can be done nicely without hacks using Yocto at the first sight.
Personally I would just prepare the source manually along some update script, and host it on my local server to fetch it from... but possibly the folks at meta-xilinx mailing list[1] could be a better help? It's their kernel, most likely they have more hands-on experience.
[0]: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842435/Real-Time+Linux
[1]: https://lists.yoctoproject.org/g/meta-xilinx
It’s tough with the llinux-xlnx kernels, because they include some stuff from the RT patches, and you have to modify the patch files to get them to apply. Then there are things that patch okay, but break the build, and you have to chase that down.
Updating the patches can definitely be tedious, but I keep the result (as a full patch set) along with a bbappend in my local layer.
I’ve been able to get a working PREEMPT-RT kernel into my images, followed by lots of testing (currently on 2023.2/Langdale).
Really can’t wait for kernel 6.12 to make it into a yocto release and then into linux-xlnx.
Sent from [Proton Mail](https://proton.me/mail/home) for iOS
Quoted 22 lines · On Sun, Oct 27, 2024 at 13:01, Gyorgy Sarvari…
Based on some random googling[0], the RT patch is not supported officially by the Xilinx kernel - and there is a not too nice unofficial way, which doesn't look something that can be done nicely without hacks using Yocto at the first sight.
Personally I would just prepare the source manually along some update script, and host it on my local server to fetch it from... but possibly the folks at meta-xilinx mailing list[1] could be a better help? It's their kernel, most likely they have more hands-on experience.
[0]:
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842435/Real-Time+Linux
[1]: https://lists.yoctoproject.org/g/meta-xilinx-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64145): https://lists.yoctoproject.org/g/yocto/message/64145
Mute This Topic: https://lists.yoctoproject.org/mt/109223260/4864247
Mute #honister:https://lists.yoctoproject.org/g/yocto/mutehashtag/honister Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Thanks for the answer,
Ill read those wiki and mailing list
Regards,
Haim
Alternatively:
https://git.yoctoproject.org/linux-yocto/log/?h=v6.6/standard/preempt-rt/sdkv6.6/xlnx-soc
Also, please anyone reading this. Do not expect any magic from 6.12 to make all your -rt dreams come true. Outside of patching the kernel, all of the challenges with supporting -rt in embedded SDKs and devices will be exactly the same. Dust off our tracing and latency spike debugging skills, because you are going to need them.
Cheers,
Bruce
Quoted 19 lines · Haimbach via lists.yoctoproject.org
Do you know if there any example of setting the rt patch with Xilinx kernel?
the default procedure not working as you say it’s for the vanilla kernel.Regards,
Haim-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64142):
https://lists.yoctoproject.org/g/yocto/message/64142
Mute This Topic: https://lists.yoctoproject.org/mt/109223260/1050810
Mute #honister:https://lists.yoctoproject.org/g/yocto/mutehashtag/honister Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
No magic expected. It will just be nice to not have to essentially merge 3 kernel flavors together to get full RT going.
I hadn’t seen (or looked for) the Xilinx tags in linux-yocto before. I’ve always been leery about using anything other than linux-xlnx. There are usually enough things to do when moving between Xilinx yocto releases that I haven’t wanted to add more things to remember, but I will definitely take a look.
Thanks,
Sent from [Proton Mail](https://proton.me/mail/home) for iOS
Quoted 22 lines · On Sun, Oct 27, 2024 at 15:20, Bruce Ashfield…
Alternatively:
https://git.yoctoproject.org/linux-yocto/log/?h=v6.6/standard/preempt-rt/sdkv6.6/xlnx-soc
Also, please anyone reading this. Do not expect any magic from 6.12 to make all your -rt dreams come true. Outside of patching the kernel, all of the challenges with supporting -rt in embedded SDKs and devices will be exactly the same. Dust off our tracing and latency spike debugging skills, because you are going to need them.
Cheers,
Bruce
Quoted 5 lines · Haimbach via lists.yoctoproject.org
Do you know if there any example of setting the rt patch with Xilinx kernel? the default procedure not working as you say it’s for the vanilla kernel.
Regards,
Haim--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
Quoted 3 lines · codusnocturnus via lists.yoctoproject.org
No magic expected. It will just be nice to not have to essentially merge 3 kernel flavors together to get full RT going.
I'm not exactly sure what that means in your context, but that isn't important since I don't need to :)
I just wanted my statement to be on the record, since the amount of people who think that something fundamental has changed is quite surprising. But clearly, that isn't the case here, and you are going into things eyes wide open!
Quoted 8 lines
I hadn’t seen (or looked for) the Xilinx tags in linux-yocto before. I’ve always been leery about using anything other than linux-xlnx. There are usually enough things to do when moving between Xilinx yocto releases that I haven’t wanted to add more things to remember, but I will definitely take a look.
Full disclosure. I work for AMD/Xilinx (but you may have known that), so there's some assurance that what makes it into linux-yocto is aligned with other sources. Wind River contributes the SDK ports, so they are tested and supported from that level as well.
Bruce
Quoted 57 lines
Thanks,
Sent from Proton Mail <https://proton.me/mail/home> for iOS
On Sun, Oct 27, 2024 at 15:20, Bruce Ashfield <[email protected] <On+Sun,+Oct+27,+2024+at+15:20,+Bruce+Ashfield+%3C%3Ca+href=>> wrote:
Alternatively:
https://git.yoctoproject.org/linux-yocto/log/?h=v6.6/standard/preempt-rt/sdkv6.6/xlnx-soc
Also, please anyone reading this. Do not expect any magic from 6.12 to make all your -rt dreams come true. Outside of patching the kernel, all of the challenges with supporting -rt in embedded SDKs and devices will be exactly the same. Dust off our tracing and latency spike debugging skills, because you are going to need them.
Cheers,
Bruce
Quoted 10 lines · Haimbach via lists.yoctoproject.org
Do you know if there any example of setting the rt patch with Xilinx kernel?
the default procedure not working as you say it’s for the vanilla kernel.Regards,
Haim--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64148):
https://lists.yoctoproject.org/g/yocto/message/64148
Mute This Topic: https://lists.yoctoproject.org/mt/109223260/1050810
Mute #honister:https://lists.yoctoproject.org/g/yocto/mutehashtag/honister Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II