Jetson Nano Kernel and Kernel Tree compilation in device

I am trying to compile the jetson nano kernel using the jetson nano to compile. I am using the jetpack 4.3 with L4T 32.3.1, the main goal is to create a mipi driver for a custom sensor, I have managed to compile Image with the driver following the tutorials but I need to compile the Image with the appropiate kernel tree, I build the Image, the modules and the dtbs, then install the modules, replace Image file and dtb files in /boot/ folder, but when the kernel starts it is not loading the kernel tree that I have compiled, I can see that the Image is the one I compiled with the output of the uname command, and also the driver has log messages and I can see them in the syslog file.
In the syslog file I can see that the kernel is loading a different DTS file, it says “DTS File Name: /dvs/git/dirty/git-master_linux/kernel/kernel-4.9/arch/arm64/boot/dts/…/…/…/…/…/…/hardware/nvidia/platform/t210/porg/kernel-dts/tegra210-p3448-0000-p3449-0000-b00.dts” but that file is not in the kernel sources.
How can I make the kernel to load the new modified kernel tree?
Thank you.

It is probably loading from a partition. In the “/boot/extlinux/extlinux.conf” file try adding an FDT key/value pair to name the device tree file location. Pseudo entry:

   FDT /boot/someFile.dtb
1 Like

It kinda works, but when de new kernel tree is loaded, then the custom driver does not starts.

I don’t know what the changes are, and even if I did I’d probably need to be sitting at your system to figure it out, but basically it sounds like the device tree edits need to be examined.

You can find some documents for your particular release. The general list of releases:
…the R32.3.1 release:

Go to your release, and search for the " Jetson Nano Platform Adaptation Guide". This will have some information on device tree edits.

You might also be interested in the PINMUX spreadsheet for generating various device tree configurations. Look for the most recent version of the document here:$product,jetson_nano

The device tree tends to offer arguments to pass to drivers while loading. Often that information includes how to find the device, e.g., the physical address or the routing of lanes when wiring can be customized. Third party carrier boards often have extensive edits for their wiring layouts. If the driver cannot find the hardware, then there will not be a driver load.

Typically you would copy your version of the .dtb file into “/boot” or “/boot/dtb”, and then add an FDT entry in the extlinux.conf to point at the location of this file.

1 Like