Merge "releasetools: Fix the reference to OPTIONS.info_dict." am: 0a5b59e78b

am: 8b6d59e110

Change-Id: If2385afbd245654f27a96f02414856a7ce546a00
This commit is contained in:
Tao Bao 2016-09-30 17:48:38 +00:00 committed by android-build-merger
commit b00dbd1b11
1 changed files with 3 additions and 3 deletions

View File

@ -514,13 +514,13 @@ def _BuildBootableImage(sourcedir, fs_config_file, info_dict=None,
img_keyblock.close()
# AVB: if enabled, calculate and add hash to boot.img.
if OPTIONS.info_dict.get("board_avb_enable", None) == "true":
if info_dict.get("board_avb_enable", None) == "true":
avbtool = os.getenv('AVBTOOL') or "avbtool"
part_size = OPTIONS.info_dict.get("boot_size", None)
part_size = info_dict.get("boot_size", None)
cmd = [avbtool, "add_hash_footer", "--image", img.name,
"--partition_size", str(part_size), "--partition_name", "boot"]
AppendAVBSigningArgs(cmd)
args = OPTIONS.info_dict.get("board_avb_boot_add_hash_footer_args", None)
args = info_dict.get("board_avb_boot_add_hash_footer_args", None)
if args and args.strip():
cmd.extend(shlex.split(args))
p = Run(cmd, stdout=subprocess.PIPE)