Merge "add dtbo support for ota" am: 294d5c5f07
am: 793a9bb490
am: d2f336664c
Change-Id: I800efcf88ddb00d9624514b1c748e998f1ebd3e5
This commit is contained in:
commit
3a3d9c5837
2 changed files with 17 additions and 2 deletions
|
@ -2356,6 +2356,10 @@ endif
|
|||
ifdef BOARD_PREBUILT_VENDORIMAGE
|
||||
$(hide) mkdir -p $(zip_root)/IMAGES
|
||||
$(hide) cp $(INSTALLED_VENDORIMAGE_TARGET) $(zip_root)/IMAGES/
|
||||
endif
|
||||
ifdef BOARD_PREBUILT_DTBOIMAGE
|
||||
$(hide) mkdir -p $(zip_root)/IMAGES
|
||||
$(hide) cp $(INSTALLED_DTBOIMAGE_TARGET) $(zip_root)/IMAGES/
|
||||
endif
|
||||
@# Run fs_config on all the system, vendor, boot ramdisk,
|
||||
@# and recovery ramdisk files in the zip, and save the output
|
||||
|
|
|
@ -166,6 +166,13 @@ def AddVendor(output_zip, prefix="IMAGES/"):
|
|||
block_list=block_list)
|
||||
return img.name
|
||||
|
||||
def FindDtboPrebuilt(prefix="IMAGES/"):
|
||||
"""Find the prebuilt image of DTBO partition."""
|
||||
|
||||
prebuilt_path = os.path.join(OPTIONS.input_tmp, prefix, "dtbo.img")
|
||||
if os.path.exists(prebuilt_path):
|
||||
return prebuilt_path
|
||||
return None
|
||||
|
||||
def CreateImage(input_dir, info_dict, what, output_file, block_list=None):
|
||||
print("creating " + what + ".img...")
|
||||
|
@ -286,7 +293,7 @@ def AddUserdata(output_zip, prefix="IMAGES/"):
|
|||
|
||||
|
||||
def AddVBMeta(output_zip, boot_img_path, system_img_path, vendor_img_path,
|
||||
prefix="IMAGES/"):
|
||||
dtbo_img_path, prefix="IMAGES/"):
|
||||
"""Create a VBMeta image and store it in output_zip."""
|
||||
img = OutputFile(output_zip, OPTIONS.input_tmp, prefix, "vbmeta.img")
|
||||
avbtool = os.getenv('AVBTOOL') or "avbtool"
|
||||
|
@ -296,6 +303,8 @@ def AddVBMeta(output_zip, boot_img_path, system_img_path, vendor_img_path,
|
|||
"--include_descriptors_from_image", system_img_path]
|
||||
if vendor_img_path is not None:
|
||||
cmd.extend(["--include_descriptors_from_image", vendor_img_path])
|
||||
if dtbo_img_path is not None:
|
||||
cmd.extend(["--include_descriptors_from_image", dtbo_img_path])
|
||||
if OPTIONS.info_dict.get("system_root_image", None) == "true":
|
||||
cmd.extend(["--setup_rootfs_from_kernel", system_img_path])
|
||||
common.AppendAVBSigningArgs(cmd)
|
||||
|
@ -481,7 +490,9 @@ def AddImagesToTargetFiles(filename):
|
|||
if OPTIONS.info_dict.get("board_avb_enable", None) == "true":
|
||||
banner("vbmeta")
|
||||
boot_contents = boot_image.WriteToTemp()
|
||||
AddVBMeta(output_zip, boot_contents.name, system_img_path, vendor_img_path)
|
||||
dtbo_img_path = FindDtboPrebuilt()
|
||||
AddVBMeta(output_zip, boot_contents.name, system_img_path,
|
||||
vendor_img_path, dtbo_img_path)
|
||||
|
||||
# For devices using A/B update, copy over images from RADIO/ and/or
|
||||
# VENDOR_IMAGES/ to IMAGES/ and make sure we have all the needed
|
||||
|
|
Loading…
Reference in a new issue