nvidia-kernel-oot: fix a build issue

A build issue was observed as follows:
| .../kernel-source/Makefile:672: include/config/auto.conf: No such file or directory
| make[1]: *** [Makefile:226: __sub-make] Error 2
| make[1]: Leaving directory '.../kernel-source'
| make: *** [Makefile:63: hwpm] Error 2

it's not always reproduced, but occasionally happens when we add
patches to nvidia-kernel-oot.

The root cause of this problem is in nvidia-kernel-oot's Makefile, it
goes into ${KERNEL_SRC} instead of ${STAGING_KERNEL_DIR} to build,
which is wrong when building modules/dtbs, because there are no config
files generated in kernel source.

Let's change ${KERNEL_SRC} to ${STAGING_KERNEL_DIR}.

Signed-off-by: Ming Liu <liu.ming50@gmail.com>
This commit is contained in:
Ming Liu
2024-11-11 13:29:41 +01:00
committed by Matt Madison
parent 67637b4a0d
commit cfe0220947
2 changed files with 5 additions and 5 deletions

View File

@@ -89,7 +89,7 @@ index ad7dc07..64bec51 100644
- $(MAKE) -j $(NPROC) ARCH=arm64 \
- -C $(KERNEL_OUTPUT) \
+ $(MAKE) ARCH=arm64 \
+ -C $(KERNEL_SRC) \
+ -C $(KERNEL_PATH) \
M=$(MAKEFILE_DIR)/hwpm/drivers/tegra/hwpm \
+ MODLIB=$(MODLIB) \
CONFIG_TEGRA_OOT_MODULE=m \
@@ -102,7 +102,7 @@ index ad7dc07..64bec51 100644
- $(MAKE) -j $(NPROC) ARCH=arm64 \
- -C $(KERNEL_OUTPUT) \
+ $(MAKE) ARCH=arm64 \
+ -C $(KERNEL_SRC) \
+ -C $(KERNEL_PATH) \
M=$(MAKEFILE_DIR)/nvidia-oot \
+ MODLIB=$(MODLIB) \
CONFIG_TEGRA_OOT_MODULE=m \
@@ -117,7 +117,7 @@ index ad7dc07..64bec51 100644
- $(MAKE) -j $(NPROC) ARCH=arm64 \
- -C $(KERNEL_OUTPUT) \
+ $(MAKE) ARCH=arm64 \
+ -C $(KERNEL_SRC) \
+ -C $(KERNEL_PATH) \
M=$(MAKEFILE_DIR)/nvgpu/drivers/gpu/nvgpu \
+ MODLIB=$(MODLIB) \
CONFIG_TEGRA_OOT_MODULE=m \
@@ -177,7 +177,7 @@ index ad7dc07..64bec51 100644
@echo "make $(MAKECMDGOALS) - nvidia-display ..."
@echo "================================================================================"
- $(MAKE) -C $(NVIDIA_HEADERS) \
+ $(MAKE) -C $(KERNEL_SRC) \
+ $(MAKE) -C $(KERNEL_PATH) \
+ KERNEL_MODLIB=$(MODLIB) \
M=$(MAKEFILE_DIR)/nvdisplay/kernel-open modules_install

View File

@@ -62,7 +62,7 @@ TEGRA_OOT_REPLACEMENT_DRIVERS = "\
"
EXTRA_OEMAKE += '\
IGNORE_PREEMPT_RT_PRESENCE=1 \
IGNORE_PREEMPT_RT_PRESENCE=1 KERNEL_PATH="${STAGING_KERNEL_DIR}" \
CC="${KERNEL_CC}" CXX="${KERNEL_CC} -x c++" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
OBJCOPY="${KERNEL_OBJCOPY}" \
'