Loading core/Makefile +7 −0 Original line number Diff line number Diff line Loading @@ -3980,6 +3980,7 @@ endif $(hide) cp $(SELINUX_FC) $(zip_root)/META/file_contexts.bin $(hide) echo "recovery_api_version=$(PRIVATE_RECOVERY_API_VERSION)" > $(zip_root)/META/misc_info.txt $(hide) echo "fstab_version=$(PRIVATE_RECOVERY_FSTAB_VERSION)" >> $(zip_root)/META/misc_info.txt ifdef BOARD_FLASH_BLOCK_SIZE $(hide) echo "blocksize=$(BOARD_FLASH_BLOCK_SIZE)" >> $(zip_root)/META/misc_info.txt endif Loading @@ -3989,6 +3990,12 @@ endif ifeq ($(INSTALLED_RECOVERYIMAGE_TARGET),) $(hide) echo "no_recovery=true" >> $(zip_root)/META/misc_info.txt endif ifeq ($(TARGET_NO_BOOTIMAGE),true) $(hide) echo "no_boot=true" >> $(zip_root)/META/misc_info.txt else $(hide) echo "no_boot=false" >> $(zip_root)/META/misc_info.txt endif ifdef BOARD_INCLUDE_RECOVERY_DTBO $(hide) echo "include_recovery_dtbo=true" >> $(zip_root)/META/misc_info.txt endif Loading tools/releasetools/add_img_to_target_files.py +13 −9 Original line number Diff line number Diff line Loading @@ -733,6 +733,8 @@ def AddImagesToTargetFiles(filename): has_recovery = OPTIONS.info_dict.get("no_recovery") != "true" has_boot = OPTIONS.info_dict.get("no_boot") != "true" # {vendor,odm,product,product_services}.img are unlike system.img or # system_other.img. Because it could be built from source, or dropped into # target_files.zip as a prebuilt blob. We consider either of them as Loading Loading @@ -781,6 +783,8 @@ def AddImagesToTargetFiles(filename): banner("boot") # common.GetBootableImage() returns the image directly if present. boot_image = None if(has_boot): boot_image = common.GetBootableImage( "IMAGES/boot.img", "boot.img", OPTIONS.input_tmp, "BOOT") # boot.img may be unavailable in some targets (e.g. aosp_arm64). Loading tools/releasetools/common.py +2 −1 Original line number Diff line number Diff line Loading @@ -779,7 +779,8 @@ def GetBootableImage(name, prebuilt_name, unpack_dir, tree_subdir, if info_dict is None: info_dict = OPTIONS.info_dict if info_dict["no_boot"] == "true" and prebuilt_name == "boot.img": return None # With system_root_image == "true", we don't pack ramdisk into the boot image. # Unless "recovery_as_boot" is specified, in which case we carry the ramdisk # for recovery. Loading tools/releasetools/ota_from_target_files.py +7 −6 Original line number Diff line number Diff line Loading @@ -992,7 +992,7 @@ def WriteFullOTAPackage(input_zip, output_file): input_tmp=OPTIONS.input_tmp, metadata=metadata, info_dict=OPTIONS.info_dict) if target_info["no_boot"] != "true": assert HasRecoveryPatch(input_zip) # Assertions (e.g. downgrade check, device properties check). Loading Loading @@ -1100,6 +1100,7 @@ else if get_stage("%(bcb_dev)s") == "3/3" then boot_img = common.GetBootableImage( "boot.img", "boot.img", OPTIONS.input_tmp, "BOOT") if boot_img != None: common.CheckSize(boot_img.data, "boot.img", target_info) common.ZipWriteStr(output_zip, "boot.img", boot_img.data) Loading @@ -1108,7 +1109,7 @@ else if get_stage("%(bcb_dev)s") == "3/3" then if OPTIONS.backuptool: script.ShowProgress(0.02, 10) script.RunBackup("restore", sysmount, target_info.get('use_dynamic_partitions') == "true") if boot_img != None: script.WriteRawImage("/boot", "boot.img") script.ShowProgress(0.1, 10) Loading Loading
core/Makefile +7 −0 Original line number Diff line number Diff line Loading @@ -3980,6 +3980,7 @@ endif $(hide) cp $(SELINUX_FC) $(zip_root)/META/file_contexts.bin $(hide) echo "recovery_api_version=$(PRIVATE_RECOVERY_API_VERSION)" > $(zip_root)/META/misc_info.txt $(hide) echo "fstab_version=$(PRIVATE_RECOVERY_FSTAB_VERSION)" >> $(zip_root)/META/misc_info.txt ifdef BOARD_FLASH_BLOCK_SIZE $(hide) echo "blocksize=$(BOARD_FLASH_BLOCK_SIZE)" >> $(zip_root)/META/misc_info.txt endif Loading @@ -3989,6 +3990,12 @@ endif ifeq ($(INSTALLED_RECOVERYIMAGE_TARGET),) $(hide) echo "no_recovery=true" >> $(zip_root)/META/misc_info.txt endif ifeq ($(TARGET_NO_BOOTIMAGE),true) $(hide) echo "no_boot=true" >> $(zip_root)/META/misc_info.txt else $(hide) echo "no_boot=false" >> $(zip_root)/META/misc_info.txt endif ifdef BOARD_INCLUDE_RECOVERY_DTBO $(hide) echo "include_recovery_dtbo=true" >> $(zip_root)/META/misc_info.txt endif Loading
tools/releasetools/add_img_to_target_files.py +13 −9 Original line number Diff line number Diff line Loading @@ -733,6 +733,8 @@ def AddImagesToTargetFiles(filename): has_recovery = OPTIONS.info_dict.get("no_recovery") != "true" has_boot = OPTIONS.info_dict.get("no_boot") != "true" # {vendor,odm,product,product_services}.img are unlike system.img or # system_other.img. Because it could be built from source, or dropped into # target_files.zip as a prebuilt blob. We consider either of them as Loading Loading @@ -781,6 +783,8 @@ def AddImagesToTargetFiles(filename): banner("boot") # common.GetBootableImage() returns the image directly if present. boot_image = None if(has_boot): boot_image = common.GetBootableImage( "IMAGES/boot.img", "boot.img", OPTIONS.input_tmp, "BOOT") # boot.img may be unavailable in some targets (e.g. aosp_arm64). Loading
tools/releasetools/common.py +2 −1 Original line number Diff line number Diff line Loading @@ -779,7 +779,8 @@ def GetBootableImage(name, prebuilt_name, unpack_dir, tree_subdir, if info_dict is None: info_dict = OPTIONS.info_dict if info_dict["no_boot"] == "true" and prebuilt_name == "boot.img": return None # With system_root_image == "true", we don't pack ramdisk into the boot image. # Unless "recovery_as_boot" is specified, in which case we carry the ramdisk # for recovery. Loading
tools/releasetools/ota_from_target_files.py +7 −6 Original line number Diff line number Diff line Loading @@ -992,7 +992,7 @@ def WriteFullOTAPackage(input_zip, output_file): input_tmp=OPTIONS.input_tmp, metadata=metadata, info_dict=OPTIONS.info_dict) if target_info["no_boot"] != "true": assert HasRecoveryPatch(input_zip) # Assertions (e.g. downgrade check, device properties check). Loading Loading @@ -1100,6 +1100,7 @@ else if get_stage("%(bcb_dev)s") == "3/3" then boot_img = common.GetBootableImage( "boot.img", "boot.img", OPTIONS.input_tmp, "BOOT") if boot_img != None: common.CheckSize(boot_img.data, "boot.img", target_info) common.ZipWriteStr(output_zip, "boot.img", boot_img.data) Loading @@ -1108,7 +1109,7 @@ else if get_stage("%(bcb_dev)s") == "3/3" then if OPTIONS.backuptool: script.ShowProgress(0.02, 10) script.RunBackup("restore", sysmount, target_info.get('use_dynamic_partitions') == "true") if boot_img != None: script.WriteRawImage("/boot", "boot.img") script.ShowProgress(0.1, 10) Loading