Use modules.load for vendor ramdisk modules
vendor_boot.img is no longer built on 6.1 kernel codebase hence
vendor_boot.modules.load no longer exists. We can use modules.load
instead which is same as vendor_boot.modules.load but always exist.
Flag: EXEMPT build file update
Bug: 343042291
Test: build oriole-zvs1-userdebug
build oriole-trunk_pixel_kernel_61-userdebug
Change-Id: I7e5028ca4cc710367ddc5b161e006b8e7c25de80
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
index a5e752d..08b3a73 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -366,7 +366,12 @@
BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD_EXTRA = $(foreach k,$(BOARD_PREBUILT_VENDOR_RAMDISK_KERNEL_MODULES),$(if $(wildcard $(KERNEL_MODULE_DIR)/$(k)), $(k)))
# Kernel modules that are listed in vendor_boot.modules.load
-BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD_FILE := $(strip $(shell cat $(KERNEL_MODULE_DIR)/vendor_boot.modules.load))
+# Starting from 6.1, use modules.load instead. It lists modules for vendor ramdisk regardless of the partition name.
+ifneq ($(wildcard $(KERNEL_MODULE_DIR)/modules.load),)
+ BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD_FILE := $(strip $(shell cat $(KERNEL_MODULE_DIR)/modules.load))
+else
+ BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD_FILE := $(strip $(shell cat $(KERNEL_MODULE_DIR)/vendor_boot.modules.load))
+endif
ifndef BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD_FILE
$(error vendor_boot.modules.load not found or empty)
endif