From e786690216147deff6375c816017a6cd481242ab Mon Sep 17 00:00:00 2001 From: Arian Date: Mon, 5 Jun 2023 09:38:42 +0200 Subject: [PATCH] sm6150-common: Commonize dynamic partitions Change-Id: If754f1d40d5dd7488a0137fa90d82dce89bbc1dd --- BoardConfigCommon.mk | 28 ++++++++++++++++++++++------ sm6150.mk | 3 +++ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index c983eab..1d79dc8 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -74,6 +74,7 @@ DEVICE_MATRIX_FILE := $(COMMON_PATH)/configs/hidl/compatibility_matrix.xml # Kernel BOARD_KERNEL_BASE := 0x00000000 +BOARD_KERNEL_IMAGE_NAME := Image.gz BOARD_KERNEL_PAGESIZE := 4096 BOARD_KERNEL_SEPARATED_DTBO := true @@ -87,21 +88,36 @@ BOARD_KERNEL_CMDLINE += service_locator.enable=1 BOARD_KERNEL_CMDLINE += lpm_levels.sleep_disabled=1 BOARD_KERNEL_CMDLINE += loop.max_part=7 -ifeq ($(strip $(PRODUCT_USE_DYNAMIC_PARTITIONS)),true) -BOARD_KERNEL_IMAGE_NAME := Image.gz # Enable DTB in bootimage and set header version BOARD_INCLUDE_DTB_IN_BOOTIMG := true BOARD_BOOTIMG_HEADER_VERSION := 2 -else -BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb -BOARD_BOOTIMG_HEADER_VERSION := 1 -endif BOARD_MKBOOTIMG_ARGS := --header_version $(BOARD_BOOTIMG_HEADER_VERSION) # Media TARGET_USES_ION := true TARGET_DISABLED_UBWC := true +# Partitions +BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions +BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor + +BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 + +ifneq ($(WITH_GMS),true) +BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE := 614400000 +BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 92160000 +BOARD_SYSTEM_EXTIMAGE_PARTITION_RESERVED_SIZE := 92160000 +endif + +TARGET_COPY_OUT_ODM := odm +TARGET_COPY_OUT_PRODUCT := product +TARGET_COPY_OUT_SYSTEM_EXT := system_ext +TARGET_COPY_OUT_VENDOR := vendor + # Platform TARGET_BOARD_PLATFORM := sm6150 diff --git a/sm6150.mk b/sm6150.mk index eb9b790..c9acaa9 100644 --- a/sm6150.mk +++ b/sm6150.mk @@ -274,6 +274,9 @@ DEVICE_PACKAGE_OVERLAYS += \ PRODUCT_ENFORCE_RRO_TARGETS += * +# Partitions +PRODUCT_USE_DYNAMIC_PARTITIONS := true + # Perf PRODUCT_PACKAGES += \ libqti-perfd-client