How to build/generate linux header deb package from Jetson Linux kernel source code

Hi,

We follow Kernel Customization — NVIDIA Jetson Linux Developer Guide 1 documentation to custom our own kernel from Jetson Linux kernel source code.

But there is no instruction for building linux header deb package, could you please share the reference document/instructions for building/generating linux headers ?

Check below topic.

This topic is not same with my.

My topic is: how to gnerate/build “Linux_for_Tegra/kernel/nvidia-l4t-kernel-headers_5.15.136-tegra-36.3.0-20240506102626_arm64.deb” from kernel source code.

Duo to we built our own kernel, and cannot update “nvidia-l4t-kernel-headers_xxx_arm64.deb” with " nvdebrepack.sh".

We need the method for building “nvidia-l4t-kernel-headers_xxx_arm64.deb”.

由于我们自己编译了内核,虽然我们的编译的内核源码来自于LT4,但是其中的内核config改动很大,也就是有很多内核头文件以及“Module.symvers”文件都与JetPack OS(Ubuntu)自带的header中的不匹配,因此我们需要自行生成linux header。

因此我们需要一个官方的生成“nvidia-l4t-kernel-headers_xxx_arm64.deb”的方法。

我根据Ubuntu 官方wiki编译( KernelTeam/ARMKernelCrossCompile - Ubuntu Wiki),无法通过编译。
内核源码是从https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v4.3/sources/public_sources.tbz2 这里下载的。

Hi chunjiao.zhao,

Are you using the devkit or custom board for Orin NX?
What’s the Jetpack version in use?

Please help to clarify what’s your use case to generate custom deb package.

I would suggest you refer to Software Packages and the Update Mechanism — NVIDIA Jetson Linux Developer Guide 1 documentation for how to repack debian packages.

Hi KevinFFF

Thanks for your help.

I’m using custom board and with Jetson Orin NX SOM.
The JetPack version is 6.0.

I know repacking debian package can help me, but it is not a formal way.

The formal way is generating a linux headers debian package from kernel source code.

From Jetson Linux source code(https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v3.0/sources/public_sources.tbz2), we can find that there is a folder named “debian.nvidia-tegra”, I guess that kernel packages(including linux headers package) should be built from it. May be it is not a official recommended way of NVIDIA, so I want to learn about the recommended way from NVIDIA to build kernel packages.

The kernel packages refer to these files below:

./Linux_for_Tegra/kernel/kernel_headers.tbz2
./Linux_for_Tegra/kernel/nvidia-l4t-kernel-headers_5.15.136-tegra-36.3.0-20240506102626_arm64.deb

Please note that this debian package is included in BSP package by default.

The suggested method to update those debian package is to use nv_repackager.sh and nvdebrepack.sh and you can find the instruction in Repackaging Debian Packages.

Do you have the requirement to release your custom kernel debian package on server?
If not, you can refer to the steps in Kernel Customization to update the related kernel image/dtb which will include all you custom modifications. And you can use them to generate custom image-based OTA package to update the board.

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