Added new drivers to kernel

Hi,

I’m working on adding new camera drivers to the kernel (r36.2) for the Jetson Orin Nano board. I’ve been following the instructions from the NVIDIA Developer Guide: Jetson Linux Developer Guide r36.2 - Kernel Customization

However, after rebuilding the kernel from the default sources, I noticed that the DTB and boot/image files are different from the default images provided by the SDK Manager tool.

Is there a specific configuration or step that I need to follow to ensure the kernel is built correctly for the Jetson Orin Nano board, so it matches the default configuration provided by NVIDIA?

Hi mua,

Are you using the devkit or custom board for Orin Nano?

What do you mean about the DTB and kernel image are different?
Do you mean that the file name seems different?

Could you share the full flash log on your board for further check?

I used Jetson Orin nano devkit board.

I mean the size of the boot/image and Device Tree Blob (DTB) files are different in the manual rebuild kernel and Nvidia default image.

My goal is to keep the default Nvidia image and only append new camera drivers to avoid regression, could you tell me do I really need to rebuild the whole boot/image and Device Tree Blob (DTB) or if there is some other solution?

I think the size may not be the issue since you may have different customization in kernel and dtb. Is there any issue after you updating your kernel image/dtb?

I would suggest you can use overlay-dtb instead of modifying and rebuild kernel image.
If you want to add custom kernel driver, you can either loading it as loadable kernel module or rebuilding the kernel image.

@KevinFFF, thank you for your answer.

One issue I’ve encountered is that after using the kernel from the sources, the display port no longer works correctly; it freezes on the bootloader screen, although the rest of the system functions properly.

The overlay-dtb approach seems very promising. Do you have any guidance or instructions on how to correctly implement it on the Jetson Orin Nano r36.2? I found some basic steps but I’m not sure if I’m missing something important:

  1. Create a Device Tree Overlay Source (DTS) file.
  2. Compile the Device Tree Overlay:
    dtc -I dts -O dtb -o my-overlay.dtbo my-overlay.dts
  3. Load the Overlay on your Jetson Orin by adding this line to extlinux.conf:
    FDTOVERLAY /boot/.dtbo

However, how is the dtbo linked with the main dtb? I mean, where is the callback from the main dtb to the overlay? Do I need to make some specific registration to ensure that the overlay will be correctly utilized?

Please refer to Device Tree Overlays in JP6.0 DP (R36.2).

I’m confused about how to correctly load a Device Tree Blob Overlay (DTBO) in the latest version, r36.2. Could you please confirm if the following configuration for extlinux.conf is the correct way to do it?

LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
FDT /boot/dtb/kernel_tegra234-p3768-0000+p3767-0005-nv.dtb
INITRD /boot/initrd
APPEND ${cbootargs} root=PARTUUID=xxx rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 nv-auto-config
OVERLAY_DTB_FILE=“tegra234-p3767-camera-test-overlay.dtbo”

After starting the mentioned configuration, I haven’t noticed any differences and I don’t see any additional information (for example, in the dmesg output) related to the new DTBO. How can I verify that the DTBO was correctly loaded?

It should be something like the following.

LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
FDT /boot/dtb/kernel_tegra234-p3768-0000+p3767-0005-nv.dtb
OVERLAYS /boot/tegra234-p3767-camera-test-overlay.dtbo
INITRD /boot/initrd
APPEND ${cbootargs} root=PARTUUID=xxx rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 nv-auto-config

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