Problem building nvdisplay display driver for Orin AGX with Jetpack 5.1.3

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

Hi,
If the device cannot be flashed/booted, please refer to the page to get uart log from the device:
Jetson/General debug - eLinux.org
And get logs of host PC and Jetson device for reference. If you are using custom board, you can compare uart log of developer kit and custom board to get more information.
Also please check FAQs:
Jetson AGX Orin FAQ
If possible, we would suggest follow quick start in developer guide to re-flash the system:
Quick Start — NVIDIA Jetson Linux Developer Guide 1 documentation
And see if the issue still persists on a clean-flashed system.
Thanks!

Sorry but this reply isn’t helpful or really even on topic. Nothing I am doing has anything to do with flashing or a custom board.

Just to make sure I understand your issue

  1. You said you follow the document but hit build error when building nvdisplay kernel modules.
  2. You tried something but no help.

So one question from my side first. Did you build the NVIDIA kernel image and modules before you build the display drivers?

Hi @WayneWWW , thanks for the reply.

Yes that’s what is happening. I have tried the documentation multiple times on both 5.1.3 jetpacks and 5.1. I have also tried both using a full kernel build and/or a modules_prepare before attempting to build the display driver. I can confirm that the files that are failing to be found do indeed exist. I have also manually added them to the make call using CFLAGS as well as copying them into the driver’s source folder pre-make call but nothing seems to be letting make find them.

I think the best way here is you just list out every commands you have done and also the build log as a text file and attach them here for us to review.

Will do.

Here is my build process in a script, I have invoked it as

./build_display_driver.sh --toolchain ../../toolchains/aarch64-buildroot-linux-gnu --kernel-sources ../../kernels/cartken_5_1_3/kernel/kernel

here is the full set -x log of that script

display_driver.txt (551.9 KB)

The script (remove the .txt)

build_display_driver.sh.txt (4.2 KB)

Note: the script currently has IGNORE_MISSING_MODULE_SYMVER=1 but it could be that this is the underlying issue?

Please change this

SYSSRC=/home/alxhoff/git/Github/kernel_builder/kernels/cartken_5_1_3/kernel/kernel

to

SYSSRC=/home/alxhoff/git/Github/kernel_builder/kernels/cartken_5_1_3/kernel/kernel/kernel-5.10

the folder “kernel” on the first line is the kernel-5.10 folder from the kernel_src tar, I just rename them as all the different jetpacks call them different things so i always rename them to kernel so that my tooling can handle different jetpacks.

I have also already tried renaming the foder to kernel-5.10 incase something was hardcoded but this didn’t help

So does this file exist in this path or not?

home/alxhoff/git/Github/kernel_builder/kernels/cartken_5_1_3/kernel/kernel/include/uapi/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory

yes, see my original post

I would say please do not do such rename things as nobody is asking you to do that.

Not sure what would really happen after you did that.

Please rename all the things back to default and just run the build process again and share logs.

The only thing I rename is the kernel folder and as I said I have tried with it in it’s original name.

Then could you share out the result /log based on this original one?

I believe everything you said but please be aware that I am just a stranger to you on the other side of earth. Such comment like “yeah I tried that too” really cannot prove anything.
You must give out the log so that we can tell what is wrong on your side.

Sure. Here is the log, I have ommited the full kernel build but you can see the files do exist

display_driver.txt (17.4 KB)

f types.h | grep uapi                                                                                                     Wed 12 Mar 2025 12:46:16 PM CET
./kernel-5.10/tools/testing/selftests/rcutorture/formal/srcu-cbmc/empty_includes/uapi/linux/types.h
./kernel-5.10/tools/include/uapi/linux/types.h
./kernel-5.10/arch/s390/include/uapi/asm/types.h
./kernel-5.10/arch/arm/include/uapi/asm/types.h
./kernel-5.10/arch/xtensa/include/uapi/asm/types.h
./kernel-5.10/arch/mips/include/uapi/asm/types.h
./kernel-5.10/arch/ia64/include/uapi/asm/types.h
./kernel-5.10/arch/powerpc/include/uapi/asm/types.h
./kernel-5.10/arch/alpha/include/uapi/asm/types.h
./kernel-5.10/arch/parisc/include/uapi/asm/types.h
./kernel-5.10/arch/arm64/include/generated/uapi/asm/types.h
./kernel-5.10/include/uapi/asm-generic/types.h
./kernel-5.10/include/uapi/linux/iio/types.h
./kernel-5.10/include/uapi/linux/types.h
./kernel-5.10/include/uapi/linux/sched/types.h

What are the files in this one?

SYSOUT=/home/alxhoff/git/Github/kernel_builder/scripts/display_driver/build

I don’t put anything in there. I have just removed all build folders and rerun the script and it seems to be empty.

I will do a fresh run now with a full kernel build