From 2648454f4f0a84d6d0c3fcdc2abe75e773549994 Mon Sep 17 00:00:00 2001 From: Woomymy Date: Sat, 18 Mar 2023 16:09:51 +0100 Subject: [PATCH] X6833B: Build a vendor_dlkm image * vendor_dlkm contains kernel modules that were previously located to /vendor/lib/modules and is updatable separately, making us able to test kernel modifications faster * Reference: https://source.android.com/docs/core/architecture/partitions/vendor-odm-dlkm-partition Signed-off-by: Woomymy Change-Id: I38f5989d4e5a52bf295add8099f6bf6cb8ea3288 Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com> --- BoardConfig.mk | 6 +++++- device.mk | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/BoardConfig.mk b/BoardConfig.mk index 06ef6cf..3dd4540 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -69,6 +69,7 @@ RECOVERY_MODULES := $(addprefix $(KERNEL_PATH)/modules/, $(BOARD_VENDOR_RAMDISK_ # Prevent duplicated entries (to solve duplicated build rules problem) BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(sort $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES) $(RECOVERY_MODULES)) +# Vendor modules (installed to vendor_dlkm) BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_PATH)/modules.load)) BOARD_VENDOR_KERNEL_MODULES := $(addprefix $(KERNEL_PATH)/modules/, $(BOARD_VENDOR_KERNEL_MODULES_LOAD)) @@ -81,19 +82,22 @@ BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 67108864 BOARD_SUPER_PARTITION_SIZE := 9126805504 BOARD_SUPER_PARTITION_GROUPS := mtk_dynamic_partitions -BOARD_MTK_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor product +BOARD_MTK_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor product vendor_dlkm BOARD_MTK_DYNAMIC_PARTITIONS_SIZE := 9122611200 BOARD_EROFS_PCLUSTER_SIZE := 262144 BOARD_USES_METADATA_PARTITION := true +BOARD_USES_VENDOR_DLKMIMAGE := true BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := erofs BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := erofs BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := erofs +BOARD_VENDOR_DLKMIMAGE_FILE_SYSTEM_TYPE := erofs TARGET_COPY_OUT_PRODUCT := product TARGET_COPY_OUT_VENDOR := vendor +TARGET_COPY_OUT_VENDOR_DLKM := vendor_dlkm # Platform TARGET_BOARD_PLATFORM := mt6789 diff --git a/device.mk b/device.mk index 96b53e3..c17887d 100644 --- a/device.mk +++ b/device.mk @@ -16,7 +16,8 @@ AB_OTA_PARTITIONS := \ vbmeta_system \ vbmeta_vendor \ vendor \ - vendor_boot + vendor_boot \ + vendor_dlkm AB_OTA_POSTINSTALL_CONFIG += \ RUN_POSTINSTALL_system=true \