Kernel Compilation for Nvidia Nano B01 Board


I am building WIFI backports driver modules for Jetson Nano B01 platform. Below are the packages and versions used for the build:
Linux Driver Package -32.7.3
JetPack - 4.6.3
Kernel version - 4.9.299 tegra
Infineon wifi backport package- v5.15.58-backports

I am facing an issue after compilation of nvidia kernel source ,that is, after generation of compiled kernel source. I have followed the steps for Jetson nano kernel 4.9 build and headers installation as listed below :

1.Manually downloaded the latest kernel source package 32.7.3 from the below link.

Also, downloaded and extracted the Jetson Linux toolchain from the below link.

  1. The paths for the toolchain and kernel output directory are set for Jetson Nano Linux kernel as mentioned below :
  • export TEGRA_KERNEL_OUT=/home/eng/Documents/NvidiaNano/L4T_Kernel_Blt
  • export CROSS_COMPILE=/home/eng/Documents/NvidiaNano/Env_Setup/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
  • export ARCH=arm64
  • export LOCALVERSION=“-tegra”

3.Cleaning the kernel for a clean build and Jetson nano configuration is made as the default configuration in kernel, which is tegra_defconfig as shown in the below commands :

  • make distclean
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” CROSS_COMPILE=“${CROSS_COMPILE}” tegra_defconfig
  1. The kernel is configured with respect to WIFI by setting the flags as mentioned below in the menuconfig.
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” menuconfig

Setting the below configuration in .config file.

  1. After configuring the kernel with respect to WIFI, kernel configuration is saved through the below command :
  1. Compilation of the kernel and image file generation in the output kernel directory,that is ,L4T_Kernel_Blt .
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=“-tegra” -j8
  1. The images -Image,Image.gz and dts are generated in the output kernel directory .The Linux kernel image and dts are stored in arch/arm64/boot/Image and arch/arm64/boot/dts respectively. They are copied to JetPack 4.6.3 release packages in the below path :


  1. The kernel modules and firmware is installed through the below command :
  • sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install INSTALL_MOD_PATH=~/nvidianew/nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/rootfs/
  1. Running the in JetPack4.6.3 release package and copy the kernel_supplements.tbz2 from rootfs to kernel in Jetpack package.

*cp ~/nvidianew/nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/rootfs/kernel_supplements.tbz2 ~/nvidianew/nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/kernel

  1. The kernel headers for Jetson nano kernel is extracted and then prepared through the below commands :
  • mkdir FMAC_module
  • mkdir mod_dep
  • cd mod_dep
  • tar -xjf /nvidia_sdk/JetPack_4.6.3_Linux_JETSON_NANO_TARGETS/Linux_for_Tegra/kernel/kernel_headers.tbz2
  • make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j8 modules_prepare

Here, kernel source is prepared using the above command.
I have used the directory $TEGRA_KERNEL_OUT as the kernel directory for building out of tree modules

  1. Kernel headers are installed through the below step:
  • make ARCH=arm64 INSTALL_HDR_PATH=$TEGRA_KERNEL_OUT headers_install

The screenshots for headers install is shown below in the screenshot:

I was getting an issue while creating softlink for include directory inside usr directory as include directory is not there in usr.

ln -s include ./usr/include/
After installing headers in Kernel output directory ,which is compiled kernel,include folder inside usr is not getting generated as shown below in screenshot. Does the include directory gets generated inside usr directory after jetson kernel compilation and kernel headers installation ?

See also: Building WIFI-brcmfmac backports on 32.7.3 for Jetson Nano B01 board - Jetson & Embedded Systems / Jetson Nano - NVIDIA Developer Forums

Hi kaycc,
That was my previous post on backport
I wanted to know about the include folder why it didnt generate after nvidia kernel compilation in output_kernel_directory/usr/include.?

Do the include folder gets generated inside output_directory/usr after compiling nvidia kernel source and installing kernel headers?