From 1495298df74922785e2ca8d6866dc4caeca839ed Mon Sep 17 00:00:00 2001 From: Preet Patel Date: Sun, 25 Nov 2018 12:03:57 +0530 Subject: [PATCH] core: Don't fail when system partition and reserved size are defined When BOARD_SYSTEMIMAGE_PARTITION_SIZE and BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE are both defined, the build will fail since it's defined in treble's common makefiles. To avoid this, if the device has a custom system partition size specified, set the reserved size to nothing and use the system partition size instead. Be sure to warn the build user of this change Taken from:- https://github.com/CypherOS/build/commit/7bdc90180abbd59f9665deb0f9dbb9b5aef3f553 --- core/config.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/config.mk b/core/config.mk index cb080763afc..2ef220f3290 100644 --- a/core/config.mk +++ b/core/config.mk @@ -968,8 +968,10 @@ ifeq ($(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),true) ifneq ($(BOARD_SYSTEMIMAGE_PARTITION_SIZE),) ifneq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),) -$(error Should not define BOARD_SYSTEMIMAGE_PARTITION_SIZE and \ - BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE together) +BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := +$(warning Should not define BOARD_SYSTEMIMAGE_PARTITION_SIZE and \ + BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE together, \ + ignored! Using BOARD_SYSTEMIMAGE_PARTITION_SIZE instead) endif endif