g12-common: Decommonize super partition size
authorNolen Johnson <johnsonnolen@gmail.com>
Tue, 11 Jul 2023 20:54:28 +0000 (16:54 -0400)
committerBruno Martins <bgcngm@gmail.com>
Tue, 11 Jul 2023 22:15:08 +0000 (00:15 +0200)
Calculate dynamic partition size based on the super partition size
defined by the targets.

Change-Id: I574742d5798338eb98c6f229977bd4aebf4e22f0

BoardConfigCommon.mk

index 480c86bcf4e58bc1af748becb0b68066828eb8c7..dbc0b0760802845931d6315b92acc3f23804ba04 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2021-2022 The LineageOS Project
+# Copyright (C) 2021-2023 The LineageOS Project
 #
 # SPDX-License-Identifier: Apache-2.0
 #
@@ -27,10 +27,9 @@ ADDITIONAL_PARTITIONS := odm product system_ext
 ALL_PARTITIONS := $(CORE_PARTITIONS) $(ADDITIONAL_PARTITIONS)
 
 BOARD_AMLOGIC_DYNAMIC_PARTITIONS_PARTITION_LIST := $(ALL_PARTITIONS)
-BOARD_AMLOGIC_DYNAMIC_PARTITIONS_SIZE := 1673527296 # (BOARD_SUPER_PARTITION_SIZE - "Reasonable Overhead of 4 MiB" 4194304)
+BOARD_AMLOGIC_DYNAMIC_PARTITIONS_SIZE := $(shell echo $$(($(BOARD_SUPER_PARTITION_SIZE) - 4194304))) # (BOARD_SUPER_PARTITION_SIZE - "reasonable overhead of 4 MiB" 4194304)
 BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true
 BOARD_SUPER_PARTITION_GROUPS := amlogic_dynamic_partitions
-BOARD_SUPER_PARTITION_SIZE := 1677721600
 BUILDING_SUPER_EMPTY_IMAGE := true
 
 ifneq ($(WITH_GMS),true)