Various fixes to PRODUCT_BUILD_<IMAGE> variables.
- Introduces PRODUCT_BUILD_VENDOR_BOOT_IMAGE. - Controls vendor_boot.img, replacing TARGET_NO_VENDOR_BOOT. - Matches the naming convention of other similar vars. - Guards boot-debug.img behind BUILDING_BOOT_IMAGE - Restructures BUILDING_BOOT_IMAGE to give priority to PRODUCT_BUILD_BOOT_IMAGE, as do other partitions. - ^ for BUILDING_RECOVERY_IMAGE. Test: PRODUCT_BUILD_{BOOT,RECOVERY,VENDOR_BOOT}_IMAGE := false m dist Observe no boot, boot-debug, recovery, or vendor_boot images. Bug: 169968221 Bug: 170423509 Change-Id: I629bf08ba08e5db14c1bf92bb338fb3ce59d5b73
This commit is contained in:
parent
2f171ac0a5
commit
42879ff536
|
@ -2094,6 +2094,7 @@ endif # BUILDING_RAMDISK_IMAGE
|
|||
#
|
||||
# Note: it's intentional to skip signing for boot-debug.img, because it
|
||||
# can only be used if the device is unlocked with verification error.
|
||||
ifdef BUILDING_BOOT_IMAGE
|
||||
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
|
||||
ifneq ($(strip $(BOARD_KERNEL_BINARIES)),)
|
||||
INSTALLED_DEBUG_BOOTIMAGE_TARGET := $(foreach k,$(subst kernel,boot-debug,$(BOARD_KERNEL_BINARIES)), \
|
||||
|
@ -2148,6 +2149,7 @@ bootimage_debug-nodeps: $(MKBOOTIMG)
|
|||
$(foreach b,$(INSTALLED_DEBUG_BOOTIMAGE_TARGET),$(call build-debug-bootimage-target,$b))
|
||||
|
||||
endif # TARGET_NO_KERNEL
|
||||
endif # BUILDING_BOOT_IMAGE
|
||||
|
||||
ifeq ($(BUILDING_VENDOR_BOOT_IMAGE),true)
|
||||
ifeq ($(BUILDING_RAMDISK_IMAGE),true)
|
||||
|
|
|
@ -342,23 +342,29 @@ endif
|
|||
|
||||
# Are we building a boot image
|
||||
BUILDING_BOOT_IMAGE :=
|
||||
ifeq ($(PRODUCT_BUILD_BOOT_IMAGE),)
|
||||
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
|
||||
BUILDING_BOOT_IMAGE :=
|
||||
else ifeq ($(PRODUCT_BUILD_BOOT_IMAGE),)
|
||||
ifdef BOARD_BOOTIMAGE_PARTITION_SIZE
|
||||
else ifdef BOARD_BOOTIMAGE_PARTITION_SIZE
|
||||
BUILDING_BOOT_IMAGE := true
|
||||
endif
|
||||
else ifeq ($(PRODUCT_BUILD_BOOT_IMAGE),true)
|
||||
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
|
||||
$(warning *** PRODUCT_BUILD_BOOT_IMAGE is true, but so is BOARD_USES_RECOVERY_AS_BOOT.)
|
||||
$(warning *** Skipping building boot image.)
|
||||
BUILDING_BOOT_IMAGE :=
|
||||
else
|
||||
BUILDING_BOOT_IMAGE := true
|
||||
endif
|
||||
endif
|
||||
.KATI_READONLY := BUILDING_BOOT_IMAGE
|
||||
|
||||
# Are we building a recovery image
|
||||
BUILDING_RECOVERY_IMAGE :=
|
||||
ifeq ($(PRODUCT_BUILD_RECOVERY_IMAGE),)
|
||||
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
|
||||
BUILDING_RECOVERY_IMAGE := true
|
||||
else ifeq ($(PRODUCT_BUILD_RECOVERY_IMAGE),)
|
||||
ifdef BOARD_RECOVERYIMAGE_PARTITION_SIZE
|
||||
else ifdef BOARD_RECOVERYIMAGE_PARTITION_SIZE
|
||||
ifeq (,$(filter true, $(TARGET_NO_KERNEL) $(TARGET_NO_RECOVERY)))
|
||||
BUILDING_RECOVERY_IMAGE := true
|
||||
endif
|
||||
|
@ -372,9 +378,16 @@ endif
|
|||
BUILDING_VENDOR_BOOT_IMAGE :=
|
||||
ifdef BOARD_BOOT_HEADER_VERSION
|
||||
ifneq ($(call math_gt_or_eq,$(BOARD_BOOT_HEADER_VERSION),3),)
|
||||
ifneq ($(TARGET_NO_VENDOR_BOOT),)
|
||||
$(warning TARGET_NO_VENDOR_BOOT has been deprecated. Please use PRODUCT_BUILD_VENDOR_BOOT_IMAGE.)
|
||||
ifneq ($(TARGET_NO_VENDOR_BOOT),true)
|
||||
BUILDING_VENDOR_BOOT_IMAGE := true
|
||||
endif
|
||||
else ifeq ($(PRODUCT_BUILD_VENDOR_BOOT_IMAGE),)
|
||||
BUILDING_VENDOR_BOOT_IMAGE := true
|
||||
else ifeq ($(PRODUCT_BUILD_VENDOR_BOOT_IMAGE),true)
|
||||
BUILDING_VENDOR_BOOT_IMAGE := true
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
.KATI_READONLY := BUILDING_VENDOR_BOOT_IMAGE
|
||||
|
|
|
@ -380,6 +380,7 @@ _product_single_value_vars += PRODUCT_BUILD_RAMDISK_IMAGE
|
|||
_product_single_value_vars += PRODUCT_BUILD_USERDATA_IMAGE
|
||||
_product_single_value_vars += PRODUCT_BUILD_RECOVERY_IMAGE
|
||||
_product_single_value_vars += PRODUCT_BUILD_BOOT_IMAGE
|
||||
_product_single_value_vars += PRODUCT_BUILD_VENDOR_BOOT_IMAGE
|
||||
_product_single_value_vars += PRODUCT_BUILD_VBMETA_IMAGE
|
||||
|
||||
# List of boot jars delivered via apex
|
||||
|
|
Loading…
Reference in New Issue