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:
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:
-
Change the Image. (Also restore the old Image with the name “Image.backup”)
-
All files in dtb. (which is changed by the files in the “kernel_out/arch/arm64/boot/dts/nvidia”)
-
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:
- Why we can’t just change the image to update the kernel?
- We don’t find the doc of r34.1. We wonder if the support of r34.1 have stopped.
- 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)