update to latest v5.4-rt kernel for sam9x35 SOC

Nicolas Ferre nicolas.ferre at microchip.com
Fri Apr 14 05:14:43 PDT 2023


Hi Yosi Yarchi,

On 13/04/2023 at 10:51, yosi yarchi wrote:
> Hi
> 
> Thank you for your detailed response
> 
> could you provide some clarifications for the following issues?
> 
> 1. is update process is the same, if I want to upgrade to highest
> kernel-rt version? if so, do I limited to 5.15.96 (highest linux4sam
> kernel is linux-5.15-mchp/105. highest stable rt kernel is linux-5.15.96)?

You can merge the rt patch series patches-5.15.96-rt61.tar.xz  on top of 
the head of the linux-5.15-mchp branch without problem: it applies 
cleanly with a couple of line offsets: it should be good.

I deployed a result of this merge (build tested, from a sama5_defconfig 
with RPEEMPT_RT as preemption model, not booted) here:
https://github.com/linux4sam/linux-at91/tree/linux-5.15-mchp-rt
Feedback welcome :-)

I didn't deployed it on our broader and more "official" Linux4Microchip 
(https://github.com/linux4microchip/linux) tree because I need to 
involve more of my colleagues to the discussion.

> 2. when do you plan to release new kernel-rt?

The intention was to follow the preempt-rt developments, and now that 
the specific Microchip/at91 parts are in mainline, there's not so much 
difficulty to apply the PREEMPT_RT patches and be ready to go... I don't 
know if having our own tree for that is interesting.
What I can tell is that I know that some of our field engineers, with 
customers are using one or the other of PREEMPT_RT-enabled kernels.

> 3. what is the purpose of
> git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git repository?

This tree is for at91 official maintainers to push code upstream. This 
is where we store our pull-requests to arm-soc and clock maintainers.

It's not meant for customers consumption except if they want to follow 
closely what we are doing for upstreaming the code to Mainline Linux, 
the usual Linux kernel development process that we are trying to comply 
to for more than a decade, kernel revision after kernel revision ;-)

Hope that it gives you a good overview of our process.

Best regards,
   Nicolas

> On 4/5/23 19:42, Nicolas.Ferre at microchip.com wrote:
>> Yosi Yarchi,
>>
>> On 04/04/2023 at 17:55, yosi yarchi wrote:
>>>       Hi
>>>
>>>         I'm working currently with 5.4.41-linux4sam-2020.04-rt kernel on
>>>         sam9x35 SOC. there are no updates for this kernel for long time
>>>         (since 2020).
>> Yes, in the meantime, we switched our "vendor kernel" to newer kernel
>> revisions and continued our work to mainline the out-of-tree changes.
>>
>> For this particular SoC, I would say that all needed pieces are in
>> Mainline for a long time, so I would always advise to go with the latest
>> upstream kernel (with RT_PREEMPT extension in this case).
>> That being said, I admit that you want to stick with 5.4.x kernels for
>> various reasons.
>>
>>>         at linux-stable-rt, however, there are lot of
>>>         updates for v5.4 kernel. I want to update to latest v5.4 kernel. I
>>>         thought to:
>>>
>>>           1. take linux-stable-rt repository as my base
>>>           2. add missing files from maintainers repository
>>> git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux.git
>>>             repository (pointed by MAINTAINERS file).
>>>
>>>           however, what about exist but less updated files? the file
>>>             drivers/dma/at_hdmac.c, for example, exist at both
>>>             repositories, but git log shows that there are much more
>>>             updates at maintainers repository than to linux-stable-rt
>>>             repository (even at specific date, Oct 25 2022, for example).
>>>
>>>        my question is: what is the right way to update to latest 5.4-rt
>>>         kernel on sam9x SOCs?
>> I would take the reverse approach as it's what we do for building our
>> Linux4SAM/Linux4Microchip kernels:
>>
>> 1/ start with non-rt latest version of linux4sam 5.4: branch
>> linux-5.4-at91 that has the stable updates up to v5.4.104 (March 2021)
>> 2/ little by little (chunk of 10 revisions), merge upstream stable
>> kernels, fix merge conflicts, continue, iterate, up to v5.4.230 (see below)
>> 3/ during this process, test regularly the resulting kernel on your
>> system or even better in a CI loop to automate the process
>> 4/ stop when you've reached the more recent 5.4 stable kernel *with rt
>> extensions* (5.4.230 as I can see on
>> https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/5.4/)
>> 5/ now you can merge v5.4.230-rt80 on your updated kernel. If you find
>> conflicts or difficulties, take the v5.4.41-rt kernel as an example of
>> how to solve the conflicts for sam9x35. The most challenging part must
>> be related to timers: see how it's done for the kernel you use now
>> (v5.4.41-rt) to replicate this on the newer kernel if needed.
>>
>> In any case, don't hesitate to fill-in a support ticket with Microchip
>> to address this special case.
>>
>> Hope that it helps. Best regards,
>>      Nicolas
>>

-- 
Nicolas Ferre




More information about the linux-arm-kernel mailing list