RT Kernel Jetpack 6 Issue

Hello,

Ref:
https://docs.nvidia.com/jetson/archives/r36.2/DeveloperGuide/SD/Kernel/KernelCustomization.html
Board:
AGX Orin Dev board

Steps done so far,

  1. Flashed JP6 to NVME using ./flash script to Orin without any tools.
    Host Side:
  2. Followed the reference guide above.

How do I fix this and how do I apply this modified kernel to the jetson finally ?

Hi,

Did you remember to do this when building kernel modules?

export IGNORE_PREEMPT_RT_PRESENCE=1

@DaveYYY I think I did but I will do it again, but I am still unclear on the flashing issue after building the RT kernel, can you please provide some steps. Documentation is not complete or not very clear and this issue has been opened by everyone for every jetpack release,

After following the manual on the host side, do I need to install the jetpack 6 first on the jetson, so these kernal specific files can be copied over to the folder which sdkmanager uses ?

Nvidia Jetson Linux Real-Time Ke_e3be6c1c0e974075b8eae394d79957b5-081223-0958-2.pdf (9.9 KB)

Is the process similar to Jetpack 5 ?

I don’t know what you are talking about here.
If you are building your own kernel, then you should use flashing scripts to flash your device, instead of SDK Manager.

NO. They are not the same.
Please refer to our document specific for 36.2.

@DaveYYY I have seen in regular flash with JP6, issue with joystick. How can I make sure while building kernel that CONFIG_LOGITECH_FF is enabled ?
Is there any documentation on this ?

You can simply modify Linux_for_Tegra/source/kernel/kernel-jammy-src/arch/arm64/configs/defconfig to add the kernel config you want.
I think kernel config is not documented because it’s like a basic thing in kernel world.

@DaveYYY I am getting this error, on building out of Nvidia tree modules.

I see the modules are in /rootfs/usr/src/nvidia

Did you extract all the source tarballs?

$ cd <install-path>/Linux_for_Tegra/source
$ tar xf kernel_src.tbz2
$ tar xf kernel_oot_modules_src.tbz2
$ tar xf nvidia_kernel_display_driver_source.tbz2

Yes, I had done that in beginning, but I do not see it anymore. Its weird

Please delete the whole BSP folder and try again by closely following the guide.
I just built the same customized RT kernel today, and there was no issue.

It is in the right folder (all the source tarballs), my bad. Wrong folder screenshot I took above

Ideally, you should have all these stuff under Linux_for_Tegra/source/

argus_cam_libavencoder_src.tbz2
argus_cam_libavencoder_src.tbz2.sha1sum
atf_src.tbz2
atf_src.tbz2.sha1sum
dtc-1.4.5.tbz2
dtc-1.4.5.tbz2.sha1sum
generic_rt_build.sh
gstegl_src.tbz2
gstegl_src.tbz2.sha1sum
gstjpeg_src.tbz2
gstjpeg_src.tbz2.sha1sum
gst-nvarguscamera_src.tbz2
gst-nvarguscamera_src.tbz2.sha1sum
gst-nvcompositor_src.tbz2
gst-nvcompositor_src.tbz2.sha1sum
gst-nvtee_src.tbz2
gst-nvtee_src.tbz2.sha1sum
gst-nvv4l2camera_src.tbz2
gst-nvv4l2camera_src.tbz2.sha1sum
gst-nvvidconv_src.tbz2
gst-nvvidconv_src.tbz2.sha1sum
gst-nvvideo4linux2_src.tbz2
gst-nvvideo4linux2_src.tbz2.sha1sum
hardware
hwpm
kernel
kernel_oot_modules_src.tbz2
kernel_oot_modules_src.tbz2.sha1sum
kernel_src_build_env.sh
kernel_src.tbz2
kernel_src.tbz2.sha1sum
libgstnvcustomhelper_src.tbz2
libgstnvcustomhelper_src.tbz2.sha1sum
libgstnvdrmvideosink_src.tbz2
libgstnvdrmvideosink_src.tbz2.sha1sum
libgstnvvideosinks_src.tbz2
libgstnvvideosinks_src.tbz2.sha1sum
libv4l2_nvargus_src.tbz2
libv4l2_nvargus_src.tbz2.sha1sum
Makefile
nvbuild.sh
nvcommon_build.sh
nvdisplay
nvethernetrm
nvgpu
nvgstapps_src.tbz2
nvgstapps_src.tbz2.sha1sum
nvidia-jetson-optee-source.tbz2
nvidia-jetson-optee-source.tbz2.sha1sum
nvidia_kernel_display_driver_source.tbz2
nvidia_kernel_display_driver_source.tbz2.sha1sum
nvidia_kernel_display_driver_source_without_root_dir.tbz2
nvidia_kernel_display_driver_source_without_root_dir.tbz2.sha1sum
nvidia-oot
nvidia-xconfig_src.tbz2
nvidia-xconfig_src.tbz2.sha1sum
nv_public_src_build.sh
nv_public_src_build_tos.sh
nvsample_cudaprocess_src.tbz2
nvsample_cudaprocess_src.tbz2.sha1sum
nvsci_headers.tbz2
nvsci_headers.tbz2.sha1sum
nvsci_samples_src.tbz2
nvsci_samples_src.tbz2.sha1sum
nv_src_build.sh
opencv_gst_samples_src.tbz2
opencv_gst_samples_src.tbz2.sha1sum
openwfd_headers.tbz2
openwfd_headers.tbz2.sha1sum
out
public_sources_sha.txt
source_sync.sh
spe-freertos-bsp.tbz2
spe-freertos-bsp.tbz2.sha1sum
v4l2_libs_src.tbz2
v4l2_libs_src.tbz2.sha1sum

Under Linux_for_Tegra/source/

under out it does not match
image

I definitely had followed the manual closely with clearing my entire VM and then re-start fresh install.

So what’s the error now?
Can you please give the log as text here? Screenshots are not preferred.

make[1]: Leaving directory '/home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/kernel/kernel-jammy-src'
if [ ! -d "/home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/nvgpu" ] ; then \
	echo "Directory nvgpu is not found, exiting.."; \
	false; \
fi
================================================================================
make modules_install - nvgpu ...
================================================================================
make -j 2 ARCH=arm64 \
	-C /home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/kernel/kernel-jammy-src \
	M=/home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/nvgpu/drivers/gpu/nvgpu \
	CONFIG_TEGRA_OOT_MODULE=m \
	srctree.nvidia=/home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/nvidia-oot \
	srctree.nvidia-oot=/home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/nvidia-oot \
	srctree.nvconftest=/home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/out/nvidia-conftest \
	KBUILD_EXTRA_SYMBOLS=/home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/nvidia-oot/Module.symvers \
	modules_install
make[1]: Entering directory '/home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/kernel/kernel-jammy-src'
  INSTALL /home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/rootfs//lib/modules/5.15.122-rt-tegra/extra/nvgpu.ko
  SIGN    /home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/rootfs//lib/modules/5.15.122-rt-tegra/extra/nvgpu.ko
  DEPMOD  /home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/rootfs//lib/modules/5.15.122-rt-tegra
make[1]: Leaving directory '/home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/kernel/kernel-jammy-src'
================================================================================
make modules_install - nvidia-display ...
================================================================================
make -C /home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/out/nvidia-linux-header \
	M=/home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/nvdisplay/kernel-open modules_install
make[1]: Entering directory '/home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/out/nvidia-linux-header'
  INSTALL /home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/rootfs//lib/modules/5.15.122-rt-tegra/extra/nvidia-drm.ko
  SIGN    /home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/rootfs//lib/modules/5.15.122-rt-tegra/extra/nvidia-drm.ko
  INSTALL /home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/rootfs//lib/modules/5.15.122-rt-tegra/extra/nvidia-modeset.ko
  SIGN    /home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/rootfs//lib/modules/5.15.122-rt-tegra/extra/nvidia-modeset.ko
  INSTALL /home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/rootfs//lib/modules/5.15.122-rt-tegra/extra/nvidia.ko
  SIGN    /home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/rootfs//lib/modules/5.15.122-rt-tegra/extra/nvidia.ko
  DEPMOD  /home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/rootfs//lib/modules/5.15.122-rt-tegra
make[1]: Leaving directory '/home/jetson/nvidia/nvidia_sdk/JetPack_6.0_DP_Linux_DP_JETSON_AGX_ORIN_TARGETS/Linux_for_Tegra/source/out/nvidia-linux-header'

Is this error or looks good to you ?

I don’t feel like it’s error at all.
It looks fine.
If it’s indeed error, then compilation would just stop, so if it does not stop, then everything is fine.

Ok just wanted to confirm, thank you I will keep going with the process.

@DaveYYY I finished the flash but its stuck on boot screen as below, any thoughts or shall I try to re-flash ?

Flash command used :
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c ./tools/kernel_flash/flash_l4t_nvme.xml -S 500GiB --showlogs --erase-all jetson-agx-orin-devkit nvme0n1p

flash_log.txt (63.5 KB)

Dump the serial console log, please.
The screenshot and flashing log do not give any useful information.

As per this it did not find nvme0n1p1 root device but found it couple lines above.





In the end I tried different variations, flashing in mmcblk01 by removing SSD card, tried flashing nvme0n1p2 but no luck. Please let me know your thoughts, unless this would be strange if adding "CONFIG_LOGITECH_FF " is causing the issue.