build: Enable super image build rules depending on single super block device
* The current logic does not suit for multiple block devices case,
it generates split images hence output dir shall be specified
* Multiple block devices is possible with non-RDAP too, and it could
work for RDAP with single block device, so it's incorrect to depend
on RDAP flag
Change-Id: I8563b96b35351ef0a3b40ae172c2e904ee57f85e
diff --git a/core/Makefile b/core/Makefile
index bce2ace..8eb745f 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -7393,7 +7393,7 @@
# BOARD_SUPER_PARTITION_SIZE must be defined to build super image.
ifneq ($(BOARD_SUPER_PARTITION_SIZE),)
-ifneq (true,$(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS))
+ifeq ($(words $(BOARD_SUPER_PARTITION_BLOCK_DEVICES)),1)
# For real devices and for dist builds, build super image from target files to an intermediate directory.
INTERNAL_SUPERIMAGE_DIST_TARGET := $(call intermediates-dir-for,PACKAGING,super.img)/super.img
@@ -7411,7 +7411,7 @@
.PHONY: superimage_dist
superimage_dist: $(INTERNAL_SUPERIMAGE_DIST_TARGET)
-endif # PRODUCT_RETROFIT_DYNAMIC_PARTITIONS != "true"
+endif # $(words $(BOARD_SUPER_PARTITION_BLOCK_DEVICES)) == 1
endif # BOARD_SUPER_PARTITION_SIZE != ""
endif # PRODUCT_BUILD_SUPER_PARTITION == "true"
@@ -7420,7 +7420,7 @@
ifeq (true,$(PRODUCT_BUILD_SUPER_PARTITION))
ifneq ($(BOARD_SUPER_PARTITION_SIZE),)
-ifneq (true,$(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS))
+ifeq ($(words $(BOARD_SUPER_PARTITION_BLOCK_DEVICES)),1)
# Build super.img by using $(INSTALLED_*IMAGE_TARGET) to $(1)
# $(1): built image path
@@ -7475,7 +7475,7 @@
$(call build-superimage-target,$(INSTALLED_SUPERIMAGE_TARGET),\
$(call intermediates-dir-for,PACKAGING,superimage-nodeps)/misc_info.txt)
-endif # PRODUCT_RETROFIT_DYNAMIC_PARTITIONS != "true"
+endif # $(words $(BOARD_SUPER_PARTITION_BLOCK_DEVICES)) == 1
endif # BOARD_SUPER_PARTITION_SIZE != ""
endif # PRODUCT_BUILD_SUPER_PARTITION == "true"