The screen cannot display the desktop after customizing the kernel?

Development board environment:Jetson Linux35.3.1
core board:orin Nano4GB
board:Jetson Orin Nano Developer Kit

I refer to this tutorial
Kernel Customization — Jetson Linux Developer Guide documentation
Here’s what I did:
1./nvidia/35.3/Linux_for_Tegra/source/public$ ./nvbuild.sh -o ~/nvidia/35.3/Linux_for_Tegra/source/kernel_out/

2.zynq@zynq-virtual-machine:~/nvidia/35.3/Linux_for_Tegra/source/kernel_out/drivers/gpu/nvgpu$ sudo cp ./nvgpu.ko ~/nvidia/35.3/Linux_for_Tegra/rootfs/usr/lib/modules/5.10.104-tegra/kernel/drivers/gpu/nvgpu/nvgpu.ko

3.zynq@zynq-virtual-machine:~/nvidia/35.3/Linux_for_Tegra/source/kernel_out$ cp arch/arm64/boot/Image ~/nvidia/35.3/Linux_for_Tegra/kernel/

4.zynq@zynq-virtual-machine:~/nvidia/35.3/Linux_for_Tegra/source/kernel_out$ cp arch/arm64/boot/dts/nvidia/* ~/nvidia/35.3/Linux_for_Tegra/kernel/dtb/

5.sudo ./apply_binaries.sh

6.sudo ./tools/l4t_create_default_user.sh -u ys -p 123456

7.sudo ./tools/l4t_flash_prerequisites.sh

8.sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1
-c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml”
–showlogs --network usb0 jetson-orin-nano-devkit internal

Serial port print after boot:

Basically same reason to crash as this topic.

Thank you for your reply.
Now I follow the above steps, the screen does not show, serial debugging is normal. How can I solve the problem of no display screen?

Now I follow the above steps, the screen does not show, serial debugging is normal. How can I solve the problem of no display screen?

請問是不是沒有看懂上面那篇文…

你換了kernel image之後有任何kernel module打到-22 error的話就代表其他kernel module driver也需要換

display driver有另外三個.ko檔是在另外一份source code. 你現在nvidia.ko這一個就是其中一份driver.

Kernel Customization — Jetson Linux Developer Guide documentation
I followed the documentation and replaced the image, the device tree and nvgpu.ko. Development board boot screen has no display, unable to enter the desktop.

请问一下 其他kernel module driver 如何更换?

display相關的driver → nvidia.ko/nvidia-drm.ko/nvidia-modeset.ko
你可以直接在/lib/modules/5.10.104-tegra/kernel/ 做搜尋就會看到了




这三个文件我在Linux_for_Tegra/rootfs/文件中可以找到。但是在我编译kernel输出的文件中没有找到。

zynq@zynq-virtual-machine:~/nvidia/35.3/Linux_for_Tegra/rootfs$ find -name nvidia.ko
./usr/lib/modules/5.10.104-tegra/extra/opensrc-disp/nvidia.ko
zynq@zynq-virtual-machine:~/nvidia/35.3/Linux_for_Tegra/rootfs$ find -name nvidia-drm.ko
./usr/lib/modules/5.10.104-tegra/extra/opensrc-disp/nvidia-drm.ko
zynq@zynq-virtual-machine:~/nvidia/35.3/Linux_for_Tegra/rootfs$ find -name nvidia-modeset.ko
./usr/lib/modules/5.10.104-tegra/extra/opensrc-disp/nvidia-modeset.ko


这个是搜索这三个文件的路径。

To Build the Kernel

  1. Sync or download and expand the kernel sources, and install the kernel build utilities, as described above.
  2. If you are cross-compiling on a host system (for example, anything other than the Jetson device for which you are building), export the following environment variables:

$ export CROSS_COMPILE_AARCH64_PATH= $ export CROSS_COMPILE_AARCH64=/bin/aarch64-buildroot-linux-gnu-

See Jetson Linux Toolchain for information about how to download and build the reference toolchains.
3. Enter the command:

$ mkdir kernel_out

Where is the directory where the compiled kernel is to be written.kernel_out
4. Build the kernel:

$ ./nvbuild.sh -o $PWD/kernel_out

Note

nvbuild.sh is only included in the tar file that is part of . If the kernel sources were synced from the Git server, you need to manually copy from the tar file.kernel_src.tbz2 public_sources.tbz2 nvbuild.sh

  1. Replace with a copy of this file:Linux_for_Tegra/rootfs/usr/lib/modules/$(uname -r)/kernel/drivers/gpu/nvgpu/nvgpu.ko

$kernel_out/drivers/gpu/nvgpu/nvgpu.ko

  1. For the device tree, replace the files in with a copy from:Linux_for_Tegra/kernel/dtb/

$kernel_out/arch/arm64/boot/dts/nvidia/

  1. Replace with a copy of this file:Linux_for_Tegra/kernel/Image

$kernel_out/arch/arm64/boot/Image

我按照上面的步骤操作的,现在开机串口调试可以正常使用,开机时UEFI logo屏幕上可以显示,然后就黑屏了,无法显示桌面。请问一下我是掉了那个步骤吗?如何解决这个问题呢?

public_sources.tbz2 裡面有另外一包獨立的display driver source. 你找不到的那三份ko會從那裡build出來.

你好!请问一下public_sources.tbz2是从网上下载下来的吗?我这个下载过这个文件,但是在这个文件的压缩包里面没有看到display driver source文件

1731045388568
请问一下是这个文件吗?我需要怎么操作?解压出来吗?

https://docs.nvidia.com/jetson/archives/r35.6.0/DeveloperGuide/SD/Kernel/KernelCustomization.html#to-build-display-kernel-modules

感谢!请问一下按照这个教程编译其中
SYSSRC=
SYSOUT=<KERNEL_OUTDIR>

这两条命令中KERNELSRC 目录是填写:SYSSRC=~/nvidia/35.3/Linux_for_Tegra/source/public/kernel/kernel-5.10

KERNEL_OUTDIR 目录填写:KERNEL_OUTDIR=~/nvidia/35.3/Linux_for_Tegra/source/kernel_out

请问一下是这样填写吗?

對的 你這樣寫沒錯


编译的时候报错

kernel source那邊有先編譯過嗎?