kernel: Replace BOARD_SYSTEM_KERNEL_MODULES with SYSTEM_KERNEL_MODULES
Commit 47931c1 introduced GKI modules handling with the assumption
that using BOARD_SYSTEM_KERNEL_MODULES would still work in Android 14,
but turns out that it conflicts with build/make/core rules.
Change-Id: I9167940c08b8420be254c52698f1faa2e3e7f793
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
index f195ca3..b70a7fe 100644
--- a/build/tasks/kernel.mk
+++ b/build/tasks/kernel.mk
@@ -460,16 +460,16 @@
; mv $$(find $$kernel_modules_dir -name $(word 1,$(p))) $$kernel_modules_dir/$(word 2,$(p))); \
all_modules=$$(find $$kernel_modules_dir -type f -name '*.ko'); \
filtered_modules=""; \
- $(if $(BOARD_SYSTEM_KERNEL_MODULES),\
- gki_modules=$$(for m in $(BOARD_SYSTEM_KERNEL_MODULES); do \
+ $(if $(SYSTEM_KERNEL_MODULES),\
+ gki_modules=$$(for m in $(SYSTEM_KERNEL_MODULES); do \
p=$$(find $$kernel_modules_dir -type f -name $$m); \
- if [ -n "$$p" ]; then echo $$p; else echo "ERROR: $$m from BOARD_SYSTEM_KERNEL_MODULES was not found" 1>&2 && exit 1; fi; \
+ if [ -n "$$p" ]; then echo $$p; else echo "ERROR: $$m from SYSTEM_KERNEL_MODULES was not found" 1>&2 && exit 1; fi; \
done); \
[ $$? -ne 0 ] && exit 1; \
($(call build-image-kernel-modules-lineage,$$gki_modules,$(SYSTEM_KERNEL_MODULES_OUT),$(SYSTEM_KERNEL_MODULE_MOUNTPOINT)/,$(SYSTEM_KERNEL_DEPMOD_STAGING_DIR),$(BOARD_SYSTEM_KERNEL_MODULES_LOAD),/$(GKI_SUFFIX))); \
filtered_modules=$$(for n in $$all_modules; do \
module_name=$$(basename $$n); \
- if [[ ! "$(BOARD_SYSTEM_KERNEL_MODULES)" =~ "$$module_name" ]]; then echo $$n; fi; \
+ if [[ ! "$(SYSTEM_KERNEL_MODULES)" =~ "$$module_name" ]]; then echo $$n; fi; \
done); \
($(call build-image-kernel-modules-lineage,$$filtered_modules,$(KERNEL_MODULES_OUT),$(KERNEL_MODULE_MOUNTPOINT)/,$(KERNEL_DEPMOD_STAGING_DIR),$(BOARD_VENDOR_KERNEL_MODULES_LOAD),/)); \
,\