Commit graph

17643 commits

Author SHA1 Message Date
David Anderson
619fe2da5a Add build flags for spanning the super partition across multiple block devices.
This adds BOARD_SUPER_PARTITION_BLOCK_DEVICES, which must contain a list
of the (non-A/B suffixed) partitions that will comprise the super
partition. It is only intended for devices which cannot have a partition
named "super". For each entry, there must be a
BOARD_SUPER_PARTITION_x_DEVICE_SIZE variable defined with the exact size
of that partition (not its image size). The sum of these sizes must be
equal to BOARD_SUPER_PARTITION_SIZE.

Bug: 116802789
Test: device with BOARD_SUPER_PARTITION_BLOCK_DEVICES builds
Change-Id: I1a79c2e08ca99ce7e42207893ef3285caffecf44
2018-11-12 16:12:51 -08:00
Yifan Hong
c5c0124e7d logical partitions -> dynamic partitions
Reflect a name change.

* PRODUCT_USE_LOGICAL_PARTITIONS is deprecated and
will be removed in the future.

* ro.boot.dynamic_partitions is created. ro.boot.logical_partitions
will be removed once all the usage is removed.

Bug: 119286600
Test: builds

Change-Id: I5cb8bb1f5ebcee893fbef3a0f047c32de8773830
2018-11-09 16:02:59 -08:00
David Brazdil
4438e0bb8e Merge "Revert^4: Change command-line flags of hiddenapi" 2018-10-30 10:02:20 +00:00
David Brazdil
9007e530aa Revert^4: Change command-line flags of hiddenapi
The `hiddenapi` build tool now reads a dex file from one filename
and writes a modified dex file to another. Change the build rule
to reflect it.

This reverts commit d8c427fbba.

Change-Id: Ic9a4188a65f7a6fb28edae1aeda7422e93800c58
Test: m
2018-10-27 21:46:19 +00:00
Treehugger Robot
df45f28a82 Merge "Really mark sdk_addon as PHONY to fix m snod" 2018-10-27 00:28:23 +00:00
Yifan Hong
779dc30020 Merge changes from topic "dpgroup"
* changes:
  Add dynamic partition info to target files
  BOARD_{GROUP}_SIZE must not be empty.
  Add _a and _b to group names to super.
2018-10-26 18:23:53 +00:00
Dan Willemsen
ea898f1c53 Really mark sdk_addon as PHONY to fix m snod
When we're using a dont_bother_goals (including snod), we don't load
build/make/core/tasks/*.mk, so sdk_addon isn't defined as a PHONY rule.

This causes a build break because build/make/core/Makefile uses
dist-for-goals with sdk_addon. dist-for-goals requires its arguments to
be PHONY targets.

Test: m snod
Change-Id: I69937fe9360be57766d17ed4c28b5d2a1e348308
2018-10-26 11:17:25 -07:00
Paul Hobbs
27ec8b868e Merge "Revert "Revert^2: Change command-line flags of hiddenapi"" 2018-10-26 17:22:35 +00:00
Luman Qu
d8c427fbba Revert "Revert^2: Change command-line flags of hiddenapi"
This reverts commit e9540386e2.

Reason for revert: Caught by droidcop https://b.corp.google.com/issues/118481351

Change-Id: I66e45ef5a84d63682e5c33c9aa1e708160606611
2018-10-26 16:53:09 +00:00
Treehugger Robot
43930504e1 Merge "Mark BUILD_NUMBER as obsolete, more vars as readonly" 2018-10-26 15:42:36 +00:00
David Brazdil
6d0b0f6103 Merge "Revert^2: Change command-line flags of hiddenapi" 2018-10-26 09:19:23 +00:00
Colin Cross
e0006c91ca Merge "Pass privileged dexpreopt module configuration to Soong" 2018-10-26 00:00:12 +00:00
Yifan Hong
07d3d79e6e Add dynamic partition info to target files
Test: builds and manual inspect
Bug: 117182932
Change-Id: Ic84860d976d18ef7aa8d050fd1118d1e75a0456d
2018-10-25 16:23:42 -07:00
Yifan Hong
a50b5e34a4 BOARD_{GROUP}_SIZE must not be empty.
Otherwise, OTA generation will fail.
Test: OTA generation
Test: do not define it, build error

Change-Id: I63da80bd35d1982db0510428560727c759212771
2018-10-25 16:23:42 -07:00
Yifan Hong
16a07e1806 Add _a and _b to group names to super.
For A/B devices, append slot suffix to dynamic
partition group names. This ensures that during an
update, partitions from target slot doesn't take
more than half of the super partition.

Test: flash and lpdump
Bug: 111610495
Change-Id: I07a082b67d0f9faada150c7ac3527eb737a81655
2018-10-25 16:23:42 -07:00
David Brazdil
e9540386e2 Revert^2: Change command-line flags of hiddenapi
Change command-line flags of hiddenapi

The `hiddenapi` build tool now reads a dex file from one filename
and writes a modified dex file to another. Change the build rule
to reflect it.

This reverts commit 5381eb684e.

Test: m
Change-Id: I8d37935c5ea381348278ec668d474f6ffb8e8411
2018-10-25 17:25:23 +00:00
Treehugger Robot
1bc81731c8 Merge "build_image: improvements to right size for dynamic partitions" 2018-10-25 15:25:49 +00:00
Treehugger Robot
73b998ad2e Merge "Revert "ATest: GTest auto gen config support run-test-as."" 2018-10-25 08:53:24 +00:00
Bill Yang
a8fcf6c893 Revert "ATest: GTest auto gen config support run-test-as."
This reverts commit fab820c5f1.

Reason for revert: sed -i requires an argument on mac, break build on mac.

Change-Id: I0b72e28968072afbbb862bd827ee59764dd8a0be
2018-10-25 07:11:26 +00:00
Victor Hsieh
e53dd7b20b Allow target to specify LOCAL_PREFER_INTEGRITY
The option will:
 - Produce APK with uncompressed dex
 - Declare to prefer integrity in manifest

Test: unzip -vl, dex compression looks correct with the option provided
      or not.
Test: similarly, aapt dump correct attribute
Bug: None

Change-Id: I16b9a37255150c2ad84af84087dfabb536a3b07a
2018-10-24 11:40:07 -07:00
Colin Cross
aefeae367e Merge "Reduce the propagation of LOCAL_DEX_PREOPT := nostripping" 2018-10-24 16:47:12 +00:00
Treehugger Robot
2fc5669b62 Merge "ATest: GTest auto gen config support run-test-as." 2018-10-24 13:53:50 +00:00
David Brazdil
5381eb684e Revert "Change command-line flags of hiddenapi"
This reverts commit 6b00bfd2fb.

Reason for revert: marlin running out of space

Exempted-From-Owner-Approval: Needed to unblock build, no
  buildcops on call in EMEA today.
Change-Id: I9e86545c8ada2523bc21116c6e958f69fb94dc26
2018-10-24 12:37:41 +00:00
David Brazdil
7658657ee4 Merge "Change command-line flags of hiddenapi" 2018-10-24 09:19:00 +00:00
Colin Cross
3aa2f8f69b Pass privileged dexpreopt module configuration to Soong
Pass DONT_UNCOMPRESS_PRIV_APPS_DEXS, PRODUCT_LOADED_BY_PRIVILEGED_MODULES,
DEX_PREOPT_DEFAULT, and WITH_DEXPREOPT to Soong so it can determine when
to store uncompressed dex files in APKs and when to strip them.

Also convert DEXPREOPT.$(TARGET_PRODUCT).$(LOCAL_MODULE).CONFIG=disabled
to a DEXPREOPT_DISABLED_MODULES list, and export it to Soong.

Test: m checkbuild
Change-Id: I8652032d4b9f5d2e119e73acdf91b8148563eedd
2018-10-23 22:33:07 -07:00
Colin Cross
fc782ad949 Reduce the propagation of LOCAL_DEX_PREOPT := nostripping
nostripping causes confusing double negatives, allow nostripping
in LOCAL_DEX_PREOPT and DEFAULT_DEX_PREOPT, but convert to
LOCAL_STRIP_DEX outside of dex_preopt_odex_install.mk.

Test: m checkbuild
Change-Id: I996e9258ce20c394900d9fe937d638bc2ab8589d
2018-10-23 22:33:07 -07:00
Mark Salyzyn
780f595fac build_image: improvements to right size for dynamic partitions
If partition_reserved_size is 0 or undefined, and
use_dynamic_partition_size is true, we should approach no space
and no free inodes automatically.

Estimate the space and number of inodes required, then do a first
pass build to see how much space actually used, and use those values
to refine the estimate.

Depends on tune2fs to report the characteristics of the filesystem,
so only support for ext filesystems.  In the future if there has to
be a more generic ability, either a tool per a filesystem has to be
found, or we will need root capabilities to mount the filesystem to
acquire the characteristics live from the host system.

Test: manual + python -m unittest test_build_image
Bug: 111302946
Change-Id: I933a388be43516b6de7b5007b296765bd5556fde
2018-10-23 15:14:00 -07:00
Julien Desprez
e483544cf5 Remove host proto lib from cts jars
The lib is already statically included in tradefed.jar.

Test: run cts-unit-tests
Bug: 118297021
Change-Id: I073b68216870b1e744ee35db82a7e03f11db6782
2018-10-23 09:38:09 -07:00
Tianjie Xu
1e0742e2c3 Merge "Install the ota keys under recovery as a zipfile" 2018-10-23 02:40:55 +00:00
Treehugger Robot
b64a0f3b03 Merge "Only set set_hashtree_disabled_flag in top-level vbmeta.img." 2018-10-22 22:44:54 +00:00
Dan Willemsen
6dbb33dfad Mark BUILD_NUMBER as obsolete, more vars as readonly
In preparation for moving BUILD_NUMBER and FILE_NAME_TAG handling to
soong_ui, mark BUILD_NUMBER as obsolete and FILE_NAME_TAG as readonly.

Later changes will remove BUILD_NUMBER entirely, and move FILE_NAME_TAG
handling into the kati packaging step via dist-for-goals renames.

Test: build_test on master
Change-Id: I0e340d32fe0cb6296d3b5a7fec349b50632d044e
2018-10-22 15:20:26 -07:00
Tianjie Xu
ffbe6b9785 Install the ota keys under recovery as a zipfile
Recovery can now parse the pem encoded x509 keys from a zipfile. So
instead of dumping the keys into a text file with some intermediate format,
we can simply create a zipfile with the keys.

Bug: 116655889
Test: make bootimage and check the generated zipfile, run sign_target_files_apks
Change-Id: Ib76feecfb26d6be713a07644e80ec96133759004
2018-10-22 14:47:15 -07:00
Treehugger Robot
4c95ffa8ef Merge "Remove USE_CLANG_LLD[=false]" 2018-10-22 20:26:27 +00:00
Tao Bao
240dcb8c45 Only set set_hashtree_disabled_flag in top-level vbmeta.img.
It's sufficient to have the flag in top-level vbmeta.img, and libavb
expects no disable flag in chained vbmeta.img.

Bug: 118115607
Test: `m vbmetaimage` with an -eng target using vbmeta_system.img. Check
      the flag in the generated image
      (`avbtool info_image --image vbmeta_system.img`).
Change-Id: Ia429dd8a5cf0243e16ae305da210d3ea27c68abf
2018-10-22 13:06:49 -07:00
Colin Cross
1e0b2296ad Merge "Always define sdk_addon as phony" 2018-10-22 18:22:48 +00:00
Colin Cross
d0dbeb3758 Always define sdk_addon as phony
dist-write-files will add dist targets to the sdk_addon target,
but the sdk_addon target is not declared as phony when building
with mm (ONE_SHOT_MAKEFILE set), causing:
build/make/core/main.mk:1495: error: writing to readonly directory: "sdk_addon"

Always define sdk_addon as phony even if ONE_SHOT_MAKEFILE is set.

Bug: 118144231
Test: mm
Change-Id: I99d14a98a7597ebd694c765f94b0d6f4486860dc
2018-10-22 10:42:44 -07:00
Treehugger Robot
5546a543ce Merge "Put maxTargetSdk=P APIs onto light greylist." 2018-10-22 15:56:49 +00:00
David Brazdil
6b00bfd2fb Change command-line flags of hiddenapi
The `hiddenapi` build tool now reads a dex file from one filename
and writes a modified dex file to another. Change the build rule
to reflect it.

Test: m
Change-Id: I2c4b080dbfdf348f230e7544c228cfd7419d1c64
2018-10-22 14:08:21 +01:00
Mathew Inwood
bcde1c52a6 Put maxTargetSdk=P APIs onto light greylist.
Since the per-SDK level enforcement support is not ready in ART yet, we
can't implement the correct enforcement for maxTargetSdk=P. Putting these
APIs on the dark greylist causes problems for existing apps, so put them
on the light greylist instead.

Test: m
Bug: 117899984
Change-Id: Ib3dad2f50eb6a769ba9f21cec4bac01275888ef6
2018-10-22 13:44:15 +01:00
David Brazdil
6a038d662b Merge "Add UNSAFE_DISABLE_HIDDENAPI_FLAGS to skip hiddenapi processing" 2018-10-22 12:43:39 +00:00
Anton Hansson
2bfa7401c7 Merge "Re-add product_MODULES" 2018-10-22 12:28:56 +00:00
Dan Willemsen
2eea59973b Remove USE_CLANG_LLD[=false]
Test: treehugger
Change-Id: I6dd632e9501f82b22f3f0c084039808e37b37742
2018-10-21 19:55:40 -07:00
Dan Willemsen
3e8eb377db Stop passing DIST_DIR to Soong
Test: m dist
Change-Id: I812606595703299f5e333d4e62bc1abeaad15c05
2018-10-20 21:37:44 -07:00
Dan Willemsen
c904e48cc5 Fix dist-for-goals with no targets
Bug: 117463001
Test: m dist vts
Change-Id: I9bfe01472dcf3d3729a109e4de383d35e3af9df0
2018-10-20 16:59:41 -07:00
Dan Willemsen
78c40be560 Create a new kati packaging step; move dist
Instead of looking at `dist` and DIST_DIR directly in the Kati Build
step, always write out information about every call to dist, then create
the rules in another ckati run.

So instead of having:

  dist:    <goal> -> <dist> -> <output>
                \______________↑

  nodist:  <goal> -----------> <output>

Always use another phony target in the Kati Build step:

   <goal> ---> <output>
        \----> _dist_<goal>

Then in the packaging step (which is much faster), choose between dist
and no dist:

  dist:   _dist_<goal> -> <dist> -> <output>

  nodist: _dist_<goal>

Bug: 117463001
Test: m dist
Change-Id: Ic96bb6356740300dd3113f6ed699e6a619360c40
2018-10-20 21:44:44 +00:00
Dan Willemsen
7ddc50a066 Refactor common makefile fragments
In preparation for setting up another Kati stage, move some common
settings and tools into a common folder. This way it's a bit easier to
see that they're safe to use, and that they shouldn't depend on anything
outside of the common folder.

Bug: 117463001
Test: build-aosp_arm.ninja is the same before and after
Change-Id: Ief4b75a4dbe45b73ffd03bf32c60695c816d979d
2018-10-20 14:43:58 -07:00
David Brazdil
8a6b9a7baf Add UNSAFE_DISABLE_HIDDENAPI_FLAGS to skip hiddenapi processing
Setting environment variable UNSAFE_DISABLE_HIDDENAPI_FLAGS=true
will skip the build step which annotates dex files with information
about public and non-public API membership. This is meant to speed
up incremental local builds.

USE AT OWN RISK: Dex files built with this flag will execute with
hidden API access checks disabled and therefore may exhibit different
behaviour compared to production code.

WARNING: Some JARs cannot be compiled with this flag as ART hardcodes
hidden API access flags of intrinsified methods. Attempting to compile
dex files containing such methods will trigger an assertion.

Test: UNSAFE_DISABLE_HIDDENAPI_FLAGS=true mmm frameworks/base
Bug: 113278235
Bug: 112388925
Change-Id: I51fe99ab53e1bb2aa0db64b22a321dd1e1ed47e1
2018-10-19 20:16:49 +01:00
Matt Wachowski
c135db19b4 Merge "Supporting change for aosp/771168"
am: ac02d67652

Change-Id: I8b47cbc2fae8a574588e3c60f8e5c90a81a16e87
2018-10-18 09:28:37 -07:00
Matt Wachowski
ac02d67652 Merge "Supporting change for aosp/771168" 2018-10-18 16:20:12 +00:00
Anton Hansson
e7334299df Merge "Re-submit "Add trailing slash to mainline path claims.""
am: 471a45b952

Change-Id: I99cb86a27887df6d2bf0cb922621c7c52e35aa39
2018-10-18 01:52:34 -07:00