Hello,
I am having issues building the display driver using the Jetpack 5.1.3 BSP sources, which I need as I have my own custom 5.1.3 kernel. I have been using the documentation here and the forum posts here and here.
I have noticed that the JP 5.1.3 (R35.5) documentation talks about the folder inside the tbz2 to be called NVIDIA-kernel-module-source- which is incorrect for the 5.1.3 jetpack, but correct for JP 5.1 where the documentation seems to of been inherited from. I just want to sanity check that the nvidia_kernel_display_driver_source.tbz2 inside the BSP sources for JP 5.1.3 is correct despite the folder being called nvdisplay once un-tard.
But regardless if I script the entire thing or run it manually step by step (which I have done multiple times) I always end up at the same error
The Module.symvers file is missing, or does not contain any
symbols exported from the kernel. This could cause the NVIDIA
kernel modules to be built against a configuration that does
not accurately reflect the actual target kernel.
The Module.symvers file check can be disabled by setting the
environment variable IGNORE_MISSING_MODULE_SYMVERS to 1.
Or if I force ignore, then I end up with an include error.
kernel/kernel/include/uapi/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory
5 | #include <asm/types.h>
| ^~~~~~~~~~~~~
which I have been unable to solve using any of the kernel include options (KSRC, KERNEL_HEADERS, etc.), manual gcc (CFLAGS, etc.), so I don’t believe it should require this much manual intervention, so I am hopefully either missing something obvious or some crucial step is not in the documentation.
So the steps I have been doing, outside of those in the documentation is preparing my kernel_src with mrproper and configuring with my defconfig and a modules_prepare so I have my arch files. I can confirm that the file that is throwing me the error does exist
./kernel/kernel/arch/arm64/include/generated/uapi/asm/types.h
To be extremely safe, I have been exporting CROSS_COMPILE, CROSS_COMPILE_AARCH64 and CROSS_COMPILE_AARCH64_PATH to my aarch64-buildroot-linux-gnu- toolchain.
The SYSSRC I am using is my 5.1.3 kernel located elsewhere on my host machine.
This makes my final command invoked
make modules \
TARGET_ARCH=aarch64 ARCH=arm64 \
CC=/home/alxhoff/git/Github/kernel_builder/toolchains/aarch64-buildroot-linux-gnu/bin/aarch64-buildroot-linux-gnu-gcc \
LD=/home/alxhoff/git/Github/kernel_builder/toolchains/aarch64-buildroot-linux-gnu/bin/aarch64-buildroot-linux-gnu-ld.bfd \
AR=/home/alxhoff/git/Github/kernel_builder/toolchains/aarch64-buildroot-linux-gnu/bin/aarch64-buildroot-linux-gnu-ar \
CXX=/home/alxhoff/git/Github/kernel_builder/toolchains/aarch64-buildroot-linux-gnu/bin/aarch64-buildroot-linux-gnu-g++ \
OBJCOPY=/home/alxhoff/git/Github/kernel_builder/toolchains/aarch64-buildroot-linux-gnu/bin/aarch64-buildroot-linux-gnu-objcopy \
SYSOUT=/home/alxhoff/git/Github/kernel_builder/scripts/display_driver/build \
SYSSRC=/home/alxhoff/git/Github/kernel_builder/kernels/cartken_5_1_3/kernel/kernel
with or without IGNORE_MISSING_MODULE_SYMVERS=1
The kernel folder mentioned on the last line is the kernel-5.10 folder found in the BSP files.
Any help would be great as I am a bit stumped as to why such a standard file isn’t able to be found.
Cheers