Allow building recovery as boot.
With BOARD_USES_RECOVERY_AS_BOOT = true, we skip building the
non-ramdisk boot.img but building the recovery image as boot.img. It
contains recovery's ramdisk (e.g. with /sbin/recovery). It depends on
the bootloader parameter (skip_initramfs) to determine the actual mode
to boot into.
Change-Id: Id6e2d0a2b94383944ca8f35bba688c6401745622
(cherry picked from commit d80bef2b9e
)
This commit is contained in:
committed by
Tao Bao
parent
18733b9b0c
commit
40ef35b9e9
@@ -494,8 +494,11 @@ def GetBootableImage(name, prebuilt_name, unpack_dir, tree_subdir,
|
||||
info_dict = OPTIONS.info_dict
|
||||
|
||||
# With system_root_image == "true", we don't pack ramdisk into the boot image.
|
||||
has_ramdisk = (info_dict.get("system_root_image", None) != "true" or
|
||||
prebuilt_name != "boot.img")
|
||||
# Unless "recovery_as_boot" is specified, in which case we carry the ramdisk
|
||||
# for recovery.
|
||||
has_ramdisk = (info_dict.get("system_root_image") != "true" or
|
||||
prebuilt_name != "boot.img" or
|
||||
info_dict.get("recovery_as_boot") == "true")
|
||||
|
||||
fs_config = "META/" + tree_subdir.lower() + "_filesystem_config.txt"
|
||||
data = _BuildBootableImage(os.path.join(unpack_dir, tree_subdir),
|
||||
|
Reference in New Issue
Block a user