Merge changes from topic "ota-package-nonab"

* changes:
  Only build OTA package for non-A/B with recovery
  Reland "Build OTA when boot image exists even without kernel or recovery fstab"
This commit is contained in:
Yifan Hong
2021-07-20 02:59:47 +00:00
committed by Gerrit Code Review

View File

@@ -4235,13 +4235,22 @@ else
ifeq ($(TARGET_PRODUCT),sdk)
build_ota_package := false
endif
# A target without a kernel may be one of the following:
# - A generic target. In this case, the OTA package usually isn't built.
# PRODUCT_BUILD_GENERIC_OTA_PACKAGE may be set to true to force OTA package
# generation.
# - A real device target, with TARGET_NO_KERNEL set to true and
# BOARD_PREBUILT_BOOTIMAGE set. In this case, it is valid to generate
# an OTA package.
ifneq ($(PRODUCT_BUILD_GENERIC_OTA_PACKAGE),true)
ifneq ($(filter generic%,$(TARGET_DEVICE)),)
build_ota_package := false
endif
ifeq ($(TARGET_NO_KERNEL),true)
build_ota_package := false
endif
ifeq ($(INSTALLED_BOOTIMAGE_TARGET),)
ifeq ($(TARGET_NO_KERNEL),true)
build_ota_package := false
endif
endif # INSTALLED_BOOTIMAGE_TARGET == ""
ifeq ($(recovery_fstab),)
build_ota_package := false
endif