Merge "support different boot partition sizes in aosp_arm64" am: def74b4c2b am: 3bfb87b96b

Change-Id: Iff0c4a70c7a3ed43d2f96a72a0dd16c4301386f0
This commit is contained in:
Treehugger Robot
2020-05-19 22:02:28 +00:00
committed by Automerger Merge Worker
3 changed files with 35 additions and 10 deletions

View File

@@ -677,9 +677,14 @@ def LoadInfoDict(input_file, repacking=False):
makeint("userdata_size")
makeint("cache_size")
makeint("recovery_size")
makeint("boot_size")
makeint("fstab_version")
boot_images = "boot.img"
if "boot_images" in d:
boot_images = d["boot_images"]
for b in boot_images.split():
makeint(b.replace(".img","_size"))
# Load recovery fstab if applicable.
d["fstab"] = _FindAndLoadRecoveryFstab(d, input_file, read_helper)
@@ -1340,7 +1345,10 @@ def _BuildBootableImage(image_name, sourcedir, fs_config_file, info_dict=None,
# AVB: if enabled, calculate and add hash to boot.img or recovery.img.
if info_dict.get("avb_enable") == "true":
avbtool = info_dict["avb_avbtool"]
part_size = info_dict[partition_name + "_size"]
if partition_name == "recovery":
part_size = info_dict["recovery_size"]
else:
part_size = info_dict[image_name.replace(".img","_size")]
cmd = [avbtool, "add_hash_footer", "--image", img.name,
"--partition_size", str(part_size), "--partition_name",
partition_name]