Merge "Allow devices launched with DAP to override super partition name."

am: b3f5918890

Change-Id: I54aac68d6b65e4dd1e5b854c8f63d15e87687f10
This commit is contained in:
Yifan Hong 2019-01-07 10:39:06 -08:00 committed by android-build-merger
commit b5bd352159

View file

@ -1060,19 +1060,25 @@ BOARD_KERNEL_CMDLINE += androidboot.super_partition=$(BOARD_SUPER_PARTITION_META
else # PRODUCT_RETROFIT_DYNAMIC_PARTITIONS
# These should not be specified on devices launching with dynamic partition support.
ifdef BOARD_SUPER_PARTITION_BLOCK_DEVICES
$(error BOARD_SUPER_PARTITION_BLOCK_DEVICES can only be used if PRODUCT_RETROFIT_DYNAMIC_PARTITIONS is true.)
endif
ifdef BOARD_SUPER_PARTITION_METADATA_DEVICE
$(error BOARD_SUPER_PARTITION_METADATA_DEVICE can only be used if PRODUCT_RETROFIT_DYNAMIC_PARTITIONS is true.)
endif
# For normal devices, we populate BOARD_SUPER_PARTITION_BLOCK_DEVICES so the
# build can handle both cases consistently.
BOARD_SUPER_PARTITION_BLOCK_DEVICES := super
ifeq ($(BOARD_SUPER_PARTITION_METADATA_DEVICE),)
BOARD_SUPER_PARTITION_METADATA_DEVICE := super
BOARD_SUPER_PARTITION_SUPER_DEVICE_SIZE := $(BOARD_SUPER_PARTITION_SIZE)
endif
ifeq ($(BOARD_SUPER_PARTITION_BLOCK_DEVICES),)
BOARD_SUPER_PARTITION_BLOCK_DEVICES := $(BOARD_SUPER_PARTITION_METADATA_DEVICE)
endif
# If only one super block device, default to super partition size.
ifeq ($(word 2,$(BOARD_SUPER_PARTITION_BLOCK_DEVICES)),)
BOARD_SUPER_PARTITION_$(call to-upper,$(strip $(BOARD_SUPER_PARTITION_BLOCK_DEVICES)))_DEVICE_SIZE ?= \
$(BOARD_SUPER_PARTITION_SIZE)
endif
ifneq ($(BOARD_SUPER_PARTITION_METADATA_DEVICE),super)
BOARD_KERNEL_CMDLINE += androidboot.super_partition=$(BOARD_SUPER_PARTITION_METADATA_DEVICE)
endif
endif # PRODUCT_RETROFIT_DYNAMIC_PARTITIONS
endif # BOARD_SUPER_PARTITION_SIZE
@ -1082,7 +1088,7 @@ endif # BOARD_SUPER_PARTITION_SIZE
$(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),, \
$(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))
endif # PRODUCT_BUILD_SUPER_PARTITION