Allow space in BOARD_*_SIZE variables for dynamic partitions
Allow instances like: BOARD_SUPER_PARTITION_SIZE := 4294967296 # 4GiB Test: add trailing space to BOARD_SUPER_PARTITION_SIZE, BOARD_(group)_SIZE, BOARD_*IMAGE_PARTITION_RESERVED_SIZE, BOARD_SUPER_PARTITION_(device)_DEVICE_SIZE, build passes. Fixes: 120042457 Change-Id: Ib7244e3fd2f782657c84cdb74e601ac96176571d
This commit is contained in:
@@ -1006,6 +1006,7 @@ ifeq ($(PRODUCT_BUILD_SUPER_PARTITION),true)
|
|||||||
# - BOARD_{GROUP}_PARTITION_PARTITION_LIST: the list of partitions that belongs to this group.
|
# - BOARD_{GROUP}_PARTITION_PARTITION_LIST: the list of partitions that belongs to this group.
|
||||||
# If empty, no partitions belong to this group, and the sum of sizes is effectively 0.
|
# If empty, no partitions belong to this group, and the sum of sizes is effectively 0.
|
||||||
$(foreach group,$(call to-upper,$(BOARD_SUPER_PARTITION_GROUPS)), \
|
$(foreach group,$(call to-upper,$(BOARD_SUPER_PARTITION_GROUPS)), \
|
||||||
|
$(eval BOARD_$(group)_SIZE := $(strip $(BOARD_$(group)_SIZE))) \
|
||||||
$(if $(BOARD_$(group)_SIZE),,$(error BOARD_$(group)_SIZE must not be empty)) \
|
$(if $(BOARD_$(group)_SIZE),,$(error BOARD_$(group)_SIZE must not be empty)) \
|
||||||
$(eval .KATI_READONLY := BOARD_$(group)_SIZE) \
|
$(eval .KATI_READONLY := BOARD_$(group)_SIZE) \
|
||||||
$(eval BOARD_$(group)_PARTITION_LIST ?=) \
|
$(eval BOARD_$(group)_PARTITION_LIST ?=) \
|
||||||
@@ -1032,7 +1033,7 @@ BOARD_SUPER_PARTITION_PARTITION_LIST := \
|
|||||||
$(BOARD_$(group)_PARTITION_LIST))
|
$(BOARD_$(group)_PARTITION_LIST))
|
||||||
.KATI_READONLY := BOARD_SUPER_PARTITION_PARTITION_LIST
|
.KATI_READONLY := BOARD_SUPER_PARTITION_PARTITION_LIST
|
||||||
|
|
||||||
ifdef BOARD_SUPER_PARTITION_SIZE
|
ifneq ($(BOARD_SUPER_PARTITION_SIZE),)
|
||||||
ifeq ($(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS),true)
|
ifeq ($(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS),true)
|
||||||
|
|
||||||
# The metadata device must be specified manually for retrofitting.
|
# The metadata device must be specified manually for retrofitting.
|
||||||
@@ -1075,6 +1076,7 @@ endif # BOARD_SUPER_PARTITION_SIZE
|
|||||||
.KATI_READONLY := BOARD_SUPER_PARTITION_METADATA_DEVICE
|
.KATI_READONLY := BOARD_SUPER_PARTITION_METADATA_DEVICE
|
||||||
|
|
||||||
$(foreach device,$(call to-upper,$(BOARD_SUPER_PARTITION_BLOCK_DEVICES)), \
|
$(foreach device,$(call to-upper,$(BOARD_SUPER_PARTITION_BLOCK_DEVICES)), \
|
||||||
|
$(eval BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE := $(strip $(BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE))) \
|
||||||
$(if $(BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE),, \
|
$(if $(BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE),, \
|
||||||
$(error $(BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE must not be empty))) \
|
$(error $(BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE must not be empty))) \
|
||||||
$(eval .KATI_READONLY := BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE))
|
$(eval .KATI_READONLY := BOARD_SUPER_PARTITION_$(device)_DEVICE_SIZE))
|
||||||
|
@@ -410,7 +410,9 @@ endif
|
|||||||
# Typical build; include any Android.mk files we can find.
|
# Typical build; include any Android.mk files we can find.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Before we go and include all of the module makefiles, strip values for easier
|
||||||
|
# processing.
|
||||||
|
$(call strip-product-vars)
|
||||||
# Before we go and include all of the module makefiles, mark the PRODUCT_*
|
# Before we go and include all of the module makefiles, mark the PRODUCT_*
|
||||||
# and ADDITIONAL*PROPERTIES values readonly so that they won't be modified.
|
# and ADDITIONAL*PROPERTIES values readonly so that they won't be modified.
|
||||||
$(call readonly-product-vars)
|
$(call readonly-product-vars)
|
||||||
|
@@ -404,7 +404,7 @@ _product_stash_var_list += \
|
|||||||
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY
|
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY
|
||||||
|
|
||||||
# Logical partitions related variables.
|
# Logical partitions related variables.
|
||||||
_product_stash_var_list += \
|
_dynamic_partitions_var_list += \
|
||||||
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE \
|
BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE \
|
||||||
BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE \
|
BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE \
|
||||||
BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE \
|
BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE \
|
||||||
@@ -413,6 +413,9 @@ _product_stash_var_list += \
|
|||||||
BOARD_SUPER_PARTITION_SIZE \
|
BOARD_SUPER_PARTITION_SIZE \
|
||||||
BOARD_SUPER_PARTITION_GROUPS \
|
BOARD_SUPER_PARTITION_GROUPS \
|
||||||
|
|
||||||
|
_product_stash_var_list += $(_dynamic_partitions_var_list)
|
||||||
|
_product_strip_var_list := $(_dynamic_partitions_var_list)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Mark the variables in _product_stash_var_list as readonly
|
# Mark the variables in _product_stash_var_list as readonly
|
||||||
#
|
#
|
||||||
@@ -423,6 +426,13 @@ $(foreach v,$(_product_stash_var_list), \
|
|||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
#
|
||||||
|
# Strip the variables in _product_strip_var_list
|
||||||
|
#
|
||||||
|
define strip-product-vars
|
||||||
|
$(foreach v,$(_product_strip_var_list),$(eval $(v) := $(strip $($(v)))))
|
||||||
|
endef
|
||||||
|
|
||||||
define add-to-product-copy-files-if-exists
|
define add-to-product-copy-files-if-exists
|
||||||
$(if $(wildcard $(word 1,$(subst :, ,$(1)))),$(1))
|
$(if $(wildcard $(word 1,$(subst :, ,$(1)))),$(1))
|
||||||
endef
|
endef
|
||||||
|
Reference in New Issue
Block a user