Commit graph

56969 commits

Author SHA1 Message Date
Yifan Hong
8bdfe365d6 Improve BUILT_ASSEMBLED_*_MANIFEST checks
They are moved into check-vintf-all, which is more
accurate and do not require building full OS images.

Also move kernel check code down to check_vintf_compatible. There
is no assembled manifest to put kernel configs now, but they are still
required for build time OTA VINTF checks.

Test: builds
Test: change a vintf_fragment file to cause a conflict with main manifest file
(add health@2.0 to boot@1.1.xml), and check_vintf_vendor_log fails

Change-Id: I9791abc440a40e1537b4387eb67575ff2e22df08
2020-01-11 19:06:18 +00:00
Yifan Hong
850f8b5d77 Add check-vintf-all target.
Add target that checks VINTF compatibility of the current build
(in $PRODUCT_OUT) properly. The target:

- Doesn't require a full build
- Won't run for system-only AOSP targets

A verbose log is printed if `m check-vintf-compatible` is executed,
but it won't show up if `m` is executed.

(After this patch, adding product / system_ext matrices is as simple
as defining a vintf_compatibility_matrix in Soong, and VINTF
compatibility is properly checked.)

Test: m check-vintf-all
Test: delete */etc/vintf and m check-vintf-all
Test: m
Test: m check-vintf-all on device with vendor/odm and ODM SKU-specific
      manifests

Test: change manifest.xml to be incompatible and m check-vintf-all fails

Bug: 140280874
Bug: 140360109

Change-Id: I6ee79910d745d29cfc9b05b1435e26f91b7c10f7
2020-01-10 13:17:56 -08:00
Chen Xu
42f2c761bf Merge "Revert submission 1182953-1576003954286-8455af5a" 2020-01-07 19:29:08 +00:00
Treehugger Robot
7d44f2d01d Merge "Use symlinks in the build graph for jni libs" 2020-01-07 14:42:51 +00:00
Martin Stjernholm
8da546b295 Merge "Remove DEX2OAT_DEPENDENCY which is the same as DEX2OAT." 2020-01-07 12:37:07 +00:00
Ulyana Trafimovich
5268bfa61e Merge "Respect JIT-zygote config when generating boot image location." 2020-01-07 10:48:45 +00:00
Yo Chiang
3ac9a12f5f Merge "Clean up TARGET_FLATTEN_APEX lines in mainline products" 2020-01-07 08:41:53 +00:00
Treehugger Robot
ee83e2d2c8 Merge "Revert "Add boringssl_self_test to PRODUCT_PACKAGES"" 2020-01-07 03:51:29 +00:00
Treehugger Robot
0fe0eda502 Merge "update-vndk-list.sh delinated with ticks in error" 2020-01-07 01:47:42 +00:00
Martin Stjernholm
388a71f092 Remove DEX2OAT_DEPENDENCY which is the same as DEX2OAT.
Small cleanup to simplify the move of it into Soong.

Test: presubmits
Bug: 145934348
Change-Id: Ib4a0b69279f63d53405509b2d1529d9e60d46858
2020-01-07 00:00:29 +00:00
Steven Moreland
7e2ec0e5af update-vndk-list.sh delinated with ticks in error
People have asked me on several occassions how to fix this error. It's
somewhat confusing since scripts aren't usually on a path. However, in
this case, the script is added to the path on host. Hopefully, using
tick marks here will make that more clear.

Bug: N/A
Test: N/A
Change-Id: I8601a5a9eb348b2e358875b45eae57ec910c9a06
2020-01-06 15:05:07 -08:00
Daniel Mentz
eb28123fef Merge "Add unpack_bootimg to otatools to modify boot.img" 2020-01-06 18:43:56 +00:00
Dan Willemsen
b195e7ab04 Use symlinks in the build graph for jni libs
Now that ninja uses lstat and can support installing arbitrary symlinks,
switch jni lib symlinks from LOCAL_POST_INSTALL_CMDS to real rules.

Bug: 128577186
Test: List of files under PRODUCT_OUT is the same before/after this change
Test: out/target/product/generic/.installable_files now includes the symlinks
Test: m installclean; m NfcNci -> symlinks installed with correct dest
Test: m NfcNci; m NfcNci -> ninja: no work to do
Change-Id: I078dca53ab3d93f74c36fa66d5577e6e3e0640d6
2020-01-06 10:25:56 -08:00
Ulya Trafimovich
d1c9bfe87a Respect JIT-zygote config when generating boot image location.
Earlier CL Ida40dfae8c83bf7c2e737d5c7ea418e1197ad826 introduced
Soong-generated Make variable 'DEXPREOPT_IMAGE_LOCATIONS'. That CL was
erroneous in that it did not take JIT-zygote config into account and
generated identical location for "boot" and "apex" boot images.

This caused build breakages, because in case of JIT-zygote config the
two variables 'DexPreoptImages' and 'DexPreoptImageLocations' in the
module's dexpreopt.config were out of sync: 'DexPreoptImages' was
for the "apex" image, and 'DexPreoptImageLocations' was for the "boot"
image.

CL I9a91fc48e54d7d43abec2cb2b5a11e3581db380b introduced a workaround
for this problem: incorrect 'DexPreoptImageLocations' from the module
dexpreopt.config was ignored, and instead boot image location was
manually reconstructed from 'DexPreoptImages'. This workaround would
not work when we start using boot image extension and location will
become more complex.

This CL fixes the way 'DexPreoptImageLocations' is generated by
spliting the 'DEXPREOPT_IMAGE_LOCATIONS' variable in two variables
depending on the boot image flavour "boot" of "apex". This is
aligned with the way other similar variables are generated.

Test: aosp_walleye-userdebug boots.
Test: walleye_jitzygote-userdebug builds
  (on git_rvc-release branch with this CL cherry-picked).

Change-Id: I449c968909635dd8cc431323fccbc7fce440fea5
2020-01-06 15:58:52 +00:00
Daniel Mentz
30652b3380 Add unpack_bootimg to otatools to modify boot.img
unpack_bootimg in conjunction with mkbootimg can be used to re-create
boot.img with a different kernel image and ramdisk.

Change-Id: I9615facc9335885989772a0dd7f08217e2143a45
2020-01-04 15:25:42 -08:00
Treehugger Robot
99202ec0a6 Merge "Export list of "installable" files to soong_ui" 2020-01-04 05:16:24 +00:00
Dan Willemsen
dec6e8e056 Export list of "installable" files to soong_ui
These are a (partial) list of files that we'd install with a default
build. The idea is that if something is removed from this list, soong_ui
can remove it from the installed location before running ninja.

It's okay if there are things missing from this list, it's not intended
to be a 100% solution replacing installclean / CleanSpec.mk, just
something that handles 80% of the cases without user involvement.

In particular, if something is removed from PRODUCT_PACKAGES, we'll
remove it from disk, but not necessarily rebuild the image files. That's
the same as most use cases of CleanSpec.mk today, and often some other
change will trigger the necessary images to be rebuilt.

We should be able to fix that by changing all of the image creation
rules to depend on the (partial) list of files they care about, or by
fixing ninja to rebuild things when their list of dependencies change.
(Other tools run into this same problem)

The list of test files is also included so that we can remove obsolete
tests from their "installed" locations within test suites and the
testcases folders.

Test: remove a module from PRODUCT_PACKAGES, see the print and file removed
Test: change the name of a cts test, see the old one removed from cts
Change-Id: I67f270a6713369099ca523aaf991ee3beb815c0a
2020-01-03 19:19:11 -08:00
Treehugger Robot
f29df793c9 Merge "Add BUILD_BROKEN_NINJA_USES_ENV_VARS" 2020-01-04 01:32:40 +00:00
Treehugger Robot
6e54952b44 Merge "Add Soong android_app and android_test modules to javac-check" 2020-01-03 19:20:14 +00:00
Dan Willemsen
2607625f8b Add BUILD_BROKEN_NINJA_USES_ENV_VARS
See the Changes.md and the paired soong change for more information.

Test: Add BUILD_BROKEN_NINJA_USES_ENV_VARS := OLDPWD
      ALLOW_NINJA_ENV=false m nothing; check out/soong.log
Change-Id: I2167eac52166b513318bc48feb71c9d0b80e5fd4
2020-01-02 20:09:25 -08:00
Treehugger Robot
9d4a90ef4b Merge "Handle virtual A/B defines during dynamic_partitions_info merge." 2020-01-02 21:33:48 +00:00
Colin Cross
8e28a17bfe Add Soong android_app and android_test modules to javac-check
android_app and android_test modules were not built as part of
javac-check, which resulted in not running them in the Error Prone
build.

Fixes: 146455923
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I278d7ee0cdc3f49aa8fa4d4f13309e29d700f2ba
2019-12-30 22:08:07 -08:00
Yo Chiang
4a5ff18a01 Clean up TARGET_FLATTEN_APEX lines in mainline products
Remove redundant TARGET_FLATTEN_APEX lines from mainline board configs.
Remove redundant "inherit updatable_apex.mk" lines from
mainline_system_$arch makefiles.
mainline_system.mk now always install APEX into /system partition.
Products who need flattened APEXes would have their flattened APEXes
installed into /system_ext.

Test: Build mainline_system_arm64 and validate noop
Change-Id: I9ee4af529a4bd554cb8707cfc260d6b912fd5fff
2019-12-30 16:19:28 +08:00
Jiyong Park
aeda4b267b Revert "Add boringssl_self_test to PRODUCT_PACKAGES"
This reverts commit ac4a35f017.

The change is not required because the conscrypt APEX now has
'boringssl_self_test' as its required modules.

Bug: 146549048
Test: m && device boots
2019-12-30 16:58:34 +09:00
Treehugger Robot
4506b17dd3 Merge "Stop removing valid copy headers" 2019-12-27 02:15:26 +00:00
Dan Willemsen
13cb165b91 Stop removing valid copy headers
My change to clean up obsolete copy headers would remove valid ones if
thhe LOCAL_COPY_HEADERS_TO path wasn't cleaned. I'm seeing this most
with values that just end in '/', so we end up with a '//' in the path,
which isn't textually equivalent, and we remove it.

Test: No longer seeing constant removals on internal products
Test: Set LOCAL_COPY_HEADERS_TO := ..
Test: Set LOCAL_COPY_HEADERS_TO := ../foo
Test: Set LOCAL_COPY_HEADERS_TO := /foo
Change-Id: Idbeeb207a2bb2a8da766473dbded877cec7c9cc1
2019-12-26 16:52:34 -08:00
Kiyoung Kim
f1ef5591f1 Merge "Do not build ld.config.txt" 2019-12-27 00:08:06 +00:00
Jeff Davidson
4c443e1d4e Revert submission 1182953-1576003954286-8455af5a
Reason for revert: Crashes telephony process when saving XML config from carrier apps (b/146727232)
Reverted Changes:
Ieaeec41f1: Whitelist telephony-common, ims-common.
I5588f7615: Add telephony-common, ims-common to telephony apex...
I81e922c0d: Add telephony-common, ims-common to telephony apex...

Change-Id: Ia64b73682fcc77db63e220867c66c4319c417582
Merged-In: Ia64b73682fcc77db63e220867c66c4319c417582
2019-12-26 23:27:33 +00:00
Treehugger Robot
7c18a37147 Merge "unbreak sdk_phone_x86 boot" 2019-12-26 15:51:49 +00:00
Treehugger Robot
e8139b905d Merge "Define ro.product.vndk.version" 2019-12-25 08:28:50 +00:00
Justin Yun
04e5a40f2c Define ro.product.vndk.version
Use ro.product.vndk.version to show the VNDK version that the product
partition is using.
When PRODUCT_PRODUCT_VNDK_VERSION is set, add ro.product.vndk.version
in /product/build.prop.
If PRODUCT_PRODUCT_VNDK_VERSION is "current", ro.product.vndk.version
will have the VNDK version in PLATFORM_VNDK_VERSION. Otherwise, it
will have the value defined in PRODUCT_PRODUCT_VNDK_VERSION.

Bug: 144534640
Test: Check if /product/build.prop has "ro.product.vndk.version"
Change-Id: If5e7e3a6c155de45f88f68700f16175656896afe
2019-12-24 07:20:43 +00:00
P Adarsh Reddy
7e9b5c4204 Handle virtual A/B defines during dynamic_partitions_info merge.
While merging the Dynamic Partition info Dicts in the case of
split builds, pick the virtual-a/b flags like virtual_ab,
virtual_ab_retrofit from the vendor half.

Bug: 146811936
Test: Merged build contains the virtual a/b defines.
Change-Id: I0171b074094e47cfd12dc6af2565acdcd1b65163
2019-12-24 06:32:03 +00:00
Treehugger Robot
9de27595ec Merge "Only dist recovery_ramdisk if BOARD_USES_RECOVERY_AS_BOOT" 2019-12-23 23:32:38 +00:00
Yifan Hong
dafae5228c Merge "Add /system/vendor/odm for VINTF search path" 2019-12-23 22:26:55 +00:00
Daniel Mentz
5a8feb5422 Only dist recovery_ramdisk if BOARD_USES_RECOVERY_AS_BOOT
Bug: 146798070
Change-Id: I9e9d313b8ca097b4930fc2c99800772c6bdcbb9e
2019-12-23 14:08:31 -08:00
Daniel Mentz
b581214e65 Merge "Dist ramdisk-recovery.img and misc_info.txt" 2019-12-23 18:36:07 +00:00
Daniel Mentz
4d6017d519 Dist ramdisk-recovery.img and misc_info.txt
Dist ramdisk-recovery.img and misc_info.txt. This is useful for
re-creating boot.img without having to download a huge target_files zip
file.

Change-Id: I2e1c1d547c95ca3433f89c68428c0c98fa4d19cd
2019-12-23 18:35:17 +00:00
Jiyong Park
70c96c7f11 unbreak sdk_phone_x86 boot
Bug: 146580512
Test: choosecombo 1 sdk_phone_x86 userdebug; m; emulator
Change-Id: I8227291c89e1cafc35e63eccd2f5ca34ecbd5434
2019-12-23 23:46:55 +09:00
Treehugger Robot
6e487404ed Merge "Move group_system_ext and passwd_system_ext to base_system_ext.mk" 2019-12-23 11:02:45 +00:00
Treehugger Robot
982da2812f Merge changes from topic "runtime_apex_available"
* changes:
  apex-libs-absence checks are removed
  Remove bionic libs from APEX_MODULE_LIBS check
  Use apex_available property
2019-12-23 04:50:53 +00:00
Jiyong Park
22195346dd apex-libs-absence checks are removed
The check is implemented in Soong via the apex_available property.
For a module that should be in the APEX named "foo" and shouldn't be in
any other APEX and also in the platform (the non-updatable part), the
property can be set to "foo" (without "//apex_available:platform")
to express the restriction and then Soong will enforce it.

Bug: 128708192
Test: m
Change-Id: Ia1aaaacd685f466447b61deae2849cb0aa83def3
2019-12-23 03:41:59 +00:00
Justin Yun
cc1e4cfb6e Move group_system_ext and passwd_system_ext to base_system_ext.mk
As we have base_system_ext.mk for the packages in system_ext
partition, move the group and passwd files for system_ext partition
to base_system_ext.mk.

Bug: 141658360
Test: mainline checks pass
Change-Id: Iff50482b90ff9877a58c54c8149014e8c103a3c6
2019-12-23 10:31:54 +09:00
Jiyong Park
be77c453a7 Remove bionic libs from APEX_MODULE_LIBS check
The test was to ensure that bionic libs are not installed to the
non-updatable part of the platform (e.g. system/lib). However, for
bionic libs, we actually have been installing them for bootstrapping.
Specifically, they are installed to /system/lib/bootstrap, not
/system/lib. The test has passed just because it didn't look into
/system/lib/bootstrap. Removing the unnecessary check.

Bug: 128708192
Bug: 133140750
Test: m
Test: m out/target/prduct/$(TARGET_DEVICE)/system/lib/libc.so doesn't
work
Change-Id: I93cbd74972cdd2daea45612136d5133fa49ab76a
2019-12-22 12:25:48 +09:00
Treehugger Robot
1ad03c7104 Merge "Define PRODUCT_PRODUCT_VNDK_VERSION" 2019-12-21 00:56:45 +00:00
Justin Yun
f19d840d13 Define PRODUCT_PRODUCT_VNDK_VERSION
PRODUCT_PRODUCT_VNDK_VERSION sets the VNDK version for product
partition. It may have "current" to use the PLATFORM_VNDK_VERSION.
If PRODUCT_PRODUCT_VNDK_VERSION is set, the native modules in product
partition are enforced to use VNDK's only from the system partition
as BOARD_VNDK_VERSION did to vendor partition.

Bug: 144534640
Test: build
Change-Id: I7ea148f0f8b7e44be7810adcacb30702d66831f1
2019-12-21 00:49:09 +00:00
Mark Chien
b516ddd539 Merge "[Tether16] Build Tethering package" 2019-12-20 13:43:46 +00:00
Kiyoung Kim
63d6d96653 Do not build ld.config.txt
Remove ld.config.txt from build target as it will be replaced with
generated linker config.

Bug: 139638519
Test: m -j passed
Change-Id: Idc3742df74f27d71d7f65bd7f0f518b31ca7970c
2019-12-20 18:30:07 +09:00
Treehugger Robot
8029967a99 Merge "Use apex_available property" 2019-12-20 06:48:33 +00:00
Jiyong Park
be2aed5529 Use apex_available property
Use apex_available property to prevent modules that are only for the
NN apex from being used outside of the APEX.

Bug: 128708192
Bug: 133140750
Test: m
Change-Id: I57fe857d99088ef08e065dd2a3fc5a9389b6eb0f
2019-12-20 13:18:27 +09:00
Jiyong Park
a4226d1942 Use apex_available property
Use apex_available property to prevent modules that are only for the
conscrypt apex from being used outside of the APEX.

Bug: 128708192
Bug: 133140750
Test: m
Change-Id: I08ca6cd8e5e4a254d9dd62695ee3ed317503d874
2019-12-20 13:13:50 +09:00