Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 989d0f0b authored by David Anderson's avatar David Anderson Committed by android-build-merger
Browse files

Merge "releasetools: Specify a minimum size for right-sized images." am: ca676bc6

am: 7031e19f

Change-Id: I175260e080057aa09270de870b3edcdcdfdba612
parents f3c0c3ad 7031e19f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -431,6 +431,9 @@ def BuildImage(in_dir, prop_dict, out_file, target_out=None):
          size = common.RoundUpTo4K(size)
        else:
          size = ((size + block_size - 1) // block_size) * block_size
        # Use a minimum size, otherwise we will fail to calculate an AVB footer
        # or fail to construct an ext4 image.
        size = max(size, 256 * 1024)
      extfs_inode_count = prop_dict["extfs_inode_count"]
      inodes = int(fs_dict.get("Inode count", extfs_inode_count))
      inodes -= int(fs_dict.get("Free inodes", "0"))