c2606eb548
When building a system image with system_root_image enabled, the size computation should include files under both of in_dir (i.e. /system files) and root (pointed by 'root_dir'). Because files from both locations will end up into the built image. The files under root are usually only a few MiBs, but should be accounted for especially in the context of logical partitions (where the partition size will be allocated based on the actual need). Note that we will still need some "reserved space" (defined via BOARD_*_PARTITION_RESERVED_SIZE) to cover the cost for filesystem and/or verity metadata. This CL moves the combination of the two dirs up, before parsing and computing other properties. This doesn't affect anything for a successful image building path. It may however increase the time to error out in certain error path, since it copies the files earlier now. Test: python -m unittest test_build_image Test: `make dist` Test: Setup a target with PRODUCT_USE_LOGICAL_PARTITIONS == true and BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE == 20MiB. Build system image successfully. Test: Setup a target with PRODUCT_USE_LOGICAL_PARTITIONS == true and BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE == 20MiB. Write a large file to root dir (PRODUCT_OUT_ROOT). The image building fails, but reporting a size that accounts for both of /system and root. Change-Id: Idfb26b8e259626ba57ec3bd4f85d357c30e56163 |
||
---|---|---|
core | ||
target | ||
tests | ||
tools | ||
.gitignore | ||
Android.mk | ||
buildspec.mk.default | ||
Changes.md | ||
CleanSpec.mk | ||
envsetup.sh | ||
help.sh | ||
navbar.md | ||
OWNERS | ||
README.md | ||
tapasHelp.sh | ||
Usage.txt |
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.