RT Patch of Jetpack 4.2

Hello All,

I am trying to patches the latest L4T 32.1 with Preempt RT. The script I used was rt-patch.sh under folder “/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9/scripts”. However after running the script, the results come as following.

racecar@nvidia:/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9/scripts$ ./rt-patch.sh apply-patches
find: ‘…/rt-patches’: No such file or directory
cp: cannot stat ‘…/arch/arm64/configs/tegra_gnu_linux_defconfig’: No such file or directory
grep: …/arch/arm64/configs/tegra_gnu_linux_defconfig: No such file or directory
./config: line 112: …/arch/arm64/configs/tegra_gnu_linux_defconfig: No such file or directory
grep: …/arch/arm64/configs/tegra_gnu_linux_defconfig: No such file or directory
./config: line 112: …/arch/arm64/configs/tegra_gnu_linux_defconfig: No such file or directory
grep: …/arch/arm64/configs/tegra_gnu_linux_defconfig: No such file or directory
./config: line 112: …/arch/arm64/configs/tegra_gnu_linux_defconfig: No such file or directory

Here is “uname -a” after running the script.

racecar@nvidia:/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04_aarch64/kernel-4.9/scripts$ uname -a
Linux nvidia 4.9.140-tegra #1 SMP PREEMPT Wed Mar 13 00:30:11 PDT 2019 aarch64 aarch64 aarch64 GNU/Linux

I was doing this directly on the Jetson TX2. I would like to know what would be the correct procedure for applying a preempt rt patch to the L4T 32.1.

Thank you very much.

Apply the patch from the kernel source instead of builded package.

…/sources/kernel/kernel-4.9/scripts

I used Nvidia SDK Manager to install the L4T 32.1. Does it mean I need to build the kernel from source? Also, where can I download kernel 32.1?

Right, you need to build the kernel for your purpose.
You can download the source from download center or follow below doc.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fkernel_custom.html%23

Also check
https://devtalk.nvidia.com/default/topic/1049403/jetson-nano/build-own-nano-image-on-linux-host-failed/post/5326104/#5326104