No description
Find a file
Tao Bao c2606eb548 releasetools: Fix an issue in image size computation.
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
2018-07-26 16:59:57 +00:00
core Merge "Generate unstripped .oat files in the symbols directory." 2018-07-26 12:10:53 +00:00
target Merge "Add A/B update to GSI" 2018-07-23 14:22:56 +00:00
tests Only set TARGET_PLATFORM version in lunch when explicitly requested 2017-05-03 02:47:59 +00:00
tools releasetools: Fix an issue in image size computation. 2018-07-26 16:59:57 +00:00
.gitignore Add build subprojects to .gitignore 2015-07-23 13:18:47 -07:00
Android.mk Fix the build when using findleaves.py 2017-08-08 09:45:12 -07:00
buildspec.mk.default Add TARGET_PLATFORM_VERSION to lunch 2017-03-23 09:44:08 -07:00
Changes.md Mark implicit rules as obsolete 2018-06-21 21:42:29 -07:00
CleanSpec.mk Move merged AndroidManifest.xml file to manifest subdirectory 2018-06-14 14:38:54 -07:00
envsetup.sh Add Atest tab completion script. 2018-07-17 14:27:32 +08:00
help.sh Add support for /product-services partition 2018-07-19 11:15:11 +01:00
navbar.md Mark envsetup.sh vars as deprecated in makefiles 2017-11-28 14:19:50 -08:00
OWNERS Add Nan to OWNERS 2018-01-18 15:50:07 -08:00
README.md Mark envsetup.sh vars as deprecated in makefiles 2017-11-28 14:19:50 -08:00
tapasHelp.sh Remove armv5te 2018-01-08 15:26:16 -08:00
Usage.txt Remove showcommands from docs 2018-07-14 09:32:13 -07:00

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.