Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ade48be7 authored by SzuWei Lin's avatar SzuWei Lin Committed by Automerger Merge Worker
Browse files

Merge "Rename the boot image for avb validation" into rvc-dev am: d7dabee7

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/12005766

Change-Id: I3469e1d0c892ed62b91068803c5e9677694b8029
parents bdd4fa53 d7dabee7
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -371,6 +371,17 @@ def ValidateVerifiedBootImages(input_tmp, info_dict, options):
            partition, info_dict, key_file)
            partition, info_dict, key_file)
        cmd.extend(['--expected_chain_partition', chained_partition_arg])
        cmd.extend(['--expected_chain_partition', chained_partition_arg])


    # Handle the boot image with a non-default name, e.g. boot-5.4.img
    boot_images = info_dict.get("boot_images")
    if boot_images:
      # we used the 1st boot image to generate the vbmeta. Rename the filename
      # to boot.img so that avbtool can find it correctly.
      first_image_name = boot_images.split()[0]
      first_image_path = os.path.join(input_tmp, 'IMAGES', first_image_name)
      assert os.path.isfile(first_image_path)
      renamed_boot_image_path = os.path.join(input_tmp, 'IMAGES', 'boot.img')
      os.rename(first_image_path, renamed_boot_image_path)

    proc = common.Run(cmd)
    proc = common.Run(cmd)
    stdoutdata, _ = proc.communicate()
    stdoutdata, _ = proc.communicate()
    assert proc.returncode == 0, \
    assert proc.returncode == 0, \