Adding RT patch to L4T 32.7.2

Hi All, I have a Jetson TX2 with L4T (R32.7.2). My host is Ubuntu 22.04 LTS. Looking for a starting point (documentation/online training) to help building an image for L4T (32.7.2) with the real-time patch (RT-PATCH). I installed the jetPack/SDK Manager on my Ubuntu 22.04 host. The SDK Manager is 2.3.0 and the Jetpack is 6.0.

Should I download docker with Ubuntu 18.04 image to flash the TX2 card? A starting point documentation/training video would help.

Hi,
Please try the manual steps in

https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3276/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/quick_start.html#wwpID0E0JD0HA

If you can run the manual steps to flash TX2 developer kit, and the device can boot, it should be fine to use native Ubuntu 22.04, instead of docker with 18.04.

For building RT-kernel, please refer to the discussion in the topic and give it a try:
JetPack 4.6.3: dmesg hangs the kernel and the device reboots

I found two good examples:

Using the sites in parallel will produce the following salient steps as they are delineated below:

To install the latest L4T 32.4.3 on Jetson TX2 with real-time patches, you can follow this instructions:

Install required packages

sudo apt-get update
sudo apt-get install libncurses5-dev
sudo apt-get install build-essential
sudo apt-get install bc
sudo apt-get install lbzip2
sudo apt-get install qemu-user-static
sudo apt-get install python

Create folder

mkdir $HOME/jetson_tx2
cd $HOME/jetson_tx2

Download required files

L4T Jetson Driver Package:

wget https://developer.nvidia.com/embedded/L4T/r32_Release_v4.3/t186ref_release_aarch64/Tegra186_Linux_R32.4.3_aarch64.tbz2

L4T Sample Root File System:

wget https://developer.nvidia.com/embedded/L4T/r32_Release_v4.3/t186ref_release_aarch64/Tegra_Linux_Sample-Root-Filesystem_R32.4.3_aarch64.tbz2

L4T Sources:

wget https://developer.nvidia.com/embedded/L4T/r32_Release_v4.3/sources/T186/public_sources.tbz2

GCC Tool Chain for 64-bit BSP:

wget http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz

Extract files

sudo tar xpf Tegra186_Linux_R32.4.3_aarch64.tbz2
cd Linux_for_Tegra/rootfs/
sudo tar xpf ../../Tegra_Linux_Sample-Root-Filesystem_R32.4.3_aarch64.tbz2
cd ../../
tar -xvf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
sudo tar -xjf public_sources.tbz2
tar -xjf Linux_for_Tegra/source/public/kernel_src.tbz2

Apply real-time patches

cd kernel/kernel-4.9/
./scripts/rt-patch.sh apply-patches

Configure and compile the kernel

TEGRA_KERNEL_OUT=jetson_tx2_kernel
mkdir $TEGRA_KERNEL_OUT
export CROSS_COMPILE=$HOME/jetson_tx2/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
make ARCH=arm64 O=$TEGRA_KERNEL_OUT menuconfig

Configure the next options:

General setup → Timer subsystem → Timer tick handling → Full dynticks system (tickless)
Kernel Features → Preemption Model: Fully Preemptible Kernel (RT)
Kernel Features → Timer frequency: 1000 HZ

The script that applies the real-time patches disables the CPU idle driver, however, jetson_clocks also tries to disable this feature and you can see an error when running jetson_clocks. To avoid that, you can enable it again:

CPU Power Management → CPU idle → ARM CPU Idle Drivers → CPU Idle Driver for NVIDIA Tegra 18x SoCs

make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4

sudo cp jetson_tx2_kernel/arch/arm64/boot/Image $HOME/jetson_tx2/Linux_for_Tegra/kernel/Image
sudo cp -r jetson_tx2_kernel/arch/arm64/boot/dts/* $HOME/jetson_tx2/Linux_for_Tegra/kernel/dtb/
sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=$HOME/jetson_tx2/Linux_for_Tegra/rootfs/

cd $HOME/jetson_tx2/Linux_for_Tegra/rootfs/
sudo tar --owner root --group root -cjf kernel_supplements.tbz2 lib/modules
sudo mv kernel_supplements.tbz2  ../kernel/

cd ..
sudo ./apply_binaries.sh

Flash the Jetson TX2

Put Jetson TX2 in recovery mode and then flash it:

sudo ./flash.sh jetson-tx2 mmcblk0p1

To finish, install Jetson SDK components using NVIDIA SDK Manager

Best regards!

Copied “$HOME/jetson_tx2” inside of a docker container. Command “lsusb -d 0955:7c18” shows that the Jetson TX2 is in recovery mode from within the docker container. When I run the “sudo ./flash.sh jetson-tx2 mmcblk0p1” command from within the container, it flashes the TX2. After the TX2 resets and configures, it hangs in the configuration phase and does not finish.

Is this still an issue to support? Any result can be shared?

The solution worked really well. I was able to install the RealTime Patch and configure the L4T to run at 1000 (Hz). The steps delineated in this thread are correct.

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