diff --git a/core/Makefile b/core/Makefile index 9c60855d4..60157965b 100644 --- a/core/Makefile +++ b/core/Makefile @@ -4815,6 +4815,8 @@ define build-superimage-target $(call dump-super-image-info,$(2)) $(foreach p,$(BOARD_SUPER_PARTITION_PARTITION_LIST), \ echo "$(p)_image=$(INSTALLED_$(call to-upper,$(p))IMAGE_TARGET)" >> $(2);) + $(if $(BUILDING_SYSTEM_OTHER_IMAGE), $(if $(filter system,$(BOARD_SUPER_PARTITION_PARTITION_LIST)), \ + echo "system_other_image=$(INSTALLED_SYSTEMOTHERIMAGE_TARGET)" >> $(2);)) mkdir -p $(dir $(1)) PATH=$(dir $(LPMAKE)):$$PATH \ $(BUILD_SUPER_IMAGE) -v $(2) $(1) @@ -4824,6 +4826,12 @@ INSTALLED_SUPERIMAGE_TARGET := $(PRODUCT_OUT)/super.img INSTALLED_SUPERIMAGE_DEPENDENCIES := $(LPMAKE) $(BUILD_SUPER_IMAGE) \ $(foreach p, $(BOARD_SUPER_PARTITION_PARTITION_LIST), $(INSTALLED_$(call to-upper,$(p))IMAGE_TARGET)) +ifdef BUILDING_SYSTEM_OTHER_IMAGE +ifneq ($(filter system,$(BOARD_SUPER_PARTITION_PARTITION_LIST)),) +INSTALLED_SUPERIMAGE_DEPENDENCIES += $(INSTALLED_SYSTEMOTHERIMAGE_TARGET) +endif +endif + # If BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT is set, super.img is built from images in the # $(PRODUCT_OUT) directory, and is built to $(PRODUCT_OUT)/super.img. Also, it will # be built for non-dist builds. This is useful for devices that uses super.img directly, e.g.