Merge "Build repeatable system images with mke2fs."

This commit is contained in:
Treehugger Robot
2017-10-18 17:20:00 +00:00
committed by Gerrit Code Review
2 changed files with 20 additions and 0 deletions

View File

@@ -483,6 +483,12 @@ def BuildImage(in_dir, prop_dict, out_file, target_out=None):
build_command.extend(["-e", prop_dict["flash_erase_block_size"]])
if "flash_logical_block_size" in prop_dict:
build_command.extend(["-o", prop_dict["flash_logical_block_size"]])
# Specify UUID and hash_seed if using mke2fs.
if prop_dict["ext_mkuserimg"] == "mkuserimg_mke2fs.sh":
if "uuid" in prop_dict:
build_command.extend(["-U", prop_dict["uuid"]])
if "hash_seed" in prop_dict:
build_command.extend(["-S", prop_dict["hash_seed"]])
if "selinux_fc" in prop_dict:
build_command.append(prop_dict["selinux_fc"])
elif fs_type.startswith("squash"):