Recompiling Display Kernel Modules
Prerequisites
To recompile display kernel modules
- The
NVIDIA-kernel-module-source-<Version>.tar.xz
source code is supplied as a.xz
file. Untar the file. Its location is<NV_WORKSPACE>/drive-linux_src/
. - Export the required variables as per the Linux kernel compilation
steps:
export ARCH=arm64 export LOCALVERSION="-tegra" export CROSS_COMPILE=<NV_WORKSPACE>/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-
cd <NV_WORKSPACE>/drive-linux_src/NVIDIA-kernel-module-source-<Version>
export IGNORE_PREEMPT_RT_PRESENCE = 1
- Make the modules with following
command:
make \ modules \ SYSSRC=<KERNELSRC> \ SYSOUT=<KERNELSRC_OUTDIR> \ CC=<NV_WORKSPACE>/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-gcc \ LD=<NV_WORKSPACE>/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-ld.bfd \ AR=<NV_WORKSPACE>/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-ar \ CXX=<NV_WORKSPACE>/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-g++ \ OBJCOPY=<NV_WORKSPACE>/toolchains/aarch64--glibc--stable-2020.08-1/bin/aarch64-linux-objcopy \ TARGET_ARCH=aarch64 \ ARCH=arm64
- Modules are built under
<NV_WORKSPACE>/drive-linux_src/NVIDIA-kernel-module-source-<Version>/kernel-open
.