Support building chained VBMeta images.

Bug: 112007947
Test: `m dist` with aosp_taimen-userdebug.
Test: Set up a target that uses chained VBMeta images of
      `vbmeta_mainline` and `vbmeta_vendor`. `m dist` and check the
      build log, as well as outputs from
      `avbtool info_image --image vbmeta.img`,
      `avbtool info_image --image vbmeta_mainline.img`,
      `avbtool info_image --image vbmeta_vendor.img`.
Change-Id: Ib1d4e97f583b65245703eae15d211adcd9e83741
This commit is contained in:
Tao Bao
2018-08-20 21:09:07 -07:00
parent 71034e3764
commit 744c4c7604
3 changed files with 158 additions and 20 deletions

View File

@@ -408,7 +408,7 @@ def AppendAVBSigningArgs(cmd, partition):
cmd.extend(["--key", key_path, "--algorithm", algorithm])
avb_salt = OPTIONS.info_dict.get("avb_salt")
# make_vbmeta_image doesn't like "--salt" (and it's not needed).
if avb_salt and partition != "vbmeta":
if avb_salt and not partition.startswith("vbmeta"):
cmd.extend(["--salt", avb_salt])