Merge changes Ieb58dd9a,I8ada38df into oc-dev
* changes: AVB: support BOARD_BUILD_SYSTEM_ROOT_IMAGE AVB: support signing vendor.img
This commit is contained in:
committed by
Android (Google) Code Review
commit
dd4cdfd30a
@@ -285,15 +285,19 @@ def AddUserdata(output_zip, prefix="IMAGES/"):
|
||||
img.Write()
|
||||
|
||||
|
||||
def AddVBMeta(output_zip, boot_img_path, system_img_path, prefix="IMAGES/"):
|
||||
def AddVBMeta(output_zip, boot_img_path, system_img_path, vendor_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"
|
||||
cmd = [avbtool, "make_vbmeta_image",
|
||||
"--output", img.name,
|
||||
"--include_descriptors_from_image", boot_img_path,
|
||||
"--include_descriptors_from_image", system_img_path,
|
||||
"--generate_dm_verity_cmdline_from_hashtree", system_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 OPTIONS.info_dict.get("system_root_image", None) == "true":
|
||||
cmd.extend(["--setup_rootfs_from_kernel", system_img_path])
|
||||
common.AppendAVBSigningArgs(cmd)
|
||||
args = OPTIONS.info_dict.get("board_avb_make_vbmeta_image_args", None)
|
||||
if args and args.strip():
|
||||
@@ -477,7 +481,7 @@ 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)
|
||||
AddVBMeta(output_zip, boot_contents.name, system_img_path, vendor_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
|
||||
|
Reference in New Issue
Block a user