Commit graph

34468 commits

Author SHA1 Message Date
Tianjie Xu
b0a29ad8c2 Generate brotli compressed {}.new.dat for full OTA
Brotli has a better compression ratio than deflation. So for non-AB
full OTA, we can compress the new.dat with brotli first and store it
in the zip package.
This increase the OTA generation time by ~5 minutes for a full OTA
(measured based on 2.0G system.new.dat)

Bug: 34220646
Test: Generate a full OTA for bullhead
Change-Id: I9c0550af8eafcfa68711f74290c8e2d05a96648f
2017-07-14 10:53:21 -07:00
Colin Cross
bc45a33c93 Merge "Refactor prebuilt tools" 2017-07-07 20:19:24 +00:00
Ivan Lozano
05900230fd Merge "Add integer_overflow sanitization build option." 2017-07-07 20:07:20 +00:00
Colin Cross
cd20d5980c Refactor prebuilt tools
Put the prebuilt and non-prebuilt tools selections into the two
clauses of an if block to simplify the next patch.

Test: m -j checkbuild
Change-Id: Idd01bc81a2b619f7fc23df7566a01b46598433a3
2017-07-07 18:16:28 +00:00
Treehugger Robot
d659f806e5 Merge "Enable stripping of java debug information when required." 2017-07-07 15:24:32 +00:00
Treehugger Robot
5378d0a7eb Merge "Build: More tombstones in userdebug" 2017-07-07 15:17:03 +00:00
Andreas Gampe
427e49e0da Build: More tombstones in userdebug
For devices using core_minimal, set the number of retained
tombstones in userdebug and eng builds to 50. This will help
with dogfooding.

(cherry picked from commit 47e137f357)

Bug: 63131375
Test: lunch bullhead_userdebug && m && fastboot flashall && adb getprop tombstoned.max_tombstone_count
Change-Id: I163d40f7a8f73df1af1228309d7a7a95511bdef9
2017-07-06 23:54:14 -07:00
Treehugger Robot
af59c099c9 Merge "Fix install location for vendor tests" 2017-07-07 03:30:13 +00:00
Treehugger Robot
ae67473255 Merge "Increase max heap size for javac to 2GB." 2017-07-07 01:57:16 +00:00
Treehugger Robot
7edc11830a Merge "Re-compute DX command if it changes for PDK." 2017-07-07 01:22:36 +00:00
Ivan Lozano
4a363734b3 Add integer_overflow sanitization build option.
Adds the SANITIZE_TARGET=integer_overflow build option to apply signed and
unsigned integer overflow sanitization globally. This implements the
Make side of the build option.

A LOCAL_SANITIZE_BLACKLIST variable is added to allow blacklists to be
defined in make files, mirroring similar functionality provided in Soong.

An additional build option is provided to control whether or not to run
in diagnostics mode, controlled by SANITIZE_TARGET_DIAG. This works the
same way that SANITIZE_TARGET does and currently only supports
'integer_overflow' as an option.

Bug: 30969751
Test: Building with and without the new flags, device boot-up, tested
various permutations of controlling the new flags from build files.

Change-Id: Iacc47e196f21aa1edff5b406bfbc564b5f4e42bd
2017-07-06 18:21:37 -07:00
Dan Willemsen
8533fa1b9d Fix install location for vendor tests
Bug: 63393698
Test: m -j hidl_test_client; apply; m -j hidl_test_client
Change-Id: Ia54a8d2aaedd63ce1d70944ee69fda3b9fe223a9
2017-07-06 17:46:17 -07:00
Bryan Eyler
d4794315ff Re-compute DX command if it changes for PDK.
Bug 62360631
Tested build of PDK.

Test: builds
Change-Id: I7cbd649a8a3ce4326e513d5a808b76fbb011d99e
Merged-In: I7cbd649a8a3ce4326e513d5a808b76fbb011d99e
(cherry picked from commit af4bde4239)
2017-07-06 16:22:01 -07:00
Colin Cross
a12d38a721 Increase max heap size for javac to 2GB.
Compiling Dialer requires increasing the javac heap size above
1GB, probably due to the extensive use of annotation processors.
Increase it to 2GB.

Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I4dd3759a98ea915469e69f563dc49be8a25d518e
Merged-In: I4dd3759a98ea915469e69f563dc49be8a25d518e
(cherry picked from commit 0e785c79b8)
2017-07-06 16:13:00 -07:00
Przemyslaw Szczepaniak
2e81b3c49f Enable stripping of java debug information when required.
We're removing LocalVariableType / LocalVariableType in order to
save space. Enabling stripping reduces AOSP  image size save
by ~12MB.

Bug: 38224820
Test: CtsLibcoreTestCases
Change-Id: I3168d73ec6825aa5879db7e1135d7ed61d488d72
2017-07-06 08:31:14 +00:00
Howard Chen
8eff2d7c8e Merge "Add a make maco to convert string to upper case" 2017-07-06 03:46:07 +00:00
Treehugger Robot
efb6fddf39 Merge "Align size of vbmeta image to 4k boundary" 2017-07-06 00:29:52 +00:00
Treehugger Robot
691f5cec3a Merge "Build: Add PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD" 2017-07-05 18:05:36 +00:00
Treehugger Robot
5e19557eb9 Merge "Provide make variables for java binaries" 2017-07-01 01:25:10 +00:00
Colin Cross
0851df8c82 Provide make variables for java binaries
Replace java -> $(JAVA), etc. to prepare for moving java binaries
out of the path and using full paths to them.

Test: builds
Bug: 62956999
Change-Id: I5dfcd0d4e855ecde69cd127169e9545e59723d12
2017-07-01 01:03:14 +00:00
Andreas Gampe
831fc713f8 Build: Add PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD
Add product variable that can override the ART module behavior
packing. Rules and meaning are detailed in art/Android.mk.

Bug: 62087184
Test: m
Change-Id: I88e1cb0925cf62c3951b486a178d4dfc5e888a93
2017-06-30 11:37:38 -07:00
Bowgo Tsai
0556231cae Align size of vbmeta image to 4k boundary
Adding option "--padding_size 4096" in BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS
instead of INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS. The former setting will
be propogated to `make dist` while the latter is only used for `make`.

Bug: 38454093
Test: `make dist` and check vbmeta.img is being padded.
Merged-In: I929288b218761a4637a2a2ef0679d3ff85c70731
Change-Id: I929288b218761a4637a2a2ef0679d3ff85c70731
(cherry picked from commit 9e95beab31)
2017-07-01 00:34:02 +08:00
Dimitry Ivanov
b519d002f3 Merge "Add libdl.so to the list of system shared libs" 2017-06-29 22:12:03 +00:00
Treehugger Robot
846bd7e00d Merge "Update coverage sanitizer flags in make" 2017-06-29 18:50:38 +00:00
Dan Austin
9978b5274c Update coverage sanitizer flags in make
Update the coverage sanitizer flags in make to use the new
flavor of coverage sanitization.

Bug: 63108942

Test: Test fuzzer runs with coverage guards.

Change-Id: I12bda1767b69d0d89557e5f8a91da50b0f137ff3
2017-06-29 08:53:02 -07:00
Howard Chen
b83b205265 Add a make maco to convert string to upper case
There's already a to-lower function. Add a to-upper function to make
it complete.

Bug:36012197
Test: `make` pass, flash images from $OUT and boot device with chain
partitions

Change-Id: I39fe8c277a3cf6b87fc3c411eeab2fa5fb40007b
2017-06-29 16:18:47 +08:00
Tao Bao
9ea6a8b817 Merge "Allow packing custom radio images into target_files zip." 2017-06-28 22:03:19 +00:00
Treehugger Robot
682849976d Merge "Support replacing AVB signing keys." 2017-06-28 19:36:09 +00:00
Dimitry Ivanov
cdf3927ec4 Add libdl.so to the list of system shared libs
Note that libdl is already (always) implicitly loaded
because libc.so has a dependency on it.

Also make sure that libc.so always preceding libdl.so
in dt_needed list.

Bug: http://b/62815515
Test: make
Change-Id: I94c9d676b7fa98438b452d24f6c3bbf93166c6a9
2017-06-27 16:05:13 -07:00
Tao Bao
95a95c3a5e Allow packing custom radio images into target_files zip.
Radio images are added to INSTALLED_RADIOIMAGE_TARGET, which by default
will be packed under RADIO/ in a target_files zip. This CL introduces
BOARD_PACK_RADIOIMAGES that allows additionally copying them into
IMAGES/, which will then be included into <product>-img.zip.

Bug: 62195105
Test: Define BOARD_PACK_RADIOIMAGES and `m dist`. Check the generated
      target_files zip and <product>-img.zip.
Change-Id: I3deafd2dfecd1d4dbfdfc2d002fc40ef22fb60ea
2017-06-27 13:50:12 -07:00
Tao Bao
639118ff4d Support replacing AVB signing keys.
sign_target_files_apks.py now supports signing targets using verified
boot 2.0 (aka AVB). It allows replacing AVB signing keys for both of
chained and non-chained partitions.

An example command line looks as follows.
 $ ./build/tools/releasetools/sign_target_files_apks.py \
     --avb_vbmeta_key external/avb/test/data/testkey_rsa2048.pem \
     --avb_vbmeta_algorithm SHA256_RSA2048 \
     --avb_vbmeta_extra_args \
         "--signing_helper_with_files ./signing-helper.sh" \
     --avb_system_key external/avb/test/data/testkey_rsa4096.pem \
     --avb_system_algorithm SHA256_RSA4096 \
     --avb_system_extra_args \
         "--signing_helper_with_files ./signing-helper.sh" \
     product-target_files.eng.zip signed-product-target_files.zip

To verify the signed images:
 $ unzip signed-product-target_files.zip IMAGES/\*
 $ avbtool verify_image --image IMAGES/vbmeta.img \
     --expected_chain_partition system:1:testkey_rsa4096_pub.pem \
     --key external/avb/test/data/testkey_rsa2048.pem

Bug: 38315721
Test: sign_target_files_apks.py on AVB-enabled target w/ and w/o chained
      partitions respectively. Check the signing command lines; validate
      the signed images with 'avbtool verify_image'.
Change-Id: Ia009555b16ddb6d8ba6a0858d5ca7d983bbab887
2017-06-27 10:50:46 -07:00
Treehugger Robot
bf215d166b Merge "Get java config from soong" 2017-06-23 21:40:16 +00:00
Treehugger Robot
47b734db57 Merge "Build: Use ART phony packages in runtime_libart" 2017-06-23 01:47:33 +00:00
Colin Cross
b12d4b7ac2 Get java config from soong
Soong will export java config variables.

Test: builds
Change-Id: If185543f8f36a30e7632946c16351d44f012bd6a
2017-06-22 17:21:05 -07:00
Andreas Gampe
ae4916b0ad Build: Use ART phony packages in runtime_libart
Move definition of necessary packages for ART to art/Android.mk.
Use the phony packages defined there in runtime_libart.mk.

Bug: 62087184
Test: m
Test: Device boots
Change-Id: Iae6e5bba2184b098820783dc5e9f6b5f2a9836e9
2017-06-22 15:35:14 -07:00
Tianjie Xu
8fb65a5d63 Merge "Remove the obsolete location check for install-recovery.sh" 2017-06-22 18:12:44 +00:00
Tianjie Xu
924c1c0598 Merge "Verify the contents in install-recovery.sh" 2017-06-22 18:12:44 +00:00
Treehugger Robot
f1610d82f9 Merge "Add LOCAL_OVERRIDES_MODULES" 2017-06-22 04:49:41 +00:00
Chih-hung Hsieh
d79ce64555 Merge "Add OWNERS in build/make" 2017-06-22 04:27:13 +00:00
Chih-Hung Hsieh
044fc0c4a4 Add OWNERS in build/make
* Owners are selected from top CL approvals or owners.
  They will be suggested to review/approve future CLs.
* OWNERS files are recognized by the new find-owners plugin, see .md files in
  https://gerrit.googlesource.com/plugins/find-owners/+/master/src/main/resources/Documentation/

Test: build/make/tools/checkowners.py -c -v OWNERS
Change-Id: Ibe6765e5448c471ca413413e3d052507ccee4ea6
2017-06-21 16:09:56 -07:00
Treehugger Robot
ccac0f861b Merge "Makefile: Add avbtool to INTERNAL_USERIMAGES_DEPS" 2017-06-21 23:06:19 +00:00
Chris Fries
df0387ddab Makefile: Add avbtool to INTERNAL_USERIMAGES_DEPS
.. in order to let the system_other image use it.

Bug: 33203383 Can't build target on mac
Change-Id: Iac2faf0ebdcc933675afbec2301d5d455aa33501
2017-06-21 16:19:35 -05:00
Treehugger Robot
564ce0fa53 Merge "Add make sync target" 2017-06-21 02:42:28 +00:00
Treehugger Robot
5b91bd4ccb Merge "Support custom my_copy_pairs in package-modules.mk" 2017-06-21 02:36:14 +00:00
Treehugger Robot
cd46f1012e Merge "Use make functions to convert a text to lower case" 2017-06-21 01:56:08 +00:00
Treehugger Robot
3952eef8ce Merge "LOCAL_PROPRIETARY_MODULE implies LOCAL_USE_VNDK" 2017-06-21 00:33:24 +00:00
Tianjie Xu
9c384d2ca5 Verify the contents in install-recovery.sh
Check the SHA1 of recovery.img and boot.img embedded in the
install-recovery.sh.

Bug: 35411009
Test: validation script detects mismatch for both full recovery and
recovery-from-boot.
Change-Id: I5f07a869d9fa17fad26a22ef9ca3ecb06b1b28e3
2017-06-20 17:28:35 -07:00
Colin Cross
91a52277b0 Add make sync target
make sync will build everything necessary to adb sync system
and vendor, without wasting time rebuilding system.img and
vendor.img.

Test: m -j sync
Change-Id: I91c0012eed6d58a338393cc375056a30e2a24b09
2017-06-20 16:57:52 -07:00
Tianjie Xu
78de9f173d Remove the obsolete location check for install-recovery.sh
The script has been moved to /system/bin since L.

Bug: 35411009
Test: Generate a exact same OTA for bullhead.
Change-Id: Iaecb86e3dabc5b659605837bb06f16d20fa80334
2017-06-20 16:52:54 -07:00
Dan Willemsen
f354b178b1 Support custom my_copy_pairs in package-modules.mk
To support extra files in package-modules.mk, allow the user to set
my_copy_pairs to a list of src:dest pairs that will be copied into the
zip file.

Test: build-aosp_arm.ninja is identical before/after
Test: codesearch says that these variables aren't otherwise used
Test: set my_copy_pairs, ensure that they exist in the zip.
Change-Id: Ia80cd136db8ad37a71010baf0552621b281c8bc3
2017-06-20 16:00:48 -07:00