Merge "Split PRODUCT_USE_LOGICAL_PARTITIONS into sub-flags."
This commit is contained in:
commit
d1c308bf40
6 changed files with 46 additions and 15 deletions
|
@ -1293,7 +1293,7 @@ $(if $(filter true,$(BOARD_USES_RECOVERY_AS_BOOT)),\
|
|||
$(if $(filter true,$(BOARD_BUILD_SYSTEM_ROOT_IMAGE)),\
|
||||
$(hide) echo "system_root_image=true" >> $(1)
|
||||
$(hide) echo "root_dir=$(TARGET_ROOT_OUT)" >> $(1))
|
||||
$(if $(USE_LOGICAL_PARTITIONS),$(hide) echo "use_logical_partitions=true" >> $(1))
|
||||
$(if $(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),$(hide) echo "use_dynamic_partition_size=true" >> $(1))
|
||||
$(if $(3),$(hide) $(foreach kv,$(3),echo "$(kv)" >> $(1);))
|
||||
endef
|
||||
|
||||
|
@ -2584,7 +2584,7 @@ define read-size-of-partitions
|
|||
$(foreach p,$(1),$(call read-image-prop-dictionary,$($(p)image_intermediates)/generated_$(p)_image_info.txt,$(p)_size))
|
||||
endef
|
||||
|
||||
ifeq (true,$(USE_LOGICAL_PARTITIONS))
|
||||
ifeq (true,$(PRODUCT_BUILD_SUPER_PARTITION))
|
||||
|
||||
# BOARD_SUPER_PARTITION_SIZE must be defined to build super image.
|
||||
ifdef BOARD_SUPER_PARTITION_SIZE
|
||||
|
@ -2617,7 +2617,7 @@ $(INSTALLED_SUPERIMAGE_TARGET): $(HOST_OUT_EXECUTABLES)/lpmake
|
|||
$(call dist-for-goals,dist_files,$(INSTALLED_SUPERIMAGE_TARGET))
|
||||
|
||||
endif # BOARD_SUPER_PARTITION_SIZE
|
||||
endif # USE_LOGICAL_PARTITIONS
|
||||
endif # PRODUCT_BUILD_SUPER_PARTITION
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# Check image sizes <= size of super partition
|
||||
|
@ -2625,7 +2625,7 @@ endif # USE_LOGICAL_PARTITIONS
|
|||
ifeq (,$(TARGET_BUILD_APPS))
|
||||
# Do not check for apps-only build
|
||||
|
||||
ifeq (true,$(USE_LOGICAL_PARTITIONS))
|
||||
ifeq (true,$(PRODUCT_BUILD_SUPER_PARTITION))
|
||||
ifdef BOARD_SUPER_PARTITION_SIZE
|
||||
ifdef BOARD_SUPER_PARTITION_PARTITION_LIST
|
||||
|
||||
|
@ -2650,7 +2650,7 @@ check_android_partition_sizes:
|
|||
|
||||
endif # BOARD_SUPER_PARTITION_PARTITION_LIST
|
||||
endif # BOARD_SUPER_PARTITION_SIZE
|
||||
endif # USE_LOGICAL_PARTITIONS
|
||||
endif # PRODUCT_BUILD_SUPER_PARTITION
|
||||
|
||||
endif # TARGET_BUILD_APPS
|
||||
|
||||
|
|
|
@ -925,13 +925,21 @@ ifndef PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS
|
|||
endif
|
||||
.KATI_READONLY := PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS
|
||||
|
||||
ifndef USE_LOGICAL_PARTITIONS
|
||||
USE_LOGICAL_PARTITIONS := $(PRODUCT_USE_LOGICAL_PARTITIONS)
|
||||
endif
|
||||
.KATI_READONLY := USE_LOGICAL_PARTITIONS
|
||||
|
||||
ifeq ($(USE_LOGICAL_PARTITIONS),true)
|
||||
requirements := \
|
||||
PRODUCT_USE_DYNAMIC_PARTITION_SIZE \
|
||||
PRODUCT_BUILD_SUPER_PARTITION \
|
||||
PRODUCT_USE_FASTBOOTD \
|
||||
|
||||
$(foreach req,$(requirements),$(if $(filter false,$($(req))),\
|
||||
$(error USE_LOGICAL_PARTITIONS requires $(req) to be true)))
|
||||
|
||||
requirements :=
|
||||
|
||||
BOARD_KERNEL_CMDLINE += androidboot.logical_partitions=1
|
||||
endif
|
||||
|
||||
ifeq ($(PRODUCT_USE_DYNAMIC_PARTITION_SIZE),true)
|
||||
|
||||
ifneq ($(BOARD_SYSTEMIMAGE_PARTITION_SIZE),)
|
||||
ifneq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),)
|
||||
|
@ -961,6 +969,9 @@ $(error Should not define BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE and \
|
|||
endif
|
||||
endif
|
||||
|
||||
endif # PRODUCT_USE_DYNAMIC_PARTITION_SIZE
|
||||
|
||||
ifeq ($(PRODUCT_BUILD_SUPER_PARTITION),true)
|
||||
ifdef BOARD_SUPER_PARTITION_PARTITION_LIST
|
||||
# BOARD_SUPER_PARTITION_PARTITION_LIST: a list of the following tokens
|
||||
valid_super_partition_list := system vendor product product_services
|
||||
|
@ -971,8 +982,7 @@ $(error BOARD_SUPER_PARTITION_PARTITION_LIST contains invalid partition name \
|
|||
endif
|
||||
valid_super_partition_list :=
|
||||
endif # BOARD_SUPER_PARTITION_PARTITION_LIST
|
||||
|
||||
endif # USE_LOGICAL_PARTITIONS
|
||||
endif # PRODUCT_BUILD_SUPER_PARTITION
|
||||
|
||||
# ###############################################################
|
||||
# Set up final options.
|
||||
|
|
|
@ -240,7 +240,7 @@ else
|
|||
ADDITIONAL_DEFAULT_PROPERTIES += ro.actionable_compatible_property.enabled=${PRODUCT_COMPATIBLE_PROPERTY}
|
||||
endif
|
||||
|
||||
ADDITIONAL_PRODUCT_PROPERTIES += ro.boot.logical_partitions=${USE_LOGICAL_PARTITIONS}
|
||||
ADDITIONAL_PRODUCT_PROPERTIES += ro.boot.logical_partitions=$(USE_LOGICAL_PARTITIONS)
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
###
|
||||
|
|
|
@ -203,6 +203,9 @@ _product_var_list := \
|
|||
PRODUCT_USE_LOGICAL_PARTITIONS \
|
||||
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS \
|
||||
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST \
|
||||
PRODUCT_USE_DYNAMIC_PARTITION_SIZE \
|
||||
PRODUCT_BUILD_SUPER_PARTITION \
|
||||
PRODUCT_USE_FASTBOOTD \
|
||||
|
||||
define dump-product
|
||||
$(info ==== $(1) ====)\
|
||||
|
|
|
@ -519,3 +519,21 @@ PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE := \
|
|||
PRODUCT_USE_LOGICAL_PARTITIONS := \
|
||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_USE_LOGICAL_PARTITIONS))
|
||||
.KATI_READONLY := PRODUCT_USE_LOGICAL_PARTITIONS
|
||||
ifndef USE_LOGICAL_PARTITIONS
|
||||
USE_LOGICAL_PARTITIONS := $(PRODUCT_USE_LOGICAL_PARTITIONS)
|
||||
endif
|
||||
|
||||
# All requirements of USE_LOGICAL_PARTITIONS falls back to
|
||||
# USE_LOGICAL_PARTITIONS if not defined.
|
||||
PRODUCT_USE_DYNAMIC_PARTITION_SIZE := $(or \
|
||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_USE_DYNAMIC_PARTITION_SIZE)),\
|
||||
$(USE_LOGICAL_PARTITIONS))
|
||||
.KATI_READONLY := PRODUCT_USE_DYNAMIC_PARTITION_SIZE
|
||||
PRODUCT_BUILD_SUPER_PARTITION := $(or \
|
||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_BUILD_SUPER_PARTITION)),\
|
||||
$(USE_LOGICAL_PARTITIONS))
|
||||
.KATI_READONLY := PRODUCT_BUILD_SUPER_PARTITION
|
||||
PRODUCT_USE_FASTBOOTD := $(or \
|
||||
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_USE_FASTBOOTD)),\
|
||||
$(USE_LOGICAL_PARTITIONS))
|
||||
.KATI_READONLY := PRODUCT_USE_FASTBOOTD
|
||||
|
|
|
@ -546,7 +546,7 @@ def BuildImage(in_dir, prop_dict, out_file, target_out=None):
|
|||
verity_supported = prop_dict.get("verity") == "true"
|
||||
verity_fec_supported = prop_dict.get("verity_fec") == "true"
|
||||
|
||||
if (prop_dict.get("use_logical_partitions") == "true" and
|
||||
if (prop_dict.get("use_dynamic_partition_size") == "true" and
|
||||
"partition_size" not in prop_dict):
|
||||
# if partition_size is not defined, use output of `du' + reserved_size
|
||||
success, size = GetDiskUsage(in_dir)
|
||||
|
@ -799,7 +799,7 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
|
|||
"avb_enable",
|
||||
"avb_avbtool",
|
||||
"avb_salt",
|
||||
"use_logical_partitions",
|
||||
"use_dynamic_partition_size",
|
||||
)
|
||||
for p in common_props:
|
||||
copy_prop(p, p)
|
||||
|
|
Loading…
Reference in a new issue