[Kernel Customization] How to Install Kernel Header & Modules

I have Jetson Orin Dev Kit (64GB). Have install Jetpack6.0 with rel36.

How to install kernel header & modules /lib/moduels/ of customize kernel where have
enable few Linux framework using config flag.
I would like to install header’s & modules.

Note, updating /boot/Image & copying /lib/moduels wont help to compile
own driver (.ko) locally hence needs latest kernel headers from customize kernel.

Please advise if any one has tried.


Here you can see instructions on how to cross-compile and install L4T kernel,



Can you please elaborate more about this?
You can try building kernel natively on the target, and use the same kernel source to build your own drivers.


I am able to build natively own kernel.
When trying to build modules, it looks for kernel header which is not the same I build the kernel.
x@ubuntu:~/Downloads/Linux_for_Tegra/source$ sudo make ARCH=arm64 O=kernel_out/ modules_install INSTALL_MOD_PATH=/home/xx/Downloads/Linux_for_Tegra/rootfs/

make[2]: *** [/usr/src/linux-headers-5.15.122-tegra-ubuntu22.04_aarch64/3rdparty/canonical/linux-jammy/kernel-source/Makefile:1842: modules_install] Error 1

Question is how to install locally build the kernel (including headers & modules) ?

Why are you setting INSTALL_MOD_PATH like this?

I build kernel natively, ran below command to install modules & headers, copy kernel boot image into /boot/ directory.

make modules -j4
make modules_install
sudo make headers_install

Rebooted the kernel.

Now I try to build my .ko & install, it says
insmod: ERROR: could not insert module kernel/kernel-jammy-src/drivers/x/x/x/x.ko: Unknown symbol in module

If steps found incorrect, please share the right way of doing it.


Can you please make a summary of every steps you are trying?
I just don’t know what you are doing now.

Be sure to include whether or not you set “CONFIG_LOCALVERSION” to “-tegra” or not. Include the result of “uname -r”, and what you see from “ls /lib/modules/”.