Commit graph

55983 commits

Author SHA1 Message Date
Treehugger Robot
f5ad6e5443 Merge "Support Factory OTA for Virtual A/B devices" 2019-11-05 18:47:01 +00:00
Yifan Hong
bfcfa8c18f Merge changes from topic "dap_size_check_python"
* changes:
  Skip checking vendor partition size on AOSP targets
  Reland "Move partition size checks to python script"
2019-11-05 17:53:39 +00:00
Treehugger Robot
db49de8560 Merge "Fix and generate vndk snapshot entirely in Soong" 2019-11-05 03:48:51 +00:00
Yifan Hong
fe07343fed Support Factory OTA for Virtual A/B devices
In Factory OTA, secondary payload should be generated without
virtual_ab flag set, so that update package generator generates
a regular A/B OTA (with snapshot_enabled set to false), and
OTA client writes system_b without snapshots.

Test: apply secondary OTA
Fixes: 138733621
Change-Id: I05d534a12d4a7891ce5597f3c29e55f5185e5a8d
2019-11-04 15:14:26 -08:00
Colin Cross
dd386dc9ac Merge "Use system modules for turbine in Make" 2019-11-04 18:54:32 +00:00
Ulyana Trafimovich
6dc79ada3d Merge "Disable dexpreopt on targets that do not include default ART config." 2019-11-04 12:04:04 +00:00
Anton Hansson
871d39c40e Merge "Ensure current product use PRODUCT_* vars directly" 2019-11-04 10:35:48 +00:00
Jiyong Park
479cc84706 Merge "Avoid path conflicts for the notice files" 2019-11-04 09:46:42 +00:00
Treehugger Robot
27fe9add1d Merge "Bump PRODUCT_SHIPPING_API_LEVEL to 29 for CSI" 2019-11-04 04:48:12 +00:00
Jiyong Park
e12c862013 Avoid path conflicts for the notice files
Path conflicts could happen when following conditions are met.
1) a java library named "foo" is not installable.
2) a java library named "bar" is installable, and its stem is set to
"foo".

Then the notice file for 1) becomes foo.jar.txt following its
LOCAL_MODULE, while the notice file for 2) becomes foo.jar.txt following
its stem. Since the file for 1) is a synthetic one, the actual name
isn't important. Avoid the conflict by appending a suffix
(_non_installable, but could be anything) to the file name for 1).

There still is a chance for the conflict; if the stem for "bar" is set
to "foo_non_installable". But practically, the chances are very low.

Bug: 139391334
Bug: 143700028
Test: m
Change-Id: Id50b30774bbf65cc180baf963a95ea56fe6eb74f
2019-11-04 10:30:34 +09:00
Peter Collingbourne
227ad08281 Merge "Add support for $(TARGET_EXPERIMENTAL_MTE) in product configs." 2019-11-02 02:00:22 +00:00
Yifan Hong
60bfcc4fac Skip checking vendor partition size on AOSP targets
AOSP targets doesn't have INSTALLED_VENDORIMAGE_TARGET defined.

Fix dump-dynamic-partitions-info to filter out vendor
from dynamic partition lists.

Then, check_partition_sizes.py reads info without vendor
in dynamic partition list for AOSP targets.

Test: forrest
Bug: 143734706

Change-Id: I788196d854c1cf3eea218d534599f8bf642120fc
2019-11-01 17:04:27 -07:00
Peter Collingbourne
784db1a741 Add support for $(TARGET_EXPERIMENTAL_MTE) in product configs.
We are bringing up support for ARM Memory Tagging Extension in the platform,
but the required patches have not yet landed in the upstream kernel. This
change adds support for a product variable that products may set to true to
declare support for an experimental userspace interface to MTE. Setting the
variable to true causes a product configuration to be enabled which will
activate code in bionic and scudo that uses the interface.

This variable should not be set to true in shipping products because
the userspace interface has not been finalized and is subject to change.
Once the support patches have landed in the kernel, bionic and scudo will
be changed to use the official interface and the variable will be removed.

Bug: 135772972
Change-Id: Ie3d2619bc09c134e0da073c65805e7ec049687e1
2019-11-01 15:33:52 -07:00
Colin Cross
f0add55066 Use system modules for turbine in Make
turbine supports taking system modules on the command line,
now that we target Java language level 1.9 and use system modules
by default switch turbine to match javac.

This is equivalent to Ieee07502151da0d5693bb8929213d495c039106b
in Soong.

Test: m java
Change-Id: Ib91c6f57b316f48f1ab819e4e1d2dc2e0ee42988
2019-11-01 13:34:46 -07:00
Yifan Hong
3a7c2ef7cc Reland "Move partition size checks to python script"
This reverts commit 0141e45b96.

Reason for revert: Fixed in follow-up CL
Test: forrest
Bug: 143734706

Change-Id: I007acf228d4fb4d6a16ae9089e3f04cf33a567bb
2019-11-01 11:41:26 -07:00
Ulya Trafimovich
5877cec1fa Disable dexpreopt on targets that do not include default ART config.
Dexpreopt build commands should only be generated on targets that
include build/make/target/product/runtime_libart.mk, which sets the
necessary variables such as PRODUCT_SYSTEM_DEFAULT_PROPERTIES that
contain default values passed to dex2oat. This file also sets a
variable PRODUCT_USES_DEFAULT_ART_CONFIG that is used in
build/make/core/dex_preopt.mk to decide if boot images should be
installed.

On some targets build/make/target/product/runtime_libart.mk is not
included. Prior to this patch, on such targets invalid dexpreopt
commands were generated, but not used, so they did not cause any
visible build failures. The invalid commands can be grepped as:

  lunch qemu_trusty_arm64-userdebug && m nothing \
    && fgrep -e '-Xms ' $ANDROID_BUILD_TOP/out/soong/build.ninja

In this case '-Xms ' is an ill-formed option passed to dex2oat (the
option expects one argument, but none is passed).

This patch makes the DisablePreopt variable passed from make to
soong more strict: it not only requires WITH_DEXPREOPT, but also
PRODUCT_USES_DEFAULT_ART_CONFIG. This means that dexpreopt commands
will not be generated on targets that do not include
build/make/target/product/runtime_libart.mk.

Test: lunch aosp_walleye-userdebug && m \
    && find $ANDROID_BUILD_TOP/out -name 'boot.art'
    # expect to find files in /out/target/product/walleye/system/framework/$ARCH/

Test: lunch qemu_trusty_arm64-userdebug && m \
    && fgrep -e '-Xms ' $ANDROID_BUILD_TOP/out/soong/build.ninja
    # expect empty output

Change-Id: I3d765ed0dd8b38236b8bdd5c6202bb1d3f45f904
2019-11-01 18:20:35 +00:00
Andrei-Valentin Onea
15e75e8807 Merge "Revert "Move partition size checks to python script"" 2019-11-01 15:36:10 +00:00
Treehugger Robot
49aa6fc009 Merge "Update the docs for 'mm[m][a]'" 2019-11-01 06:42:14 +00:00
Raff Tsai
0141e45b96 Revert "Move partition size checks to python script"
This reverts commit a4906cd306.

Reason for revert: b/143734706

Change-Id: I905bd9c0bfcbd123c8f9e78986bfcb5600a9eca9
2019-11-01 05:36:20 +00:00
Jooyung Han
41055047da Merge "Use MakeVar from soong instead of hardcoding" 2019-11-01 01:57:50 +00:00
Yifan Hong
8244f27722 Merge "Move partition size checks to python script" 2019-11-01 01:52:11 +00:00
Roland Levillain
374213db0d Merge "Implement APEX JAR (Java library) absence checks for Core Libraries." 2019-10-31 19:03:22 +00:00
Yifan Hong
a4906cd306 Move partition size checks to python script
Easier to read and modify its logic.

Test: builds
Test: test_check_partition_sizes
Test: atest releasetools_test
Test: atest releasetools_py3_test
Change-Id: I73204664b64a0bcee7375fa6fca46758d5a2bb72
2019-10-31 11:22:20 -07:00
Ashwini Oruganti
6aaafc4ad4 Merge "Add keys for GooglePermissionController" 2019-10-31 16:38:56 +00:00
Roland Levillain
b353eda0c0 Implement APEX JAR (Java library) absence checks for Core Libraries.
Refactor existing native library checks to share common logics.

Test: Check that `m installclean && m systemimage` succeeds
Test: Check that `m installclean && m libart && m systemimage` fails
Test: Check that `m installclean && m core-oj && m systemimage` fails
Test: Check that `m installclean && m conscrypt && m systemimage` fails
Test: Check that `m installclean && m libart core-oj conscrypt && m systemimage` fails
Test: Check that
        `export OVERRIDE_TARGET_FLATTEN_APEX=true \
         && m installclean \
         && m systemimage`
      succeeds
Bug: 142944799
Bug: 128708192
Bug: 113374338
Change-Id: I703a837c6bb138af73eeb95fc08e1a87af2d8ad7
2019-10-31 16:09:02 +00:00
Roland Levillain
3596fc60c8 Merge "Reland "Remove Core Library JARs from /system/framework."" 2019-10-31 13:07:46 +00:00
Yo Chiang
6276066a02 Bump PRODUCT_SHIPPING_API_LEVEL to 29 for CSI
Bug: 141972143
Test: lunch mainline_system_arm64-userdebug ; m
Test: TH build_test
Merged-In: Iee2ac89586d71d9ab3bb257f2b3b1073710554d5
Change-Id: Iee2ac89586d71d9ab3bb257f2b3b1073710554d5
2019-10-31 11:00:28 +00:00
Treehugger Robot
aff6c12f10 Merge "Update finding go files" 2019-10-31 08:19:35 +00:00
Jooyung Han
037b3e081c Use MakeVar from soong instead of hardcoding
check-vndk-list target reads the vndk.libraries.txt file from
SOONG_VNDK_LIBRARIES_FILE makevar.

Bug: 142963962
Test: m check-vndk-list
Change-Id: I10f6ad80757ed267b66c9a709b75621e063f3744
2019-10-31 11:37:07 +09:00
Dan Willemsen
67074fec61 Update the docs for 'mm[m][a]'
Make it explicit that we will build *and* install all the modules under
the directories. And that 'mm[m]' is now the same as 'mm[m][a]'.

Test: hmm
Change-Id: I86c42229f8cdc24922fb3014777ad13d72a1c0ea
2019-10-30 12:35:34 -07:00
Roland Levillain
c7c4a766f0 Reland "Remove Core Library JARs from /system/framework."
These JARs are part of the ART APEX, and are now located in
`/apex/com.android.art/javalib`. Remove the supernumerary copies in
`/system/framework` and save ~11 MiB on the system partition.

This change no longer breaks coverage builds, as module
`jacocoagent` has been removed from `TARGET_CORE_JARS` in CL
https://android-review.googlesource.com/c/platform/build/+/1151464.

This reverts commit 7c39368927.

Test: Device boot test
Test: Check that:
        export EMMA_INSTRUMENT=true
        && unset EMMA_INSTRUMENT_STATIC
        && m installclean
        && m systemimage
      generates a system image that contains these files:
        /system/framework/apex-jacocoagent.vdex
        /system/framework/boot-jacocoagent.vdex
        /system/framework/jacocoagent.jar
        /system/framework/<arch>/apex-jacocoagent.art
        /system/framework/<arch>/apex-jacocoagent.oat
        /system/framework/<arch>/apex-jacocoagent.vdex
        /system/framework/<arch>/boot-jacocoagent.art
        /system/framework/<arch>/boot-jacocoagent.oat
        /system/framework/<arch>/boot-jacocoagent.vdex
Test: Run test ATP test avd/avd_boot_health_check on build target
      cf_x86_phone-userdebug_coverage
Bug: 142944799
Bug: 143304991
Change-Id: Ifdb2331c5dcb992adbfd6c5a3983d8b9b13d16b2
2019-10-30 16:25:19 +00:00
Anton Hansson
cca8cdb993 Ensure current product use PRODUCT_* vars directly
Disallow use of the long-form PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_*
after the short-form has been assigned, to ensure modifications are
made to the right variable.

Macros that need to work with multiple products get a convenience
macro that is redefined at the right moment.

Test: compare_target_files
Test: build_test
Change-Id: Ib0e57b1bc51b1f308296a150b9b7590a0bb5c313
2019-10-30 14:29:42 +00:00
Bo Hu
3c9230183d Merge "emulator: remove vintf and some whitelists" 2019-10-30 13:20:19 +00:00
Roland Levillain
10954b52ee Merge "Remove module jacocoagent from TARGET_CORE_JARS." 2019-10-30 11:08:12 +00:00
Orion Hodson
831472dee1 Update finding go files
Add gogrep for grepping golang files.

Extend mgrep to search for files in subfolders of build and soong
directories.

Test: source build/envsetup.sh && gogrep DepsMutators
Test: source build/envsetup.sh && mgrep ProductPrivateSepolicyDirs

Change-Id: I26fd9ba5ba0b81b202154aa527ed4a0aa60c1c54
2019-10-30 10:07:17 +00:00
Treehugger Robot
1be2490d3b Merge "CleanSpec for VNDK APEX" 2019-10-30 04:29:37 +00:00
Treehugger Robot
85808a8089 Merge "Revert "Revert "Revert "Revert "install VNDK APEX instead of VNDK libs""""" 2019-10-30 04:29:37 +00:00
Xiangyu/Malcolm Chen
c76498a53d Merge "Adding IRadio1.5 definition." 2019-10-29 22:22:38 +00:00
Roland Levillain
fe67f14906 Remove module jacocoagent from TARGET_CORE_JARS.
Before this change, `jacocoagent` was conditionally added to
`TARGET_CORE_JARS`. However, this module is not really part of the
Android Core Libraries (also, we plan to remove `TARGET_CORE_JARS`
from `PRODUCT_PACKAGES`). Remove it from `TARGET_CORE_JARS` while
keeping it in `PRODUCT_PACKAGES` and `PRODUCT_BOOT_JARS`, to keep
having it installed and being part of the boot class path on
devices (under the same conditions).

Test: Check that:
        export EMMA_INSTRUMENT=true
        && unset EMMA_INSTRUMENT_STATIC
        && m installclean
        && m systemimage
      generates a system image that contains these files:
        /system/framework/apex-jacocoagent.vdex
        /system/framework/boot-jacocoagent.vdex
        /system/framework/jacocoagent.jar
        /system/framework/<arch>/apex-jacocoagent.art
        /system/framework/<arch>/apex-jacocoagent.oat
        /system/framework/<arch>/apex-jacocoagent.vdex
        /system/framework/<arch>/boot-jacocoagent.art
        /system/framework/<arch>/boot-jacocoagent.oat
        /system/framework/<arch>/boot-jacocoagent.vdex
Test: Run test ATP test avd/avd_boot_health_check on build target
      cf_x86_phone-userdebug_coverage
Bug: 143304991
Bug: 142944799

Change-Id: Ib047a394342aeffbfec26ebc756159f145d6523e
2019-10-29 17:45:04 +00:00
Treehugger Robot
e8d9df122a Merge "Add zygote init script to mainline_system.mk" 2019-10-29 06:32:44 +00:00
Jooyung Han
407ed319ab CleanSpec for VNDK APEX
/system/lib/vndk(-sp) are replaced with symlinks to VNDK APEX

Bug: 141451661
Test: m
Change-Id: I71a4cef516d57866a7be8cc8cad02aedabf727df
2019-10-29 14:50:57 +09:00
Treehugger Robot
016f3027ed Merge "CleanSpec for symlinks to VNKD APEX" 2019-10-29 05:17:37 +00:00
Alistair Delva
15b5ad2d05 Merge "Build rules use private vars" 2019-10-29 02:21:01 +00:00
Jooyung Han
60c493f9c7 CleanSpec for symlinks to VNKD APEX
VNDK APEX was reverted.

Bug: 143374795
Test: m
Change-Id: I09fb28b72765dbe5a781001d8ddf53644fc45154
2019-10-29 11:19:06 +09:00
Yifan Hong
0fdd73b18f Merge "Include system_other.img in super.img by default" 2019-10-29 00:56:21 +00:00
Jooyung Han
93bdc3e734 Revert "Revert "Revert "Revert "install VNDK APEX instead of VNDK libs""""
This reverts commit ec8769762f.

Reason for revert:  Fix b/143374795

Change-Id: I7a9a06cb01e3cac0d15b352da76b6b8e9b45eb63
2019-10-28 21:07:21 +00:00
Ashwini Oruganti
33175af3f3 Add keys for GooglePermissionController
Bug: 142672293
Test: Builds are no longer complaining about missing key file
Change-Id: I9bdeca0225c9218695ce4f4b2dfd5e9cba2b37f4
2019-10-28 14:06:48 -07:00
Ryan Prichard
fe43a3f2cb Merge "Stop linking libdl.a into static bins" 2019-10-28 20:14:37 +00:00
Roland Levillain
5ec356acff Merge "Revert "Remove Core Library JARs from /system/framework."" 2019-10-28 17:48:23 +00:00
Greg Kaiser
35815917ba Merge "Revert "Revert "Revert "install VNDK APEX instead of VNDK libs"""" 2019-10-28 17:12:33 +00:00