forked from openkylin/platform_build
Fix boot-* to kernel-* dependency
For example, if BOARD_KERNEL_BINARIES contains kernel-5.4, make sure boot-5.4.img depends on kernel-5.4. Test: remove kernel-5.4 from out directory then build boot image Fixes: 169725104 Change-Id: I85624f3595c1a698bc27d19c73349138bb6e9e8c
This commit is contained in:
parent
897cfaee46
commit
3e0b5d0355
|
@ -762,8 +762,11 @@ INSTALLED_BOOTIMAGE_TARGET := $(BUILT_BOOTIMAGE_TARGET)
|
|||
|
||||
ifeq ($(TARGET_BOOTIMAGE_USE_EXT2),true)
|
||||
$(error TARGET_BOOTIMAGE_USE_EXT2 is not supported anymore)
|
||||
endif # TARGET_BOOTIMAGE_USE_EXT2
|
||||
|
||||
else ifeq (true,$(BOARD_AVB_ENABLE)) # TARGET_BOOTIMAGE_USE_EXT2 != true
|
||||
$(foreach b,$(INSTALLED_BOOTIMAGE_TARGET), $(eval $(call add-dependency,$(b),$(call bootimage-to-kernel,$(b)))))
|
||||
|
||||
ifeq (true,$(BOARD_AVB_ENABLE))
|
||||
|
||||
# $1: boot image target
|
||||
define build_boot_board_avb_enabled
|
||||
|
@ -776,7 +779,7 @@ define build_boot_board_avb_enabled
|
|||
$(BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS)
|
||||
endef
|
||||
|
||||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(AVBTOOL) $(INTERNAL_BOOTIMAGE_FILES) $(BOARD_AVB_BOOT_KEY_PATH) $(call bootimage-to-kernel,$@)
|
||||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(AVBTOOL) $(INTERNAL_BOOTIMAGE_FILES) $(BOARD_AVB_BOOT_KEY_PATH)
|
||||
$(call pretty,"Target boot image: $@")
|
||||
$(call build_boot_board_avb_enabled,$@)
|
||||
|
||||
|
@ -794,7 +797,7 @@ define build_boot_supports_boot_signer
|
|||
$(call assert-max-image-size,$(1),$(BOARD_BOOTIMAGE_PARTITION_SIZE))
|
||||
endef
|
||||
|
||||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(BOOT_SIGNER) $(call bootimage-to-kernel,$@)
|
||||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(BOOT_SIGNER)
|
||||
$(call pretty,"Target boot image: $@")
|
||||
$(call build_boot_supports_boot_signer,$@)
|
||||
|
||||
|
@ -812,7 +815,7 @@ define build_boot_supports_vboot
|
|||
$(call assert-max-image-size,$(1),$(BOARD_BOOTIMAGE_PARTITION_SIZE))
|
||||
endef
|
||||
|
||||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(VBOOT_SIGNER) $(FUTILITY) $(call bootimage-to-kernel,$@)
|
||||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(VBOOT_SIGNER) $(FUTILITY)
|
||||
$(call pretty,"Target boot image: $@")
|
||||
$(call build_boot_supports_vboot,$@)
|
||||
|
||||
|
@ -829,7 +832,7 @@ define build_boot_novboot
|
|||
$(call assert-max-image-size,$1,$(BOARD_BOOTIMAGE_PARTITION_SIZE))
|
||||
endef
|
||||
|
||||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(call bootimage-to-kernel,$@)
|
||||
$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES)
|
||||
$(call pretty,"Target boot image: $@")
|
||||
$(call build_boot_novboot,$@)
|
||||
|
||||
|
@ -838,7 +841,7 @@ bootimage-nodeps: $(MKBOOTIMG)
|
|||
@echo "make $@: ignoring dependencies"
|
||||
$(foreach b,$(INSTALLED_BOOTIMAGE_TARGET),$(call build_boot_novboot,$(b)))
|
||||
|
||||
endif # TARGET_BOOTIMAGE_USE_EXT2
|
||||
endif # BOARD_AVB_ENABLE
|
||||
endif # BUILDING_BOOT_IMAGE
|
||||
|
||||
else # TARGET_NO_KERNEL == "true"
|
||||
|
@ -1955,6 +1958,7 @@ ifdef BOARD_INCLUDE_DTB_IN_BOOTIMG
|
|||
endif
|
||||
|
||||
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
|
||||
$(foreach b,$(INSTALLED_BOOTIMAGE_TARGET), $(eval $(call add-dependency,$(b),$(call bootimage-to-kernel,$(b)))))
|
||||
$(INSTALLED_BOOTIMAGE_TARGET): $(recoveryimage-deps)
|
||||
$(call pretty,"Target boot image from recovery: $@")
|
||||
$(call build-recoveryimage-target, $@, $(PRODUCT_OUT)/$(subst .img,,$(subst boot,kernel,$(notdir $@))))
|
||||
|
|
Loading…
Reference in New Issue