In LSDK 20.04, a separate branch “linux-4.19-rt” of Linux kernel is used for PREEMP RT, and PREEMP_RT patches have been applied in this kernel branch.
Build Preempt RT Kernel Image in LSDK with the following command.
$ flex-builder -c linux:linux:LSDK-20.04-V4.19-RT
To get PREEMP_RT Kernel source code with the following command.
$ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/linux.git
$ git checkout -b linux-4.19-rt origin/linux-4.19-rt
Enable “ CONFIG_PREEMPT_RT_FULL=y” in the kernel:
-> General setup
->Preemption Model (Fully Preemptible Kernel (RT)) --->
(X) Fully Preemptible Kernel (RT)
By default, RT feature is enabled in the defconfigs of the LSDK kernel RT branch.
CONFIG_PREEMPT=y
CONFIG_PREEMPT_RT_FULL=y