Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd0de3ab authored by Yifan Hong's avatar Yifan Hong Committed by Automerger Merge Worker
Browse files

Merge "Fix boot-* to kernel-* dependency" am: 871e3c60 am: eddd0d69 am: fb54beb4

Original change: https://android-review.googlesource.com/c/platform/build/+/1442279

Change-Id: Ib909cc508b0b39b494392dd7be70d15ff6ef4adf
parents 703b4ecd fb54beb4
Loading
Loading
Loading
Loading
+10 −6
Original line number Original line Diff line number Diff line
@@ -773,8 +773,11 @@ INSTALLED_BOOTIMAGE_TARGET := $(BUILT_BOOTIMAGE_TARGET)


ifeq ($(TARGET_BOOTIMAGE_USE_EXT2),true)
ifeq ($(TARGET_BOOTIMAGE_USE_EXT2),true)
$(error TARGET_BOOTIMAGE_USE_EXT2 is not supported anymore)
$(error TARGET_BOOTIMAGE_USE_EXT2 is not supported anymore)
endif # TARGET_BOOTIMAGE_USE_EXT2

$(foreach b,$(INSTALLED_BOOTIMAGE_TARGET), $(eval $(call add-dependency,$(b),$(call bootimage-to-kernel,$(b)))))


else ifeq (true,$(BOARD_AVB_ENABLE)) # TARGET_BOOTIMAGE_USE_EXT2 != true
ifeq (true,$(BOARD_AVB_ENABLE))


# $1: boot image target
# $1: boot image target
define build_boot_board_avb_enabled
define build_boot_board_avb_enabled
@@ -787,7 +790,7 @@ define build_boot_board_avb_enabled
          $(BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS)
          $(BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS)
endef
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 pretty,"Target boot image: $@")
	$(call build_boot_board_avb_enabled,$@)
	$(call build_boot_board_avb_enabled,$@)


@@ -805,7 +808,7 @@ define build_boot_supports_boot_signer
  $(call assert-max-image-size,$(1),$(BOARD_BOOTIMAGE_PARTITION_SIZE))
  $(call assert-max-image-size,$(1),$(BOARD_BOOTIMAGE_PARTITION_SIZE))
endef
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 pretty,"Target boot image: $@")
	$(call build_boot_supports_boot_signer,$@)
	$(call build_boot_supports_boot_signer,$@)


@@ -823,7 +826,7 @@ define build_boot_supports_vboot
  $(call assert-max-image-size,$(1),$(BOARD_BOOTIMAGE_PARTITION_SIZE))
  $(call assert-max-image-size,$(1),$(BOARD_BOOTIMAGE_PARTITION_SIZE))
endef
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 pretty,"Target boot image: $@")
	$(call build_boot_supports_vboot,$@)
	$(call build_boot_supports_vboot,$@)


@@ -840,7 +843,7 @@ define build_boot_novboot
  $(call assert-max-image-size,$1,$(BOARD_BOOTIMAGE_PARTITION_SIZE))
  $(call assert-max-image-size,$1,$(BOARD_BOOTIMAGE_PARTITION_SIZE))
endef
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 pretty,"Target boot image: $@")
	$(call build_boot_novboot,$@)
	$(call build_boot_novboot,$@)


@@ -849,7 +852,7 @@ bootimage-nodeps: $(MKBOOTIMG)
	@echo "make $@: ignoring dependencies"
	@echo "make $@: ignoring dependencies"
	$(foreach b,$(INSTALLED_BOOTIMAGE_TARGET),$(call build_boot_novboot,$(b)))
	$(foreach b,$(INSTALLED_BOOTIMAGE_TARGET),$(call build_boot_novboot,$(b)))


endif # TARGET_BOOTIMAGE_USE_EXT2
endif # BOARD_AVB_ENABLE
endif # BUILDING_BOOT_IMAGE
endif # BUILDING_BOOT_IMAGE


else # TARGET_NO_KERNEL == "true"
else # TARGET_NO_KERNEL == "true"
@@ -1968,6 +1971,7 @@ ifdef BOARD_INCLUDE_DTB_IN_BOOTIMG
endif
endif


ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
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)
$(INSTALLED_BOOTIMAGE_TARGET): $(recoveryimage-deps)
	$(call pretty,"Target boot image from recovery: $@")
	$(call pretty,"Target boot image from recovery: $@")
	$(call build-recoveryimage-target, $@, $(PRODUCT_OUT)/$(subst .img,,$(subst boot,kernel,$(notdir $@))))
	$(call build-recoveryimage-target, $@, $(PRODUCT_OUT)/$(subst .img,,$(subst boot,kernel,$(notdir $@))))