Skip to content

Cart

Your cart is empty

Installation of RT Patch on Forecr Hardware for JetPack-6

WHAT YOU WILL LEARN?

1- Preparing the Environment

2- Applying the RT patch to the Jetson OS image

3- Jetson OS Installation

ENVIRONMENT

Hardware: DSBOX-ORNX


This blog we will explain how to install RT patch on DSBOX-ORNX board.

Preparing the Environment

First, we need to clean up the existing files in the source directory:


rm -rf Linux_for_Tegra/source/*


Download the Kernel Source
Next, navigate to the source directory and download the kernel source:


cd Linux_for_Tegra/source
git clone -b JetPack-6.0 https://github.com/forecr/forecr_xavier_kernel.git


Move the Kernel Files
After downloading, move the files from the downloaded directory into the source folder:


sudo mv forecr_xavier_kernel/* .


Become Root User
To ensure we have the necessary permissions for the upcoming steps, switch to the root user:


sudo su


Set Up Environment Variables
Before proceeding with the build, export the required environment variables. Note that you may need to adjust these for your specific setup:


./generic_rt_build.sh "enable"
export IGNORE_PREEMPT_RT_PRESENCE=1
export CROSS_COMPILE=/home/metin/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
export INSTALL_MOD_PATH=/home/metin/nvidia/nvidia_sdk/JetPack_6.0_Linux_JETSON_ORIN_NX_TARGETS/Linux_for_Tegra/rootfs
export KERNEL_DEF_CONFIG=dsboard_ornx_defconfig
export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src
export NPROC=$(($(nproc)-1))

Applying the RT patch to the Jetson OS image

Now we can build the kernel:


make -C kernel
make install -C kernel
cp kernel/kernel-jammy-src/arch/arm64/boot/Image ../kernel/Image

When first command finish succesfully, paste second command.

Finally copy the Image file into the kernel folder.


Build the Modules
Next, we’ll build the kernel modules:


make modules
make modules_install
cd ..
./tools/l4t_update_initrd.sh
cd $OLDPWD

After that install modules

Finally change directory to the Linux_for_tegra folder and run last command.


Download BSP Source
Be sure to download the BSP source for the module you are using from Forecr GitHub.

Copy Files to Target HW Image Folder
Copy all necessary files to your target hardware image folder.


Clean Up
Delete Image and `kernel_supplements.tbz2` files as they were created during the kernel compile process. If you built DTB files, delete those as well.


Edit the Replacement Script
Open the `replace_bsp_files.sh` script and remove the below lines.


mv Image Linux_for_Tegra/kernel/Image
mv kernel_supplements.tbz2 Linux_for_Tegra/kernel/
sudo tar -jxf ../kernel/kernel_supplements.tbz2

Then, save and exit.

Apply New BSP Files
Now, apply the new BSP files and interface configurations:


sudo ./replace_bsp_files.sh
cd Linux_for_Tegra/


Create a User (Optional)
Create a default user with the following command:


sudo tools/l4t_create_default_user.sh -u nvidia -p nvidia -a -n nvidia-desktop --accept-license

Jetson OS Installation

Finally, flash the module using the command below:


sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" --showlogs --network usb0 jetson-orin-nano-devkit internal


Conclusion
Following these steps, we were able to successfully install the RT patch on DSBOX-ORNX.



Thank you for reading our blog post.