Display doesnt work with custom kernel

I need to use a custom kernel on my carrier board due to a few missing features in the stock kernel.
The issue is device tree independent and I can boot my custom DT with the stock kernel and the displays works.
When booting the custom kernel, the display never comes up and I’ve tracked this down to the display drivers in <kernel_mods>/extra missing. I saw another thread on this and the obvious attempt to copy these drivers to the new kernel didnt work since the module.symvers dont match.
I tried compiling the driver from the nvidia_display_driver_source package in the sources bundle but the makefiles are complicated and dont seem to be set up in a way to allow cross compiling. Compiling on device isnt practical since I would need to copy the build sources over and eventually this needs to be automated to build on a single host.

I have two questions:

  1. Why doesnt nvidia just include this as part of the kernel build process?
  2. is there a way to cross compile this? My kernel build setup also uses the O=builddir build method so the sources and config are never together.

There should be a readme file inside the tarball. Have you tried that?

Also, have you tried to directly add the pre-build drivers from default BSP and see if it works? I notice there may be something else causing the error but not the post you pasted.

BTW, share us the log instead of only telling symptoms.

The default BSP drivers do not work due to the symbol mismatch. They have to be compiled against the custom kernel.
There is no readme in this version of the driver sources. I found one in the EA version of the driver that I happen to have and was able to make it compile.

I wrote a little helper script to make it easy. Hopefully others will find this useful.

# Build tool for nvidia display driver to cross-compile on an x86 host
# finished modules will be in $DRIVER_SOURCE_DIR/kernel-open

# OPTIONAL: set if using external toolchain (linaro, etc). Must match toolchain used to compile kernel
# Cross-compiler prefix
# Path to display driver sources
# Full path to kernel build dir.
# Full path to kernel sources dir

# sets up toolchain path if building with other toolchain.
if [ -n "$TOOLCHAIN_PATH" ]; then
     export PATH="${PATH}:${TOOLCHAIN_PATH}"

make -C "$DRIVER_SOURCE_DIR" modules -j $(nproc) TARGET_ARCH=aarch64 ARCH=arm64 CC="${CROSS_PREFIX}gcc" \

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.