From af670812184d212fba072efb8a15cacbdf5a11a3 Mon Sep 17 00:00:00 2001 From: Daniel Norman Date: Mon, 12 Oct 2020 11:31:35 -0700 Subject: [PATCH] Builds boot-debug.img if INSTALLED_BOOTIMAGE_TARGET. This causes boot-debug.img to build if its main dependency INSTALLED_BOOTIMAGE_TARGET (boot.img) is defined. This fixes an issue where boot-debug.img was missing when BUILDING_BOOT_IMAGE=false, but boot.img exists because the board uses recovery as boot. Bug: 170644849 Test: Build target that sets PRODUCT_BUILD_BOOT_IMAGE and PRODUCT_BUILD_RECOVERY_IMAGE false, observe no boot-debug.img. Test: Build target that sets BOARD_USES_RECOVERY_AS_BOOT, observe boot-debug.img. Change-Id: Ic887ea93d4c5181eca0f82c3cdf3ce3b72f4c185 --- core/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Makefile b/core/Makefile index 48ba059e75..a46e15666b 100644 --- a/core/Makefile +++ b/core/Makefile @@ -2094,7 +2094,7 @@ endif # BUILDING_RAMDISK_IMAGE # # Note: it's intentional to skip signing for boot-debug.img, because it # can only be used if the device is unlocked with verification error. -ifdef BUILDING_BOOT_IMAGE +ifneq ($(INSTALLED_BOOTIMAGE_TARGET),) ifneq ($(strip $(TARGET_NO_KERNEL)),true) ifneq ($(strip $(BOARD_KERNEL_BINARIES)),) INSTALLED_DEBUG_BOOTIMAGE_TARGET := $(foreach k,$(subst kernel,boot-debug,$(BOARD_KERNEL_BINARIES)), \ @@ -2149,7 +2149,7 @@ bootimage_debug-nodeps: $(MKBOOTIMG) $(foreach b,$(INSTALLED_DEBUG_BOOTIMAGE_TARGET),$(call build-debug-bootimage-target,$b)) endif # TARGET_NO_KERNEL -endif # BUILDING_BOOT_IMAGE +endif # INSTALLED_BOOTIMAGE_TARGET ifeq ($(BUILDING_VENDOR_BOOT_IMAGE),true) ifeq ($(BUILDING_RAMDISK_IMAGE),true)