Only assert-max-image-size for static partitions.

assert-max-image-size doesn't make sense for
dynamic partitions, as build_image.py always find the
right size for the output image. Hence:

- build_image.py no longer need to write generated_*_info.txt
  (which contains the size of the image).
- assert-max-image-size on the static BOARD_*IMAGE_PARTITION_SIZE. If
  a partition is dynamic, that variable isn't set, and
  assert-max-image-size becomes a no-op. If the partition is static,
  assert-max-image-size checks the static partition size as it used
  to be.
- Fix read-size-of-partitions to use the size of the partition by
  reading the image directly (instead of using generated_*_info.txt).

For devices without AVB, with DAP enabled, and does not have
RESERVED_SIZE for partitions, because of right sizing, the original
code always warns about approaching size limits. Since such checks
doesn't make sense for dynamic partitions, remove them.

Test: builds on device with dynamic partitions
Test: builds on cuttlefish with DAP enabled (without AVB), no
      more size limit warnings:
WARNING: out/target/product/vsoc_x86/vendor.img approaching size limit (X now; limit X)

Fixes: 122377935
Change-Id: I75e1b8322197cb18cf397d02aefd49d777bb6405
3 files changed
tree: 74d524fd8376f9c4d2691d258566e1f26eadd8b0
  1. common/
  2. core/
  3. packaging/
  4. target/
  5. tests/
  6. tools/
  7. .gitignore
  8. buildspec.mk.default
  9. Changes.md
  10. CleanSpec.mk
  11. envsetup.sh
  12. help.sh
  13. navbar.md
  14. OWNERS
  15. README.md
  16. tapasHelp.sh
  17. Usage.txt
README.md

Android Make Build System

This is the Makefile-based portion of the Android Build System.

For documentation on how to run a build, see Usage.txt

For a list of behavioral changes useful for Android.mk writers see Changes.md

For an outdated reference on Android.mk files, see build-system.html. Our Android.mk files look similar, but are entirely different from the Android.mk files used by the NDK build system. When searching for documentation elsewhere, ensure that it is for the platform build system -- most are not.

This Makefile-based system is in the process of being replaced with Soong, a new build system written in Go. During the transition, all of these makefiles are read by Kati, and generate a ninja file instead of being executed directly. That's combined with a ninja file read by Soong so that the build graph of the two systems can be combined and run as one.