forked from openkylin/platform_build
Merge "Allow BOARD_USES_RECOVERY_AS_BOOT without BOARD_BUILD_SYSTEM_ROOT_IMAGE"
am: b6eeba5bab
Change-Id: Ie75a57cad2f8024b61173da5d5aef0ca726ff9be
This commit is contained in:
commit
e490e330a0
|
@ -847,13 +847,6 @@ INTERNAL_MKBOOTIMG_VERSION_ARGS := \
|
||||||
--os_version $(PLATFORM_VERSION) \
|
--os_version $(PLATFORM_VERSION) \
|
||||||
--os_patch_level $(PLATFORM_SECURITY_PATCH)
|
--os_patch_level $(PLATFORM_SECURITY_PATCH)
|
||||||
|
|
||||||
# BOARD_USES_RECOVERY_AS_BOOT = true must have BOARD_BUILD_SYSTEM_ROOT_IMAGE = true.
|
|
||||||
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
|
|
||||||
ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
|
|
||||||
$(error BOARD_BUILD_SYSTEM_ROOT_IMAGE must be enabled for BOARD_USES_RECOVERY_AS_BOOT.)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# We build recovery as boot image if BOARD_USES_RECOVERY_AS_BOOT is true.
|
# We build recovery as boot image if BOARD_USES_RECOVERY_AS_BOOT is true.
|
||||||
ifneq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
|
ifneq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
|
||||||
ifeq ($(TARGET_BOOTIMAGE_USE_EXT2),true)
|
ifeq ($(TARGET_BOOTIMAGE_USE_EXT2),true)
|
||||||
|
@ -1552,17 +1545,14 @@ endif
|
||||||
# (BOARD_USES_FULL_RECOVERY_IMAGE = true);
|
# (BOARD_USES_FULL_RECOVERY_IMAGE = true);
|
||||||
# b) We build a single image that contains boot and recovery both - no recovery image to install
|
# b) We build a single image that contains boot and recovery both - no recovery image to install
|
||||||
# (BOARD_USES_RECOVERY_AS_BOOT = true);
|
# (BOARD_USES_RECOVERY_AS_BOOT = true);
|
||||||
# c) We build the root into system image - not needing the resource file as we do bsdiff
|
# c) We mount the system image as / and therefore do not have a ramdisk in boot.img
|
||||||
# (BOARD_BUILD_SYSTEM_ROOT_IMAGE = true).
|
# (BOARD_BUILD_SYSTEM_ROOT_IMAGE = true).
|
||||||
# d) We include the recovery DTBO image within recovery - not needing the resource file as we
|
# d) We include the recovery DTBO image within recovery - not needing the resource file as we
|
||||||
# do bsdiff because boot and recovery will contain different number of entries
|
# do bsdiff because boot and recovery will contain different number of entries
|
||||||
# (BOARD_INCLUDE_RECOVERY_DTBO = true).
|
# (BOARD_INCLUDE_RECOVERY_DTBO = true).
|
||||||
# Note that condition b) implies condition c), because of the earlier check in this file:
|
|
||||||
# "BOARD_USES_RECOVERY_AS_BOOT = true must have BOARD_BUILD_SYSTEM_ROOT_IMAGE = true" (not vice
|
|
||||||
# versa though).
|
|
||||||
|
|
||||||
ifeq (,$(filter true, $(BOARD_USES_FULL_RECOVERY_IMAGE) $(BOARD_BUILD_SYSTEM_ROOT_IMAGE) \
|
ifeq (,$(filter true, $(BOARD_USES_FULL_RECOVERY_IMAGE) $(BOARD_USES_RECOVERY_AS_BOOT) \
|
||||||
$(BOARD_INCLUDE_RECOVERY_DTBO)))
|
$(BOARD_BUILD_SYSTEM_ROOT_IMAGE) $(BOARD_INCLUDE_RECOVERY_DTBO)))
|
||||||
# Named '.dat' so we don't attempt to use imgdiff for patching it.
|
# Named '.dat' so we don't attempt to use imgdiff for patching it.
|
||||||
RECOVERY_RESOURCE_ZIP := $(TARGET_OUT)/etc/recovery-resource.dat
|
RECOVERY_RESOURCE_ZIP := $(TARGET_OUT)/etc/recovery-resource.dat
|
||||||
else
|
else
|
||||||
|
@ -3580,12 +3570,12 @@ ifdef BOARD_ODMIMAGE_FILE_SYSTEM_TYPE
|
||||||
endif
|
endif
|
||||||
@# ROOT always contains the files for the root under normal boot.
|
@# ROOT always contains the files for the root under normal boot.
|
||||||
$(hide) $(call fs_config,$(zip_root)/ROOT,) > $(zip_root)/META/root_filesystem_config.txt
|
$(hide) $(call fs_config,$(zip_root)/ROOT,) > $(zip_root)/META/root_filesystem_config.txt
|
||||||
ifeq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
|
|
||||||
@# BOOT/RAMDISK exists only if additionally using BOARD_USES_RECOVERY_AS_BOOT.
|
|
||||||
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
|
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
|
||||||
|
@# BOOT/RAMDISK exists and contains the ramdisk for recovery if using BOARD_USES_RECOVERY_AS_BOOT.
|
||||||
$(hide) $(call fs_config,$(zip_root)/BOOT/RAMDISK,) > $(zip_root)/META/boot_filesystem_config.txt
|
$(hide) $(call fs_config,$(zip_root)/BOOT/RAMDISK,) > $(zip_root)/META/boot_filesystem_config.txt
|
||||||
endif
|
endif
|
||||||
else # BOARD_BUILD_SYSTEM_ROOT_IMAGE != true
|
ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true)
|
||||||
|
@# BOOT/RAMDISK also exists and contains the first stage ramdisk if not using BOARD_BUILD_SYSTEM_ROOT_IMAGE.
|
||||||
$(hide) $(call fs_config,$(zip_root)/BOOT/RAMDISK,) > $(zip_root)/META/boot_filesystem_config.txt
|
$(hide) $(call fs_config,$(zip_root)/BOOT/RAMDISK,) > $(zip_root)/META/boot_filesystem_config.txt
|
||||||
endif
|
endif
|
||||||
ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),)
|
ifneq ($(INSTALLED_RECOVERYIMAGE_TARGET),)
|
||||||
|
|
|
@ -597,8 +597,7 @@ def ReplaceOtaKeys(input_tf_zip, output_tf_zip, misc_info):
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
raise common.ExternalError("failed to run dumpkeys")
|
raise common.ExternalError("failed to run dumpkeys")
|
||||||
|
|
||||||
if (misc_info.get("system_root_image") == "true" and
|
if misc_info.get("recovery_as_boot") == "true":
|
||||||
misc_info.get("recovery_as_boot") == "true"):
|
|
||||||
recovery_keys_location = "BOOT/RAMDISK/res/keys"
|
recovery_keys_location = "BOOT/RAMDISK/res/keys"
|
||||||
else:
|
else:
|
||||||
recovery_keys_location = "RECOVERY/RAMDISK/res/keys"
|
recovery_keys_location = "RECOVERY/RAMDISK/res/keys"
|
||||||
|
|
Loading…
Reference in New Issue