open-gpu-kernel-modules icon indicating copy to clipboard operation
open-gpu-kernel-modules copied to clipboard

Set INSTALL_MOD_DIR only if it's not defined

Open keelung-yang opened this issue 1 year ago • 1 comments

As described in Compiling the Kernel (Kernel 5.15) section of NVIDIA DRIVE OS Linux SDK Developer Guide v6.0.8.1, nvidia*.ko are copied into extra/opensrc-disp manually:

mkdir -p $NV_WORKSPACE/drive-linux/kernel/source/oss_src/out-linux/lib/modules/<kernel_version>/extra/opensrc-disp/
cd kernel-open
cp nvidia.ko nvidia-modeset.ko nvidia-drm.ko $NV_WORKSPACE/drive-linux/kernel/source/oss_src/out-linux/lib/modules/<kernel_version>/extra/opensrc-disp/

So, the INSTALL_MOD_DIR should be set to extra/opensrc-disp at least in DriveOS 6.0.8.1 if make modules_install is used instead of copying them manually.

But in kernel-open/Makefile, INSTALL_MOD_DIR is set to kernel/drivers/video forcefully:

KBUILD_PARAMS += INSTALL_MOD_DIR=kernel/drivers/video

So INSTALL_MOD_DIR should be set only if it's not specified, such as INSTALL_MOD_DIR=extra/opensrc-disp make modules_install should works if users want to install them into another directory but kernel/drivers/video.

keelung-yang avatar Nov 01 '23 07:11 keelung-yang