Merge "build_image: Query the actual image size after invoking the final mkfs." am: 0096a750c2
Original change: https://android-review.googlesource.com/c/platform/build/+/1889816 Change-Id: Id05c93d2115fdb6d0e83fe6bf271cb325d18cdb9
This commit is contained in:
commit
965ca0d965
1 changed files with 4 additions and 0 deletions
|
@ -651,6 +651,10 @@ def BuildImage(in_dir, prop_dict, out_file, target_out=None):
|
||||||
if not mkfs_output:
|
if not mkfs_output:
|
||||||
mkfs_output = BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config)
|
mkfs_output = BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config)
|
||||||
|
|
||||||
|
# Update the image (eg filesystem size). This can be different eg if mkfs
|
||||||
|
# rounds the requested size down due to alignment.
|
||||||
|
prop_dict["image_size"] = common.sparse_img.GetImagePartitionSize(out_file)
|
||||||
|
|
||||||
# Check if there's enough headroom space available for ext4 image.
|
# Check if there's enough headroom space available for ext4 image.
|
||||||
if "partition_headroom" in prop_dict and fs_type.startswith("ext4"):
|
if "partition_headroom" in prop_dict and fs_type.startswith("ext4"):
|
||||||
CheckHeadroom(mkfs_output, prop_dict)
|
CheckHeadroom(mkfs_output, prop_dict)
|
||||||
|
|
Loading…
Reference in a new issue