RT Patch for Xavier kernel 4.9.140

Hi,

My Xavier target installed with the latest Jetpack (4.2) and the version of linux kernel is 4.9.140
I want to patch this kernel with rt-patch.
Which rt-patch version nvidia use to patch this kernel?
After I followed all the instructions and execute the command:
root@yair-OptiPlex-7040:/home/yair/Downloads/XavierBSP/Kernel_Sources/kernel/kernel-4.9# ./scripts/rt-patch.sh apply-patches with success, I tried to rebuild the kernel and got the following error:

root@yair-OptiPlex-7040:/home/yair/Downloads/XavierBSP/Kernel_Sources/kernel/kernel-4.9# make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4
make[1]: Entering directory ‘/home/yair/Downloads/XavierBSP/TegraKernelOut1’
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
GEN ./Makefile
WRAP arch/arm64/include/generated/asm/bugs.h
WRAP arch/arm64/include/generated/asm/clkdev.h
WRAP arch/arm64/include/generated/asm/cputime.h
WRAP arch/arm64/include/generated/asm/delay.h
WRAP arch/arm64/include/generated/asm/div64.h
WRAP arch/arm64/include/generated/asm/dma.h
WRAP arch/arm64/include/generated/asm/dma-contiguous.h
WRAP arch/arm64/include/generated/asm/early_ioremap.h
WRAP arch/arm64/include/generated/asm/emergency-restart.h
WRAP arch/arm64/include/generated/asm/errno.h
WRAP arch/arm64/include/generated/asm/hw_irq.h
WRAP arch/arm64/include/generated/asm/ioctl.h
CHK include/generated/uapi/linux/version.h
WRAP arch/arm64/include/generated/asm/ioctls.h
UPD include/generated/uapi/linux/version.h
WRAP arch/arm64/include/generated/asm/ipcbuf.h
WRAP arch/arm64/include/generated/asm/irq_regs.h
UPD include/config/kernel.release
WRAP arch/arm64/include/generated/asm/kdebug.h
WRAP arch/arm64/include/generated/asm/kmap_types.h
WRAP arch/arm64/include/generated/asm/kvm_para.h
WRAP arch/arm64/include/generated/asm/local.h
WRAP arch/arm64/include/generated/asm/local64.h
WRAP arch/arm64/include/generated/asm/mm-arch-hooks.h
WRAP arch/arm64/include/generated/asm/mman.h
WRAP arch/arm64/include/generated/asm/mcs_spinlock.h
WRAP arch/arm64/include/generated/asm/msgbuf.h
WRAP arch/arm64/include/generated/asm/msi.h
WRAP arch/arm64/include/generated/asm/mutex.h
WRAP arch/arm64/include/generated/asm/poll.h
WRAP arch/arm64/include/generated/asm/resource.h
WRAP arch/arm64/include/generated/asm/preempt.h
WRAP arch/arm64/include/generated/asm/rwsem.h
WRAP arch/arm64/include/generated/asm/segment.h
WRAP arch/arm64/include/generated/asm/sembuf.h
WRAP arch/arm64/include/generated/asm/serial.h
WRAP arch/arm64/include/generated/asm/shmbuf.h
WRAP arch/arm64/include/generated/asm/sizes.h
WRAP arch/arm64/include/generated/asm/simd.h
WRAP arch/arm64/include/generated/asm/socket.h
HOSTCC scripts/basic/bin2c
WRAP arch/arm64/include/generated/asm/sockios.h
WRAP arch/arm64/include/generated/asm/swab.h
WRAP arch/arm64/include/generated/asm/switch_to.h
WRAP arch/arm64/include/generated/asm/termbits.h
WRAP arch/arm64/include/generated/asm/termios.h
WRAP arch/arm64/include/generated/asm/trace_clock.h
WRAP arch/arm64/include/generated/asm/types.h
WRAP arch/arm64/include/generated/asm/unaligned.h
WRAP arch/arm64/include/generated/asm/user.h
WRAP arch/arm64/include/generated/asm/vga.h
WRAP arch/arm64/include/generated/asm/xor.h
WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h
Using /home/yair/Downloads/XavierBSP/Kernel_Sources/kernel/kernel-4.9 as source for kernel
CHK include/generated/utsrelease.h
“4.9.140-rt93— localversion-rt +++ localversion-rt @@ -1 +1 @@ --rt23 ±rt93” exceeds 64 characters
/home/yair/Downloads/XavierBSP/Kernel_Sources/kernel/kernel-4.9/Makefile:1242: recipe for target ‘include/generated/utsrelease.h’ failed
make[1]: *** [include/generated/utsrelease.h] Error 1
make[1]: *** Waiting for unfinished jobs…
make[1]: Leaving directory ‘/home/yair/Downloads/XavierBSP/TegraKernelOut1’
Makefile:171: recipe for target ‘sub-make’ failed
make: *** [sub-make] Error 2

Please advice,
Thanks

Did you use below toolchain?

Linaro 7.3.1 2018.05 tool-chain
http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/

yes of course,
please try to answer the follow questions:
Did someone succeeded to patch the kernel 4.9.140 which came with jetpack 4.2?
Which rt patch version nvidia use for this kernel?

Thanks,
Yair

There’s no problem for me.
Did you make config before make the image?

make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig

yes,
I wanted to clarify myself, I was able to carry out the whole process of building the kernel and flash. (According to nvidia instructions)
After flash process the Xavier boot with success.

Could you give me instructions how to patch the kernel with rt patch?

Which version of rt patch nvidia use for xavier kernel 4.9.140 - rt???

Run the ./scripts/rt-patch.sh apply-patches as you do, and kernel is 4.9.140

This is exactly what i did.
You can see my first mail.
After you flash your Xavier with rt-patch and When you type the command ‘uname - r’ what version you get?

Just recheck looks like can’t build successful after apply the rt-patch.sh,
This patch working for r31.1 but have regression for r32.1

Could you update me when nvidia will fix the script?

Hello yairhav,

I applied rt94 patch as I thought that was more close to the release 4.9.140. I think I might have to fix few errors but otherwise I got it to compile.

I changed the defconfig to be used to tegra_defconfig instead of what rt-patch.sh is using.

Thanks, but I need official solution for this issue. When nvidia plan to fix the rt-patch script?

Thanks,

Is Nvidia solved the bug related to rt-patch in jetpack 4.2.1?

Hi yairhav,
Yes, the changes will be present in jetpack 4.2.1.

See also https://devtalk.nvidia.com/default/topic/1057843/jetson-agx-xavier/rt-patch-in-jetpack-4-2-1-/

Hi,

Is nvidia supply procedure for installing the rt-patch on jetson xavier? (I think there is one for TX2)

Suppose the kernel for Xavier and TX2 is the same.