g12-common: Decommonize super partition size
authorNolen Johnson <johnsonnolen@gmail.com>
Tue, 11 Jul 2023 20:54:28 +0000 (16:54 -0400)
committerNolen Johnson <johnsonnolen@gmail.com>
Sat, 30 Sep 2023 17:19:42 +0000 (17:19 +0000)
Calculate dynamic partition size based on the super partition size
defined by the targets.

Change-Id: I574742d5798338eb98c6f229977bd4aebf4e22f0
(cherry picked from commit 5d88d48d4000766450e7d76a54df131be8ade3b1)

BoardConfigCommon.mk

index c4e4260ecda02037740bb3a57c9954da5bf1158b..adaa0ce9fe7e1451ec8922bc77199c611ad17161 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)