From acf7138e366b9270f021f9a9a014d1f34473e213 Mon Sep 17 00:00:00 2001 From: Jacky Liu Date: Mon, 5 Aug 2024 11:59:57 +0800 Subject: [PATCH] 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 --- BoardConfig-common.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index a5e752d7..08b3a73e 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -366,7 +366,12 @@ BOARD_PREBUILT_VENDOR_RAMDISK_KERNEL_MODULES = fips140.ko 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