Commit Graph

34369 Commits

Author SHA1 Message Date
Colin Cross
adb96ae66a Merge "Normalize timestamps in host java libraries"
am: 90edf85667

Change-Id: I88c8abd5c1d3fec72f73d439253341b1c9ce778a
2017-05-16 19:58:44 +00:00
Treehugger Robot
90edf85667 Merge "Normalize timestamps in host java libraries" 2017-05-16 19:46:39 +00:00
Dan Willemsen
39187e8882 Merge changes from topics 'soong_ui_installclean', 'soong_ui_version', 'soong_ui_clean'
am: 212c418ee7

Change-Id: I6596af49a99a6167a8908525ff8fe1c16e456e31
2017-05-16 18:09:41 +00:00
Colin Cross
1664b90d67 Normalize timestamps in host java libraries
Remove timestamps from jar files in host java libraries to get
consistent results between builds to help with build artifact
caching.

Bug: 38215808
Test: sha1sum desugar.jar && touch Desugar.java && m -j desugar && sha1sum desugar.jar
Change-Id: I1ecac9b2b80f673937086686540ab0736259df1b
2017-05-16 11:07:28 -07:00
Sen Jiang
7cdc14d8b0 Merge "Add support for avbtool in custom_images."
am: 8a8ca3438b

Change-Id: I254462e57038902852be421cbfb4cccab9dbe444
2017-05-16 18:02:37 +00:00
Dan Willemsen
212c418ee7 Merge changes from topics 'soong_ui_installclean', 'soong_ui_version', 'soong_ui_clean'
* changes:
  Move auto installclean to soong_ui
  Move version checking to soong_ui
  Move clean/clobber to soong_ui
  Allow disabling of CleanSpec functionality
2017-05-16 18:02:04 +00:00
Sen Jiang
8a8ca3438b Merge "Add support for avbtool in custom_images." 2017-05-16 17:55:54 +00:00
Sen Jiang
5b0fe18feb Add support for avbtool in custom_images.
Set CUSTOM_IMAGE_AVB_ENABLE := true to enable avb, add_hashtree_footer
args can be added in CUSTOM_IMAGE_AVB_ADD_HASHTREE_FOOTER_ARGS.

Bug: 38319818
Test: m custom_images

Change-Id: Ia452dc5ce8b55bcbd3abba9e965b72e78fd8c104
2017-05-15 17:34:42 -07:00
Dan Willemsen
85e55ceff2 Move auto installclean to soong_ui
This way kati doesn't need to keep state for which build got run last,
and we have to run kati less often. This was forcing another kati run
for an empty out directory, and a kati run (or two) every time you
switched products that shared a device.

Bug: 35970961
Test: m clean; m -j blueprint_tools; m -j blueprint_tools; m -j blueprint_tools
Test: lunch aosp_arm-eng; m -j blueprint_tools; lunch full-eng; m -j blueprint_tools; <repeat>
Change-Id: I825a0868fb7059016a940c76244527432e3e7cff
2017-05-15 14:18:10 -07:00
Dan Willemsen
3eb44160e0 Move version checking to soong_ui
This removes versions_checked.mk that caused kati to regenerate the
ninja file 3 times for a clean out directory. Kati needs to regenerate
every time that we write a file that we also read. soong_ui doesn't have
this problem.

Bug: 35970961
Test: m clean; m -j blueprint_tools; m -j blueprint_tools; m -j blueprint_tools
Test: $OUT_DIR/versions_checked.mk no longer exists
Change-Id: I14b67dc275ea3daa77a7315c2985dc73d77fd07c
2017-05-15 14:02:38 -07:00
Dan Willemsen
bd8ac3284d Move clean/clobber to soong_ui
So that we don't have to load up all the makefile state just to remove
the output directory.

Starting from a completely empty out directory:
 kati:    16s
 soong_ui: 2.0s

From a minimal out directory (m -j blueprint_tools):
 kati:     3.8s
 soong_ui: 0.4s

Test: m -j clean
Test: m -j clobber
Change-Id: Iec1ce032c7cc7ed102430080e857fc421b66309c
2017-05-15 14:02:38 -07:00
Dan Willemsen
3715001fe5 Allow disabling of CleanSpec functionality
This is only intended for testing purposes -- so that we can run build
system tests and verify that kati only gets run once for each
configuration. CleanSpecs necessarily write state that require us to
re-run kati twice.

Test: export NO_ANDROID_CLEANSPEC=true; rm -rf out; m -j; m -j
Change-Id: I635a8d8b6754dff82fbc7f20c500d06d7cf6c4f2
2017-05-15 14:02:38 -07:00
Yueyao Zhu
793a9bb490 Merge "add dtbo support for ota"
am: 294d5c5f07

Change-Id: Icf2a67ef36b2cbfa5d46e72b9e446cd7ed5e2d1c
2017-05-15 16:56:54 +00:00
Treehugger Robot
294d5c5f07 Merge "add dtbo support for ota" 2017-05-15 16:49:46 +00:00
Paul Duffin
23eb5019bc Merge "Add c/a/i/u/* to the list of injar filters"
am: 9198da8c21

Change-Id: Ic665b9ee826fb782ca4ce8b6b54339fb272f132c
2017-05-15 15:48:50 +00:00
Treehugger Robot
9198da8c21 Merge "Add c/a/i/u/* to the list of injar filters" 2017-05-15 15:44:04 +00:00
Paul Duffin
e949585a62 Add c/a/i/u/* to the list of injar filters
Previous change that moved com.android.internal.util.Predicate
to the legacy-android-test JAR caused a proguard build breakage
due to duplicate classes in the application and library. This
fixes it in the same way as previous issues with junit and
android.test classes were resolved by excluding those classes
from the application JAR.

Bug: 30188076
Test: make checkbuild and make -j ANDROID_FORCE_JACK_ENABLED=disabled checkbuild
Change-Id: Ica0089607187f970251ddba339a1f71d4cad80cc
2017-05-15 15:17:55 +01:00
Julius D'souza
e255054a08 Merge "Add the option to reserve headroom for partition images. This is useful for devices with low disk space with different build variants."
am: bba00b2cb9

Change-Id: I3a070c4545f03280574a8cd5b6865db6ed1a33ef
2017-05-13 01:44:21 +00:00
Treehugger Robot
bba00b2cb9 Merge "Add the option to reserve headroom for partition images. This is useful for devices with low disk space with different build variants." 2017-05-13 01:37:25 +00:00
Yueyao Zhu
889ee5e7d3 add dtbo support for ota
Test: make dist and locally push ota on a device
Change-Id: I920b98f20e248b437955b2a963eb69ed2ddb8d45
2017-05-12 17:50:46 -07:00
Tianjie Xu
ca3aad1943 Merge "Add a script to parse an block-based ota package"
am: f34d435925

Change-Id: I3216b5ef25f55f8f44e84eeb9101cf9af01011fd
2017-05-11 22:12:12 +00:00
Tianjie Xu
f34d435925 Merge "Add a script to parse an block-based ota package" 2017-05-11 21:52:10 +00:00
Tao Bao
c3947ece97 Merge "OTA Tools: Handle password encrypted keys"
am: 4e1c113554

Change-Id: Icc7400eb9369f5d6e3551914f5cae0ac2c923cea
2017-05-11 19:46:48 +00:00
Tao Bao
4e1c113554 Merge "OTA Tools: Handle password encrypted keys" 2017-05-11 19:28:07 +00:00
Christian Oder
f63e2cd47b OTA Tools: Handle password encrypted keys
* Add logic to handle decrypted keys from common.GetKeyPassword in
WriteABOTAPackageWithBrilloScript.

* Get the keys passwords in main and store them in OPTIONS.key_passwords.
This allows accessing them in WriteABOTAPackageWithBrilloScript and SignOutput
so it's only required to ask for the password once, while allowing to use
decrypted signing keys.

Test: ota_from_target_files.py on marlin and angler respectively.
Change-Id: I7c9b0198855a4b630c52b8552e904f312f09c4ce
2017-05-10 16:54:42 -07:00
George Burgess IV
c352502062 Merge "make: add __clang_analyzer__ to clang-tidy"
am: 57273013cf

Change-Id: Iea1d4ded4dc9e2d5d461358cf5c6cff6dcb68bfd
2017-05-10 04:48:31 +00:00
Treehugger Robot
57273013cf Merge "make: add __clang_analyzer__ to clang-tidy" 2017-05-10 04:34:42 +00:00
Dan Willemsen
9efa174836 Merge changes Id0d167e6,I290a02b0
am: 90573e75a8

Change-Id: I352aa1d12fdf76b41b8fb9e7341707d7fbeec764
2017-05-10 02:36:20 +00:00
Treehugger Robot
90573e75a8 Merge changes Id0d167e6,I290a02b0
* changes:
  Clean LOCAL_RESOURCE_DIR paths
  Implement clean-path
2017-05-10 02:22:17 +00:00
Vishwath Mohan
faea53a89b Merge "Selectively add _asan flavor suffix."
am: e5143608df

Change-Id: I1db40b92af1e23ea84bc2ec0876e6521c79f8836
2017-05-10 00:15:08 +00:00
Treehugger Robot
e5143608df Merge "Selectively add _asan flavor suffix." 2017-05-09 23:52:24 +00:00
Tianjie Xu
ce9d78fcd9 Add a script to parse an block-based ota package
The script prints the meta info, new/patch data size. It also simulates
the transfer commands and calculates amount of I/O as well as cache
needed.

We can add the more options to parse system/vendor.map so that we can
analyze the location change of files.

Bug: 31514709
Test: parse a bullhead incremental/full ota.
Change-Id: I70ed4f4c15e595b1851109e9799d44ac4e815c16
2017-05-09 21:01:19 +00:00
Vishwath Mohan
9ebc278f91 Selectively add _asan flavor suffix.
This CL ensures that the _asan suffix is added to the build flavor
only when it doesn't already contain _asan (or _asan_coverage). This
correctly prevents it from appending an extra _asan to ASAN lunch
configs that already include it in the flavor, while allowing
sanitized targets for generic configs to behave as they used to.

Bug: 38145756
Test: _asan is correctly appended only for lunch configs that don't
already specify it in the build flavor.

Change-Id: Ia7d9356f717b97d1c64e3237ca31cc507f27734f
2017-05-09 09:54:49 -07:00
Julius D'souza
001c676b81 Add the option to reserve headroom for partition images.
This is useful for devices with low disk space with different
build variants.

Bug: 37469715
Test: Regular image builds successfully, errors occur when
the headroom size is greater than available partition space.

Change-Id: I526cdd0f84981bbd16e3afcfe1cd7fc43dce98ef
2017-05-08 11:59:25 -07:00
Nicolas Geoffray
5ebe0370bd Merge "Pass --force-determinism to prebuilts."
am: a65a41dcdb

Change-Id: Ia8bc6073bbf4872a94ea31a3ffd0e4f0e6dd898d
2017-05-08 09:34:19 +00:00
Nicolas Geoffray
a65a41dcdb Merge "Pass --force-determinism to prebuilts." 2017-05-08 09:29:55 +00:00
Dan Willemsen
fa7ecfb752 Clean LOCAL_RESOURCE_DIR paths
With LOCAL_USE_AAPT2, resource directories like a/b/../res cause
problems, since ninja will canonicalize the path before creating the
intermediate resource directory, so it creates <intermediates>/a/res
while we give AAPT2 <intermediates>/a/b/../res, which fails to open.

Bug: 37716307
Test: Switch LOCAL_USE_AAPT2:=true for TelecommUnitTests, mma
Test: lunch aosp_marlin-userdebug; m -j
Change-Id: Id0d167e68185a119390e7b7e3c344895e77ca0e3
2017-05-05 20:50:54 -07:00
Dan Willemsen
5ec6bbc3d5 Implement clean-path
We shouldn't give non-clean paths to tools -- if a/b/../file was
specified, we can simplify that path to a/file, and not need to create
a/b just to make the path name work.

The testcases come from golang's filepath.Clean tests, this should be
compatible with that implementation.

Bug: 37716307
Test: TEST_MAKE_clean_path=true m -j blueprint_tools
Change-Id: I290a02b0a1e4a7c2b9255bca3c881589b521c402
2017-05-05 20:50:47 -07:00
Colin Cross
193f1ed30c Merge "Export OVERRIDE_RS_DRIVER to soong"
am: 52d6a0d4cb

Change-Id: Ia884226f2373a7efaa8e80289859850540af488f
2017-05-06 01:24:59 +00:00
Treehugger Robot
52d6a0d4cb Merge "Export OVERRIDE_RS_DRIVER to soong" 2017-05-06 01:19:44 +00:00
Tao Bao
7d887baf42 Merge "releasetools: Add a verbose parameter to common.Run()."
am: a149a83e24

Change-Id: I81c80a0865186b3c56acfc81ef20c7dd19fe9e5e
2017-05-05 22:46:21 +00:00
Tao Bao
a149a83e24 Merge "releasetools: Add a verbose parameter to common.Run()." 2017-05-05 22:29:52 +00:00
Colin Cross
7932f9bc5d Export OVERRIDE_RS_DRIVER to soong
Test: examine RS cflags
Change-Id: I0c1cc54f3f7f860895322d2825c7168c93a84ef5
2017-05-05 15:22:33 -07:00
Thierry Strudel
c10b033077 Merge "core/Makefile: add AVBTOOL deps to boot.img for BOARD_AVB_ENABLE"
am: e3f07c2adb

Change-Id: I37752bb4bf34bc0126128b152e3e699f6da6d163
2017-05-04 22:37:11 +00:00
Treehugger Robot
e3f07c2adb Merge "core/Makefile: add AVBTOOL deps to boot.img for BOARD_AVB_ENABLE" 2017-05-04 22:31:22 +00:00
Thierry Strudel
d7bd1f216f core/Makefile: add AVBTOOL deps to boot.img for BOARD_AVB_ENABLE
Bug: 37960599
Test: 'make bootimage' works when BOARD_AVB_ENABLE is true
Change-Id: I02c2fa16c9df988fbe1e1d6cd13a62278fedea45
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2017-05-04 14:00:50 -07:00
Tao Bao
39451582c4 releasetools: Add a verbose parameter to common.Run().
Caller can optionally specify the verbose flag which overrides
OPTIONS.verbose. The command line won't be outputed with verbose=False.
This is useful for cases that a) those command lines are less useful
(but will spam the output otherwise); b) sensitive info is part of the
invocation.

'verbose=False' will be consumed by common.Run() only, instead of being
passed to subprocess.Popen().

Test: ota_from_target_files.py on a block based OTA.
Change-Id: I7d5b4094d756a60f84f89c6a965e7ccc68e435f8
2017-05-04 11:18:56 -07:00
Andreas Gampe
42ecd83de6 Merge changes Idf48f45f,Id2a72fe7,If83e1df2
am: 2be7eb9161

Change-Id: Ie5836fda3e432aacea66c1b63cb3a87fac439068
2017-05-04 04:51:01 +00:00
Treehugger Robot
2be7eb9161 Merge changes Idf48f45f,Id2a72fe7,If83e1df2
* changes:
  Build: Disable leak sanitizer for ijar
  Build: Disable leak sanitizer for llvm-rs-cc
  Build: Disable leak sanitizer for aapt
2017-05-04 04:47:04 +00:00
George Burgess IV
5ab07d4f14 make: add __clang_analyzer__ to clang-tidy
We have code that acts slightly differently when the static analyzer is
running, so that it can produce more accurate diagnostics (e.g. less
false positives). It uses __clang_analyzer__ to detect the static
analyzer.

When the static analyzer is run via clang-tidy, __clang_analyzer__
doesn't get defined.

Bug: None
Test: WITH_TIDY=1 m. clang-tidy now acts as expected in code made for
the static analyzer

Change-Id: Ib2a815c0bd67553af465b64207bb480fb52cfaf8
2017-05-03 18:10:47 -07:00