Hi @azulu
I think there is a misunderstanding on how to compile the kernel sources.
You have to get the JetPack kernel sources from https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v4.0/sources/public_sources.tbz2
Install the following dependencies if you did not have installed them yet:
sudo apt install wget lbzip2 build-essential bc zip libgmp-dev libmpfr-dev libmpc-dev vim-common libncurses-dev bison flex libssl-dev libelf-dev
Here are some instructions and how compile the kernel-based sources so you can take it as a reference:
Go to the Linux_for_Tegra
directory
cd ~/nvidia/nvidia_sdk/JetPack_6.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra
Copy the file public_sources.tbz2
to the Linux_for_Tegra
directory and extract the files. For extracting the kernel and the NVIDIA out-of-tree modules from the public sources:
tar -xjf public_sources.tbz2 Linux_for_Tegra/source/kernel_src.tbz2 --strip-components 2
tar -xjf public_sources.tbz2 Linux_for_Tegra/source/kernel_oot_modules_src.tbz2 --strip-components 2
tar -xjf public_sources.tbz2 Linux_for_Tegra/source/nvidia_kernel_display_driver_source.tbz2 --strip-components 2
Export the following environment variables:
export DEVDIR=~/nvidia/nvidia_sdk/JetPack_6.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra
# Use your CROSS_COMPILE toolchain path
export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
export INSTALL_MOD_PATH=$DEVDIR/rootfs/
export KERNEL_HEADERS=$DEVDIR/sources/kernel/kernel-jammy-src
Create inside Linux_for_Tegra
a sources
directory. Then extract the kernel and the NVIDIA out-of-tree modules sources in the sources directory
cd $DEVDIR
mkdir sources
tar -xjf kernel_src.tbz2 -C sources tar -xjf kernel_oot_modules_src.tbz2 -C sources
tar -xjf nvidia_kernel_display_driver_source.tbz2 -C sources
Compile the kernel, device tree and modules. Go to the kernel directory
cd $DEVDIR/sources/kernel/kernel-jammy-src
Execute the default configuration. You can enable any kernel configuration if you wish.
make menuconfig
Go to the sources directory
cd $DEVDIR/sources
Compile the kernel
make -C kernel
Install the kernel
sudo -E make install -C kernel
Compile the dtb
make dtbs
Install the dtb
cp nvidia-oot/device-tree/platform/generic-dts/dtbs/* $DEVDIR/kernel/dtb/
Compile the Out-of-Tree modules
make modules
Install the modules
sudo -E make modules_install
After these steps are done you will have compiled the base kernel, device tree and modules for JetPack6.1