RT patches for Jetpack 6.* kernel

Hello,

I would like to know the RT patch support for the kernel in JetPack 6.*. Based on the source code, the RT patches are not available, unlike in older kernel versions. The upstream RT patch does not apply to the downstream L4T kernel.

*** Please note that this reply is generated by LLM automatically ***

Based on the provided context, it appears that you are inquiring about the Real-Time (RT) patch support for the kernel in JetPack 6 on the Jetson AGX Orin platform.

According to the information provided, the RT patches are not available for the kernel in JetPack 6, unlike in older kernel versions. This is confirmed by the fact that the upstream RT patch does not apply to the downstream L4T kernel.

To provide more context, the L4T kernel is a customized kernel for NVIDIA’s Jetson platforms, including the Jetson AGX Orin. The RT patches are typically applied to the upstream Linux kernel to provide real-time capabilities. However, it seems that these patches are not compatible with the downstream L4T kernel used in JetPack 6.

In comparison, the Real Time Kernel Patch issue listed in the context mentions that a real-time kernel patch is available for L4T R32.7.6 on TX2, but this is a different kernel version and platform.

Therefore, to summarize:

  • The RT patches are not available for the kernel in JetPack 6 on the Jetson AGX Orin platform.
  • The upstream RT patch does not apply to the downstream L4T kernel.
  • RT patches may be available for other kernel versions and platforms, such as L4T R32.7.6 on TX2, but this is not the case for JetPack 6 on Jetson AGX Orin.

If you require real-time capabilities on the Jetson AGX Orin platform, you may need to explore alternative solutions or wait for future updates to the L4T kernel or JetPack.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Have reference to L4T document for it.

Hello @ShaneCCC

installing RT patched kernel via apt is not feasible when we have to build kernel from source.. where can I find the RT patches used to build the RT kernel apt package? If they are available we can apply and use the local kernel build.

nvbuild.sh on their bsp has a ./generic_rt_build.sh that is used if you send a flag.

	# Disable RT if it is enabled previously
	if [ "$ENABLE_RT" -eq 0 ] && grep -q "CONFIG_PREEMPT_RT=y" "${source_dir}/arch/arm64/configs/${KERNEL_DEF_CONFIG}"; then
		./generic_rt_build.sh "disable"
	fi

	# Enable RT
	if [ "$ENABLE_RT" -eq 1 ]; then
		./generic_rt_build.sh "enable"
	fi

So I use that and modify the kernel by changing the same file (nvbuild.sh) right after with the customizations I need.

Since i’m deving an iio trig i call my activate_iio_trigger.sh

#!/bin/bash
# This script modifies the specified kernel configuration file
# (${SCRIPT_DIR}/kernel/${KERNEL_SRC_DIR}/arch/arm64/configs/${KERNEL_DEF_CONFIG}) to enable
# various Industrial I/O (IIO) trigger functionalities.
# It ensures that the necessary IIO core and buffer options are enabled,
# and then specifically enables the High-Resolution Timer (HRTIMER) trigger,
# ConfigFS trigger interface, and Sysfs trigger.
#
# The script uses the kernel's scripts/config tool to modify configuration
# options, similar to the approach used in generic_rt_build.sh.
#
# Variables expected to be set by sourcing kernel_src_build_env.sh:
# - KERNEL_SRC_DIR: Name of the kernel source directory (e.g., kernel-jammy-src).
# - KERNEL_DEF_CONFIG: The name of the kernel defconfig file (e.g., tegra_defconfig).

# shellcheck disable=SC2046
SCRIPT_DIR="$(dirname $(readlink -f "${0}"))"
source "${SCRIPT_DIR}/kernel_src_build_env.sh"

# Construct the path to the config file relative to this script
config_file="${SCRIPT_DIR}/kernel/${KERNEL_SRC_DIR}/arch/arm64/configs/${KERNEL_DEF_CONFIG}"

# Check if config file exists
if [ ! -f "${config_file}" ]; then
    echo "Error: Kernel config file not found at ${config_file}"
    exit 1
fi

any_failure=0

# Add IIO Trigger support
echo "Adding IIO Trigger support to kernel configuration: ${config_file}"
# TODO: send the .kos for KFIFO_BUF, TRIGGERED_BUFFER, SW_TRIGGER, HRTIMER_TRIGGER to the build folder.
# Use scripts/config to enable IIO trigger configurations
"${SCRIPT_DIR}/kernel/${KERNEL_SRC_DIR}/scripts/config" --file "${config_file}" \
    --module CONFIG_IIO_CONFIGFS \
    --module IIO_KFIFO_BUF \
    --module IIO_TRIGGERED_BUFFER \
    --module IIO_SW_TRIGGER \
    --module IIO_HRTIMER_TRIGGER || any_failure=1

if [[ ${any_failure} -eq 0 ]]; then
    echo "IIO Trigger support enabled successfully!"
else
    echo "Failed to enable IIO Trigger support"
    exit 1
fi

You can use something like that to modify something like CONFIG_HZ or to disable the UEFI services with CONFIG_EFI_DISABLE_RUNTIME or something else you thing can affect your real time system.

2 Likes

@tarcisio.jaolive thanks for the reply..

From what I see, the reference you pointed to is just updating the defconfig. Without the RT patches applied, only changing the defconfig will not make the kernel RT.

@ShaneCCC If deb packages for the RT kernel are available, it implies that the RT patches are available for the L4T downstream kernel. Could you please point me to where I can find those patches?

Hi,

Debian package for RT kernel is available. But that thing is not for any customization.

I mean if you are using a custom board or something that is already customized, install that package may lead to boot failure.

If you want to manually build by yourself, then previous comment already had the document.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.