Custom kernel deployment on L4T 32.3.1

Hi,

since L4T 32.3.1, kernel, kernel-headers and dtb files are deployed as deb package. Is there any guide on how to create deb-packages for a custom kernel? I would like to provide a self-hosted debian repository containing custom kernel and device tree packages.

Thanks,
Markus

For the custom kernel you just need to replace the kernel image at /boot/Image
For the device tree you need to replace the dtb file at …/Linux_for_tegra/kernel/dtb/xxxx.dtb before flash the device.

You may find some useful information from below.
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fflashing.html%23

So it is the same procedure as in previous L4T versions? Does that mean that the *.deb files in the kernel directory are currently not used? I assumed that it is now possible to deploy kernel updates using the deb packages because there exists these packages in the kernel directory:

nvidia-l4t-kernel_4.9.140-tegra-32.3.1-20191209230245_arm64.deb
nvidia-l4t-kernel-dtbs_4.9.140-tegra-32.3.1-20191209230245_arm64.deb
nvidia-l4t-kernel-headers_4.9.140-tegra-32.3.1-20191209230245_arm64.deb

Maybe you could clarify how it should be used? Unfortunately it doesn’t seem to be documented in the docs.

Thanks,
Markus

Those file are used for the guys don’t need any customize kernel, if you need customize kernel you need to replace the Image and dtb files.

Hi ShaneCCC,

thanks for the information. Could you give me some answers to the following questions, please, just for clarification:

  1. If I use a custom kernel, I should avoid installing the nvidia-l4t-kernel and nvidia-l4t-kernel-dtbs packages? Otherwise, future kernel updates would overwrite the custom kernel, right?

  2. To update a custom kernel, I just have to replace the Image and the dtb files? Is that correct? So no flashing is required, right?

Thanks,
Markus

1 Like

I would suggest to use sdkmanager to install the image and replace the /boot/Image and update the dtb file by replace the …/Linux_for_Tegra/kernel/dtb/tegra186-quill-p3310-1000-c03-00-base.dtb and flash by below command

sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1

I would like to update kernel and device tree over the air so that our customers do not have to flash the device over usb. That is why I am interested in deploying these files as debian package. My plan is now to create a copy of the nvidia provided debian packages (nvidia-l4t-kernel, nvidia-l4t-kernel-dtbs) with a different name. Then I replace the content with my custom kernel and dtb files, put the packages in a custom repository and install these packages instead the nvidia ones. Would this work or are there any pitfalls with that approach?

1 Like

You may have a reference to below link

https://devtalk.nvidia.com/default/topic/1051983/jetson-nano/howto-update-dtb-on-jetson-nano/post/5348696/#5348696

https://developer.ridgerun.com/wiki/index.php?title=Jetson_Nano/Development/Building_the_Kernel_from_Source