Why we can't update our NX system kernel by replacing the Image in /boot/?

We want to update our Linux kernel to Real-time Kernel on our Jetson Xavier. Here gives our version of hardware and software

Hardware:Nvidia Xavier NX (which is booting from SSD) Its original gui is working well. But we need to update it to Real-time Kernel.
Present Kernel(which is gotten by "uame -a"): Linux ubuntu 5.10.65-tegra #1 SMP PREEMPT Mon May 16 20:58:07 PDT 2022 aarch64 aarch64 aarch64 GNU/Linux

What we have done to build a Real-time Kernel

First we want to use “apt install” to get a real-time kernel, however we know that there is no apt source of real-time kernel in r34.1.

As a result, we try to build a real-time kernel with the help of the documentation below:

https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/SD/Kernel/KernelCustomization.html

First, we download Linux Sources code,named:

Driver Package (BSP) Sources

And then we follow the steps in the docs, the detailed steps we adopted will be given below (all steps we make it on the NX):

1. Unzip the public_sources.tbz2

we use:

tar -xjf public_sources.tbz2 

2. Enter the sources dir

We use:

cd Linux_for_Tegra/source/public

3. Unzip the Kernel sources

tar -xjf kernel_src.tbz2

4. Build the Kernel

First, we build a new dir named “kernel_out”

mkdir kernel_out

Second,we run the rt_patches.sh in kernel/…

./kernel/kernel-5.10/scripts/rt-patch.sh apply-patches 
./nv_build.sh -o (path_to_public)/kernel_out/

Wait for a long time, we build it successfully without any Error.

5.Replace Image,dtb and edit the extlinux

In this part, we make it in the gui. And finnaly we change the “/boot/” in three parts:

  1. Change the Image. (Also restore the old Image with the name “Image.backup”)

  2. All files in dtb. (which is changed by the files in the “kernel_out/arch/arm64/boot/dts/nvidia”)

  3. We edit the extlinux/extlinux.conf. Now it have become:

    TIMEOUT 30
    DEFAULT primary
    
    MENU TITLE L4T boot options
    
    LABEL primary
    			MENU LABEL primary kernel
    			LINUX /boot/Image
    			INITRD /boot/initrd
    

6. And finally, we reboot the NX

However, when the gui appear again, nothing happen. The output of “uname -a” is still.

So our questions are:

  1. Why we can’t just change the image to update the kernel?
  2. We don’t find the doc of r34.1. We wonder if the support of r34.1 have stopped.
  3. While we are building the kernel, we also try something others. For example, we download all the three Jeson archive. Build the Kernel and the display driver. However, when we change the nvgpu.ko. We can’t restart the gui again. So why we cannot get gui even if we build the display driver ?(But we can access the system by serization. And the output of “uname -a” is still)

Hi,
r34.1(Jetpack 5.0.1) is developer preview. Please use latest production release Jetpack 5.1.1:
Jetson Linux 35.3.1 | NVIDIA Developer

For developing kernel, please refer to
Kernel — Jetson Linux Developer Guide documentation

Hello, we have reflashed Jetpack 5.1.1. And then we build the rt kernel and display driver. However, we still can’t get into gui. What should we do now?

OK, now we reflash the system again. And in this time, we edit the extinx.conf file to include three boot methods which we call “primary, back up and real-time”. In the real-time, the system will use the file “Image.real-time” which is built according to the steps in the doc “Build the Real-time Kernel” ( we change its name). And now, It seems that we enter the real-time system. However, it take a long time during the boot and stop here.


In the picture, we should pay great attention to the red line. I am sure that there is a dir called “5.10.104-rt63-tegra” in the /lib/modules. And I add the extra dir in it. So why the logs show that it can not find this dir?
Here gives the picture of “5.10.104-rt63-tegra”

To make a add, the logs stops at
“[ 90.359206] random: crng init done”

When we type “ls” in the boot bash. We find that the file system is not correct. Then we find that the root_path we didn’t direct in the extinx.conf. So finally we enter the rt kernel successfully. Thank you.

1 Like

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