Fix aosp_arm64 build error when make ramdisk_debug

Some targets have ramdisk.img but no boot.img, howerver,
ramdisk-debug.img only depends on boot.img. Fix this by making
ramdisk-debug.img depends on ramdisk.img.

Bug: 126493225
Test: make ramdisk_debug
Change-Id: I65120a3b3372712fafc26442354ee031eede0bd3
This commit is contained in:
Bowgo Tsai 2019-04-24 12:35:50 +08:00
parent 2f401655a9
commit c3e8cc9bd1

View file

@ -1982,9 +1982,14 @@ endif # BOARD_USES_RECOVERY_AS_BOOT
$(INSTALLED_DEBUG_RAMDISK_TARGET): DEBUG_RAMDISK_SYNC_DIR := $(my_debug_ramdisk_sync_dir)
$(INSTALLED_DEBUG_RAMDISK_TARGET): DEBUG_RAMDISK_ROOT_DIR := $(my_debug_ramdisk_root_dir)
# We should have just depended on ramdisk.img or ramdisk-recovery.img.
# But ramdisk-recovery.img is not a make target, so let's depend on the boot.img directly.
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
# ramdisk-recovery.img isn't a make target, need to depend on boot.img if it's for recovery.
$(INSTALLED_DEBUG_RAMDISK_TARGET): $(INSTALLED_BOOTIMAGE_TARGET)
else
# Depends on ramdisk.img, note that some target has ramdisk.img but no boot.img, e.g., emulator.
$(INSTALLED_DEBUG_RAMDISK_TARGET): $(INSTALLED_RAMDISK_TARGET)
endif # BOARD_USES_RECOVERY_AS_BOOT
$(INSTALLED_DEBUG_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_DEBUG_RAMDISK_FILES) | $(MINIGZIP)
$(call pretty,"Target debug ram disk: $@")
mkdir -p $(TARGET_DEBUG_RAMDISK_OUT)