Don't copy recovery.img to BOOTABLE_IMAGES if it doesn't exist

If BOARD_USES_RECOVERY_AS_BOOT is set to true, recovery.img is
not built.

If BOARD_CUSTOM_BOOTIMG is set, INSTALLED_RECOVERYIMAGE_TARGET
gets copied to BOOTABLE_IMAGES.

If both are set, the following error is produced.

acp: missing destination file

Since it is possible to have both BOARD_USES_RECOVERY_AS_BOOT and
BOARD_CUSTOM_BOOTIMG set, guard the copy operation so that it does
not try to copy a missing recovery.img.

Change-Id: Iae24e31a586e98955807d213df3dbaa0a2f13bae
This commit is contained in:
Cosmin Tanislav 2024-07-24 21:52:13 +03:00 committed by Bartłomiej Rudecki
parent 4080494752
commit 0fc77ec51e
Signed by: przekichane
GPG key ID: 751F23C6F014EF76

View file

@ -6629,8 +6629,10 @@ ifdef BOARD_CUSTOM_BOOTIMG
@# Prebuilt boot images
$(hide) mkdir -p $(zip_root)/BOOTABLE_IMAGES
$(hide) $(ACP) $(INSTALLED_BOOTIMAGE_TARGET) $(zip_root)/BOOTABLE_IMAGES/
ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),)
$(hide) $(ACP) $(INSTALLED_RECOVERYIMAGE_TARGET) $(zip_root)/BOOTABLE_IMAGES/
endif
endif
ifdef BUILDING_SYSTEM_IMAGE
@# Contents of the system image
$(hide) $(call package_files-copy-root, \