RT Patch Issue

Hello everyone,

We are trying to include RT patch on Jetson Nano.

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

However, we observe that, the screen goes black after showing the kernel logs. The Ubuntu Desktop could not loading.
Has anyone got the same problem? Does it work only in disabled UI?

Thanks

Did you build the kernel with below environment value setting?

export LOCALVERSION=-tegra

Yes. We used an environment file into the kernel_src folder

export CROSS_COMPILE=$HOME/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
export LOCALVERSION=-tegra
export ARCH=arm64

Today, we tried it on Jetson Nano Developer Kit A02 (part number 945-13450-0000-000), too.

We downloaded the public_sources for Jetson Nano and extracted the kernel_src archive.

Then, we created the environment_nvidia file into it and include these lines (we extracted the GCC compiler into our home directory):

export CROSS_COMPILE=$HOME/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
export LOCALVERSION=-tegra
export ARCH=arm64

Afterwards, we compiled it with these commands:

cd kernel/kernel-4.9/
source …/…/environment_nvidia
sudo ./scripts/rt-patch.sh apply-patches
make ARCH=arm64 O=…/…/kernel_out_jetson_nano_dev_kit tegra_defconfig
make ARCH=arm64 O=…/…/kernel_out_jetson_nano_dev_kit -j$(($(nproc)-1))

Then, we copied the dtb (tegra210-p3448-0000-p3449-0000-a02.dtb) and Image files from build folder (kernel_out_jetson_nano_dev_kit) to JetPack folder (~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/).

Finally, we flashed it with these commands:

cd ~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/
sudo ./flash.sh jetson-nano-devkit mmcblk0p1

We completed the Ubuntu installation guide and it rebooted. The first NVIDIA logo and the boot up logs viewed on our monitor but the Ubuntu Desktop could not load. Actually, the screen only blinks after that.

We could connect via SSH and got the dmesg logs. The attached text file is the output of dmesg logs:
dmesg.txt (74.9 KB)

Best Regards

Could you share the result of “lsmod” on your device? I guess your gpu driver is not loaded and your “uname -r” has something with “-rt”. So that the kernel modules are not loaded.

nvidia@nvidia-desktop:~$ lsmod
Module Size Used by

nvidia@nvidia-desktop:~$ uname -r
4.9.253-rt168-tegra

nvidia@nvidia-desktop:~$ uname -a
Linux nvidia-desktop 4.9.253-rt168-tegra #2 SMP PREEMPT RT Thu Oct 21 13:48:27 +03 2021 aarch64 aarch64 aarch64 GNU/Linux

Yes, as expected. That is why gpu driver not loaded.

The cause of your issue is that the search path of “modprobe” is /lib/modules/{uname -r}

But there is no such path on your device.

That’s right. There is only /lib/modules/4.9.253-tegra/ folder on it.

May I change this folder name as “4.9.253-rt168-tegra” and reboot it?

Thanks

I think a better solution should be you also build new kernel modules with the same setting as your RT kernel.

1 Like

It worked. Thank you very much @WayneWWW and @ShaneCCC. After installing the modules and reflashing, it worked successfully. These are the whole steps I’ve done:

Device: Jetson Nano Developer Kit A02 (part number 945-13450-0000-000)
OS: JetPack 4.6

We downloaded the public_sources for Jetson Nano and extracted the kernel_src archive.

Then, we created the environment_nvidia file into it and include these lines (we extracted the GCC compiler into our home directory):

export CROSS_COMPILE=$HOME/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
export LOCALVERSION=-tegra
export ARCH=arm64

Afterwards, we compiled it and installed the modules into the JetPack folder (~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/) with these commands:

cd kernel/kernel-4.9/
source …/…/environment_nvidia
sudo ./scripts/rt-patch.sh apply-patches
make ARCH=arm64 O=…/…/kernel_out_jetson_nano_dev_kit tegra_defconfig
make ARCH=arm64 O=…/…/kernel_out_jetson_nano_dev_kit -j$(($(nproc)-1))
sudo make ARCH=arm64 O=../../kernel_out_jetson_nano_dev_kit modules_install INSTALL_MOD_PATH=~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/rootfs/

Then, we copied the dtb (tegra210-p3448-0000-p3449-0000-a02.dtb) and Image files from build folder (kernel_out_jetson_nano_dev_kit) to JetPack folder (~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/).

cp ../../kernel_out_jetson_nano_dev_kit/arch/arm64/boot/Image ~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/kernel/Image

cp ../../kernel_out_jetson_nano_dev_kit/arch/arm64/boot/dts/tegra210-p3448-0000-p3449-0000-a02.dtb ~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/kernel/dtb/

Finally, we flashed it with these commands:

cd ~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/
sudo ./flash.sh jetson-nano-devkit mmcblk0p1

After the Ubuntu installation guide completed, the Ubuntu Desktop loaded successfully. The kernel modules are loaded successfully.

nvidia@nvidia-desktop:~$ uname -r
4.9.253-rt168-tegra
nvidia@nvidia-desktop:~$ ls /lib/modules/
4.9.253-rt168-tegra 4.9.253-tegra
nvidia@nvidia-desktop:~$ lsmod
Module Size Used by
bnep 19192 2
fuse 119152 3
xt_conntrack 3979 1
ipt_MASQUERADE 2634 1
nf_nat_masquerade_ipv4 3993 1 ipt_MASQUERADE
nf_conntrack_netlink 33453 0
nfnetlink 9780 2 nf_conntrack_netlink
xt_addrtype 3915 2
iptable_filter 3008 1
iptable_nat 3423 1
nf_conntrack_ipv4 14286 2
nf_defrag_ipv4 2102 1 nf_conntrack_ipv4
nf_nat_ipv4 8176 1 iptable_nat
nf_nat 25620 2 nf_nat_masquerade_ipv4,nf_nat_ipv4
nf_conntrack 178317 6 nf_conntrack_ipv4,nf_conntrack_netlink,nf_nat_masquerade_ipv4,xt_conntrack,nf_nat_ipv4,nf_nat
br_netfilter 17723 0
zram 29475 4
overlay 54064 0
userspace_alert 7015 0
nvgpu 1745468 18
ip_tables 21731 2 iptable_filter,iptable_nat
x_tables 38026 5 ip_tables,iptable_filter,ipt_MASQUERADE,xt_addrtype,xt_conntrack
nvidia@nvidia-desktop:~$

Best Regards

2 Likes

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