Revert "Only assert-max-image-size for static partitions."
This reverts commit 67e4336912
.
Reason for revert: Broke master
Change-Id: I8a5054a42f145881437e2cb5b372f276bfdaa3d2
This commit is contained in:
@@ -18,8 +18,10 @@
|
||||
Builds output_image from the given input_directory, properties_file,
|
||||
and writes the image to target_output_directory.
|
||||
|
||||
If argument generated_prop_file exists, write additional properties to the file.
|
||||
|
||||
Usage: build_image.py input_directory properties_file output_image \\
|
||||
target_output_directory
|
||||
target_output_directory [generated_prop_file]
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
@@ -733,8 +735,13 @@ def GlobalDictFromImageProp(image_prop, mount_point):
|
||||
return d
|
||||
|
||||
|
||||
def SaveGlobalDict(filename, glob_dict):
|
||||
with open(filename, "w") as f:
|
||||
f.writelines(["%s=%s" % (key, value) for (key, value) in glob_dict.items()])
|
||||
|
||||
|
||||
def main(argv):
|
||||
if len(argv) != 4:
|
||||
if len(argv) < 4 or len(argv) > 5:
|
||||
print(__doc__)
|
||||
sys.exit(1)
|
||||
|
||||
@@ -744,6 +751,7 @@ def main(argv):
|
||||
glob_dict_file = argv[1]
|
||||
out_file = argv[2]
|
||||
target_out = argv[3]
|
||||
prop_file_out = argv[4] if len(argv) >= 5 else None
|
||||
|
||||
glob_dict = LoadGlobalDict(glob_dict_file)
|
||||
if "mount_point" in glob_dict:
|
||||
@@ -783,6 +791,10 @@ def main(argv):
|
||||
logger.error("Failed to build %s from %s", out_file, in_dir)
|
||||
raise
|
||||
|
||||
if prop_file_out:
|
||||
glob_dict_out = GlobalDictFromImageProp(image_properties, mount_point)
|
||||
SaveGlobalDict(prop_file_out, glob_dict_out)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
|
Reference in New Issue
Block a user