Allow packing custom radio images into target_files zip.
Radio images are added to INSTALLED_RADIOIMAGE_TARGET, which by default
will be packed under RADIO/ in a target_files zip. This CL introduces
BOARD_PACK_RADIOIMAGES that allows additionally copying them into
IMAGES/, which will then be included into <product>-img.zip.
Bug: 62195105
Test: Define BOARD_PACK_RADIOIMAGES and `m dist`. Check the generated
target_files zip and <product>-img.zip.
Change-Id: I3deafd2dfecd1d4dbfdfc2d002fc40ef22fb60ea
diff --git a/core/Makefile b/core/Makefile
index b6a9780..9aae8ca 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -2409,6 +2409,11 @@
endif # BOARD_AVB_DTBO_KEY_PATH
endif # BOARD_AVB_ENABLE
endif # BOARD_PREBUILT_DTBOIMAGE
+ @# The radio images in BOARD_PACK_RADIOIMAGES will be additionally copied from RADIO/ into
+ @# IMAGES/, which then will be added into <product>-img.zip. Such images must be listed in
+ @# INSTALLED_RADIOIMAGE_TARGET.
+ $(hide) $(foreach part,$(BOARD_PACK_RADIOIMAGES), \
+ echo $(part) >> $(zip_root)/META/pack_radioimages.txt;)
@# Run fs_config on all the system, vendor, boot ramdisk,
@# and recovery ramdisk files in the zip, and save the output
$(hide) $(call fs_config,$(zip_root)/SYSTEM,system/) > $(zip_root)/META/filesystem_config.txt