releasetools: Return the actual image size when building logical partitions.
When verity is enabled, `partition_size` has the "adjusted" partition size for holding the filesystem files (i.e. excluding verity hashtree, and FEC metadata if applicable), whereas `original_partition_size` has the one for the actual image returned by build_image.py. `partition_size` must be smaller than `original_partition_size`. As a result, the later assertion in Makefile (e.g. assert-max-image-size) may fail to hold when using `partition_size`. This CL addresses the issue by returning the value in `original_partition_size` instead, if available. It also changes to include both values when dumping the size info on image creation failure. Fixes: 79106666 Test: `m dist` with aosp_walleye-userdebug Test: Set up walleye to use logical partitions, with a reserved size of 20MiB. `m systemimage` no longer fails. Test: Set up walleye that doesn't use verified boot. Use `m systemimage` to build an oversized image. Check the error message. Change-Id: I41d77bffa85e8eadfbf4a2a7dcd2e798fadfdab7
Loading
Please register or sign in to comment