Include misc_info.txt for super.img in dist

Include the misc_info.txt in "dist_files" so we can recreate a new
mixed super image (system and vendor images from different builds)
later in the test pipeline.

The misc_info.txt for products with BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE
set to true is removed from their update packages (essentially, reverts
aosp/976069) since the super_misc_info.txt created here can be used.

Bug: 139404128
Test: $ lunch aosp_x86-userdebug
      $ m dist
      $ diff $OUT_DIR/dist/super_misc_info.txt $OUT/misc_info.txt

Change-Id: Iad1ff981124a19933b0b575bc99941e0fc3813a7
This commit is contained in:
Isaac Chen 2019-08-14 18:52:13 +08:00
parent ba6135bd80
commit 52cc60ca15
1 changed files with 4 additions and 5 deletions

View File

@ -4539,7 +4539,6 @@ ifneq (true,$(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS))
# For real devices and for dist builds, build super image from target files to an intermediate directory. # 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 INTERNAL_SUPERIMAGE_DIST_TARGET := $(call intermediates-dir-for,PACKAGING,super.img)/super.img
INTERNAL_SUPERIMAGE_MISC_INFO := $(call intermediates-dir-for,PACKAGING,superimage_debug)/misc_info.txt
$(INTERNAL_SUPERIMAGE_DIST_TARGET): extracted_input_target_files := $(patsubst %.zip,%,$(BUILT_TARGET_FILES_PACKAGE)) $(INTERNAL_SUPERIMAGE_DIST_TARGET): extracted_input_target_files := $(patsubst %.zip,%,$(BUILT_TARGET_FILES_PACKAGE))
$(INTERNAL_SUPERIMAGE_DIST_TARGET): $(LPMAKE) $(BUILT_TARGET_FILES_PACKAGE) $(BUILD_SUPER_IMAGE) $(INTERNAL_SUPERIMAGE_DIST_TARGET): $(LPMAKE) $(BUILT_TARGET_FILES_PACKAGE) $(BUILD_SUPER_IMAGE)
$(call pretty,"Target super fs image from target files: $@") $(call pretty,"Target super fs image from target files: $@")
@ -4591,13 +4590,15 @@ ifeq (true,$(BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT))
$(INSTALLED_SUPERIMAGE_TARGET): $(INSTALLED_SUPERIMAGE_DEPENDENCIES) $(INSTALLED_SUPERIMAGE_TARGET): $(INSTALLED_SUPERIMAGE_DEPENDENCIES)
$(call pretty,"Target super fs image for debug: $@") $(call pretty,"Target super fs image for debug: $@")
$(call build-superimage-target,$(INSTALLED_SUPERIMAGE_TARGET),\ $(call build-superimage-target,$(INSTALLED_SUPERIMAGE_TARGET),\
$(INTERNAL_SUPERIMAGE_MISC_INFO)) $(call intermediates-dir-for,PACKAGING,superimage_debug)/misc_info.txt)
droidcore: $(INSTALLED_SUPERIMAGE_TARGET) droidcore: $(INSTALLED_SUPERIMAGE_TARGET)
# For devices that uses super image directly, the superimage target points to the file in $(PRODUCT_OUT). # For devices that uses super image directly, the superimage target points to the file in $(PRODUCT_OUT).
.PHONY: superimage .PHONY: superimage
superimage: $(INSTALLED_SUPERIMAGE_TARGET) superimage: $(INSTALLED_SUPERIMAGE_TARGET)
$(call dist-for-goals,dist_files,$(INSTALLED_MISC_INFO_TARGET):super_misc_info.txt)
endif # BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT endif # BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT
# Build $(PRODUCT_OUT)/super.img without dependencies. # Build $(PRODUCT_OUT)/super.img without dependencies.
@ -4666,15 +4667,13 @@ $(INTERNAL_UPDATE_PACKAGE_TARGET): $(INTERNAL_SUPERIMAGE_DIST_TARGET)
OTA/super_$(device).img:super_$(device).img)) \ OTA/super_$(device).img:super_$(device).img)) \
IMAGES/VerifiedBootParams.textproto:VerifiedBootParams.textproto \ IMAGES/VerifiedBootParams.textproto:VerifiedBootParams.textproto \
OTA/android-info.txt:android-info.txt "IMAGES/*.img:." OTA/android-info.txt:android-info.txt "IMAGES/*.img:."
$(if $(INTERNAL_SUPERIMAGE_MISC_INFO), zip -q -j -u $@ $(INTERNAL_SUPERIMAGE_MISC_INFO))
$(if $(INTERNAL_SUPERIMAGE_DIST_TARGET), zip -q -j -u $@ $(INTERNAL_SUPERIMAGE_DIST_TARGET)) $(if $(INTERNAL_SUPERIMAGE_DIST_TARGET), zip -q -j -u $@ $(INTERNAL_SUPERIMAGE_DIST_TARGET))
else else
$(INTERNAL_UPDATE_PACKAGE_TARGET): $(INSTALLED_MISC_INFO_TARGET) $(INTERNAL_UPDATE_PACKAGE_TARGET):
@echo "Package: $@" @echo "Package: $@"
$(hide) $(ZIP2ZIP) -i $(BUILT_TARGET_FILES_PACKAGE) -o $@ \ $(hide) $(ZIP2ZIP) -i $(BUILT_TARGET_FILES_PACKAGE) -o $@ \
IMAGES/VerifiedBootParams.textproto:VerifiedBootParams.textproto \ IMAGES/VerifiedBootParams.textproto:VerifiedBootParams.textproto \
OTA/android-info.txt:android-info.txt "IMAGES/*.img:." OTA/android-info.txt:android-info.txt "IMAGES/*.img:."
$(if $(INSTALLED_MISC_INFO_TARGET), zip -q -j -u $@ $(INSTALLED_MISC_INFO_TARGET))
endif # BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE endif # BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE
.PHONY: updatepackage .PHONY: updatepackage