diff options
author | Yifan Hong <elsk@google.com> | 2021-07-14 14:19:12 -0700 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2021-07-16 09:52:42 -0700 |
commit | 73f01711f2e95cbfd239bc9f13bbc2d5d45acec3 (patch) | |
tree | 87180a2a091ff2de75a011e00a63e9875e2dfbb9 | |
parent | b195f48ce981b7e95dcaca91f50019d149feae45 (diff) | |
download | build-73f01711f2e95cbfd239bc9f13bbc2d5d45acec3.tar.gz |
Build OTA when boot image exists even without kernel or recovery fstab
On devices with a prebuilt boot image, TARGET_NO_KERNEL
may be set to enable signing, etc. In this case we still
want to build the OTA package.
Test: m otapackage on a device with generic boot image
(where TARGET_NO_KERNEL is set)
Bug: 193588301
Change-Id: I4e5adc3f42a516ac0e2f66c313dbe34a469ebe05
Merged-In: I4e5adc3f42a516ac0e2f66c313dbe34a469ebe05
-rw-r--r-- | core/Makefile | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/core/Makefile b/core/Makefile index cb451fd905..4f6fafea69 100644 --- a/core/Makefile +++ b/core/Makefile @@ -4210,16 +4210,25 @@ else ifeq ($(TARGET_PRODUCT),sdk) build_ota_package := false endif + # A target without a kernel or recovery fstab 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 ($(recovery_fstab),) - build_ota_package := false - endif + ifeq ($(INSTALLED_BOOTIMAGE_TARGET),) + ifeq ($(TARGET_NO_KERNEL),true) + build_ota_package := false + endif + ifeq ($(recovery_fstab),) + build_ota_package := false + endif + endif # INSTALLED_BOOTIMAGE_TARGET == "" endif # PRODUCT_BUILD_GENERIC_OTA_PACKAGE # Set build_otatools_package, and allow opt-out below. |