Commit graph

1200 commits

Author SHA1 Message Date
Jiyong Park
6dd5383c37 Merge changes from topics "remove_bootimage_sysprops", "sysprop"
* changes:
  Drop the dependency from vendor/build.prop to system/build.prop
  Remove ro.bootimage.* sysprops
  ro.build.expect.* sysprops are created in a separate rule
  Make use of ADDITIONAL_ODM_PROPERTIES
  Refactor post_process_props.py
  remove code for default.prop
  Make more use of ADDITIONAL_VENDOR_PROPERTIES
  ADDITIONAL_*_PROPERTIES are props determined by the build system
2020-05-29 01:01:52 +00:00
Jiyong Park
ca9b02c1ce Make use of ADDITIONAL_ODM_PROPERTIES
Properties that were defined in the build rule for odm/build.prop are
now defined via ADDITIONAL_ODM_PROPERTIES.

Bug: 117892318
Test: m
Change-Id: I6220e217d0724b6e27127786e7a908e1e662d1a0
2020-05-27 12:52:44 +09:00
Jiyong Park
f2b944ccea Make more use of ADDITIONAL_VENDOR_PROPERTIES
Properties that were defined in the build rule for vendor/build.prop are
now defined via ADDITIONAL_VENDOR_PROPERTIES.

Bug: 117892318
Test: m
Change-Id: Ib3dc9d001a8dcd0aa38f1acae384a96b67b5af8a
2020-05-27 12:52:43 +09:00
Jiyong Park
57f51f1693 ADDITIONAL_*_PROPERTIES are props determined by the build system
This change defines ADDITIONAL_<partition>_PROPERTIES to store properties
determined by the build system itself.

ADDITIONAL_SYSTEM_PROPERTIES was originally ADDITIONAL_BUILD_PROPERTIES.
ADDITIONAL_VENDOR_PROPERTIES was originally FINAL_VENDOR_DEFAULT_PROPERTIES.
ADDITIONAL_PRODUCT_PROPERTIES has been there and thus not changed.
ADDITIONAL_ODM_PROPERTIES is newly defined, although it is empty now.

In addition, ADDITIONAL_VENDOR_PROPERTIES are now defined in
core/main.mk along with other ADDITIONAL_*_PROPERTIES.

Bug: 117892318
Test: m

Change-Id: Ic41bba2e5695355436ac8df353866cfc044e1e0b
2020-05-27 12:52:43 +09:00
Yo Chiang
1db657a1ed Check module existence with ALL_MODULES subvars
Use ALL_MODULES.*.PATH to check module existence.
Use get-modules-for-2nd-arch to check the existence of second arch
variant.
Fix some typos *existant -> existent

Bug: 155869107
Test: lunch mainline_system_arm64; m
Test: lunch generic; m
Change-Id: Ic10fb34a11da0bfbfc528da7496fd929b1d77113
2020-05-20 16:02:07 +00:00
Yo Chiang
7c147f7e29 Merge "Resolve module bitness for PRODUCT_PACKAGES" 2020-05-20 04:55:22 +00:00
Treehugger Robot
3dbbfde296 Merge changes I80341c2e,I0935f611,Ia805cb47
* changes:
  Deprecate ADDITIONAL_DEFAULT_PROPERTIES
  Move most of the sysprop generation rules to sysprop.mk
  Add PLATFORM_VERSION_LAST_STABLE
2020-05-20 03:49:26 +00:00
Jiyong Park
80f164c0b3 Deprecate ADDITIONAL_DEFAULT_PROPERTIES
As we merge default.prop into build.prop, we don't need to distinguish
ADDITIONAL_DEFAULT_PROPERTIES and ADDITIONAL_BUILD_PROPERTIES. Deprecate
the former in favor of the latter.

Bug: 117892318
Test: m
Change-Id: I80341c2e05d70821396202dc9e94104625ebf024
2020-05-18 21:44:52 +09:00
Yo Chiang
5e85bfe3a3 Resolve module bitness for PRODUCT_PACKAGES
PRODUCT_PACKAGES contains "simple module name" and "bitness suffix".
Call `resolve-bitness-for-modules` to resolve module bitness before
using PRODUCT_PACKAGES.

Bug: 155869107
Test: TH presubmit build_test
Test: check the value of event_log_tags_src
Change-Id: I95fcd833990b3401892c2f7859c83acd90f9e920
2020-05-14 04:07:56 +00:00
Yo Chiang
b85a140c3c Refactor bitness resolving logic of product-installed-files
* Add get-modules-for-2nd-arch helper function

Add a generic function to retrieve second arch variant module names for
TARGET, HOST and HOST_CROSS modules.
It uses ALL_MODULES.<module>.FOR_2ND_ARCH to make sure that we are
really returning second arch variant module names.
Unlike `get-32-bit-modules` this function doesn't sort its output so it
potentially saves us a tiny bit of makefile parsing time.

* Add resolve-bitness-for-modules

Factor out the common bitness-resolving logic of
`product-installed-files` and `host-installed-files` to a helper
function.
When resolving HOST_CROSS modules, the primary arch is 32-bit and
secondary arch is 64-bit.

Bug: 155869107
Test: TH
Test: check the value of product_target_FILES and product_host_FILES
Change-Id: I0fdea2e8c55e5b8edf960dbf5e17bb789abb0bf8
2020-05-13 20:42:07 +08:00
Dan Willemsen
17315c2eda Remove empty rules for check_elf_files.timestamp
If we don't have any new dependencies, or we never set up the
check_elf_files.timestamp rule, don't create an empty one now.

There were >7000 of these unused and empty rules in my AOSP
aosp_cf_x86_phone build.

This was initially brought to my attention by the new checks in
https://github.com/google/kati/pull/189

Test: diff out/build-aosp_cf_x86_phone.ninja, only removed phony rules
Change-Id: Ia43cbbd04df4a01d2182b14e3ccbe5d5ecbcabad
2020-04-28 14:56:06 -07:00
Jeongik Cha
82fead38a4 Restore $(SOONG_OUT_DIR)/ndk/% in static_whitelist_patterns
$(SOONG_OUT_DIR)/ndk/% needs to be whistlisted in release branch
(ag/11251273)
Accordingly, restore it in aosp as well.

Bug: 148993225
Test: m nothing
Change-Id: I7503c007c3e786b0cab26ea1422f0d4ba5a40662
2020-04-27 04:44:58 +00:00
Treehugger Robot
691d385147 Merge "Clean up static_whitelist_patterns" 2020-04-24 12:03:21 +00:00
Treehugger Robot
4aa437f3ab Merge "Extend static_whitelist_patterns" 2020-04-24 08:02:33 +00:00
Jeongik Cha
ab50b8fa85 Extend static_whitelist_patterns
product-installed-files generates more default artifacts than
$(call module-installed-files,$(call auto-included-modules)),
and it causes problems when we try to apply this mechanism to other
partition

So use product-installed-files with an empty parameter as static
whitelist

Test: apply require-artifacts-in-path to other partition(or path),
      and then, m nothing
Test: add system module outside mainline_system.mk, and check if there is error.

Bug: 148993225
Change-Id: Ie110f20ff833229b23a777ff1decb32f84b9cef7
2020-04-24 05:08:02 +00:00
Jeongik Cha
4472819166 Clean up static_whitelist_patterns
$(HOST_OUT)/% and $(SOONG_OUT_DIR)/ndk/% are not necessary anymore.

Bug: b/148993225
Test: m nothing
Change-Id: If2551283ebb6c516c029d1c04aebe25661bc6a1a
2020-04-24 14:05:49 +09:00
Dan Willemsen
58634e1482 Remove AUX support
This was deprecated in R, which has now branched, and there aren't any
users on master.

Test: build-aosp_crosshatch.ninja is the same (except for the removal of the empty auxiliary target)
Test: treehugger
Change-Id: I306156ab7f91cd4a2258554b4215766c99cd12d1
2020-04-18 21:00:18 -07:00
Dan Shi
6a619b8d85 Include shared host liraries in test suite zip
Bug: 151194160
Test: m -j vts && \
  ls out/host/linux-x86/vts/android-vts/testcases/lib64/
Change-Id: I7ebc4bf392d4c0f27478607846974631390097f8
2020-04-13 09:29:16 -07:00
Orion Hodson
70fcf897c5 Update dex2oat filter
verify-at-runtime is deprecated in favor of extract. Update to
stop deprecation warnings during OTAs.

Exempt-From-Owner-Approval: cherry-pick from rvc-dev

Bug: 149794809
Test: manual OTA
Change-Id: I9b8365a1fba5fd18420661a3e6ada77f3609bcc7
Merged-In: I9b8365a1fba5fd18420661a3e6ada77f3609bcc7
(cherry picked from commit db651d5913)
2020-03-30 13:03:47 +00:00
Roopesh Nataraja
11e776fc32 Build DEVICE manifests and fragments for each SKU
Single vendor can support multiple skus with different
capabilities. Add support to define and build sku
based device manifests.

Specify DEVICE manifests in BoardConfig.mk as below.

  # installed to /vendor/etc/vintf/manifest_{sku}.xml
  DEVICE_MANIFEST_SKUS := sku1 sku2 sku3

  DEVICE_MANIFEST_SKU1_FILE := device/foo/bar/manifest_sku1.xml
  DEVICE_MANIFEST_SKU2_FILE := device/foo/bar/manifest_sku2.xml
  DEVICE_MANIFEST_SKU3_FILE := device/foo/bar/manifest_sku3.xml

Bug: 148601741

Change-Id: Id57d4ad21b0d3edf8d60d07446b6b806c1df20ab
2020-03-09 15:09:08 -07:00
Bill Peckham
573f458718 Merge "Don't touch .installable_files for non-FULL_BUILD" 2020-03-05 18:49:48 +00:00
Bill Peckham
7c3aa02ca3 Don't touch .installable_files for non-FULL_BUILD
If we're not doing a full build, leave
$(PRODUCT_OUT)/.installable_files* alone rather
than truncating it. This prevents the clean logic
in Soong from removing everthing that we're trying
to use to build an image using the snod, vnod, etc.
goals.

Bug: 149460609
Test: make droid, make vnod, verify vendor.img
Change-Id: I612e32621b8045d085829507f22f6385b859f0c2
2020-03-04 15:12:52 -08:00
Automerger Merge Worker
87f76601de Merge "Move build number file to out/soong" am: 47b08fbab5
Change-Id: I8561be9fcabc54526fbf5efa48ef32b08f025b96
2020-02-28 20:32:26 +00:00
Colin Cross
d68a88402f Move build number file to out/soong
Move the build number file to out/soong so Soong can treat it
as an output path, and pass the name of the file to Soong instead
of the command to read it.

Test: m checkbuild
Change-Id: I9e1aecf33d11fe4fde34cd57cc9b1f1ad49b0424
2020-02-25 00:06:46 +00:00
Automerger Merge Worker
e1570cb99d Merge "Adding vendor_boot-debug.img" am: 31d4a5aed7
Change-Id: I48f3ded6c5c63aa9a828a529880f0cdb2918f8e2
2020-02-20 04:12:10 +00:00
Bowgo Tsai
6a68367e6e Adding vendor_boot-debug.img
Commit I30137c3caef91805d9143d404e5e4d06c0fccc30 adds boot-debug.img
to allow adb root with an user build GSI image.

  https://source.android.com/compatibility/vts/vts-on-gsi

Another commit I5b005097b73f59857c3a2f92d693b3e67ee8424e adds
vendor_boot.img to pair with a generic kernel image, the GKI boot.img.

To allow adb root for devices using a GKI, vendor_boot-debug.img is
introduced. The image combination used in VTS will be:

    Old devices without GKI:
      GSI system.img + boot-debug.img + vendor.img, etc.

    New devices with GKI:
      GSI system.img + GKI boot.img + vendor_boot-debug.img + vendor.img, etc.

Note that boot-debug.img still can be used on new devices for
non-compliance scenario.

Bug: 147849477
Test: lunch aosp_cf_x86_64_phone-userdebug; make vendorbootimage_debug
Test: `make dist`, checks that both vendor_boot-debug.img and
      vendor-ramdisk-debug.cpio.gz are in $OUT/ and out/dist.
Test: `make dist`, checks that installed-files-vendor-ramdisk-debug.{json,txt} are
       in $OUT/ and out/dist.
Change-Id: I66b662d8b1e5c619ed7bb81e40233fe9df363b27
2020-02-18 13:46:17 +08:00
Vic Yang
64d0b72f81 Merge "Remove unused no_vendor_variant_vndk_check target"
am: 526551f013

Change-Id: Id13c047df6da98ce0ab23b625c1578c2db2d3571
2020-01-28 23:04:41 -08:00
Vic Yang
3ec918d342 Remove unused no_vendor_variant_vndk_check target
This was missed when we moved from a single target for checking all
VNDK libraries to using timestamp files for checking individual VNDK
libraries.

Test: Build success.
Change-Id: I3be19f6755b24fff2446449a9dbc84db9a20ea41
2020-01-28 21:01:38 -08:00
Colin Cross
a8008259f9 Merge "Fix building docs as part of checkbuild"
am: 35e12a7020

Change-Id: I6d3e445979e8d390841d24c01cbf37f8d6a20445
2020-01-28 14:46:48 -08:00
Colin Cross
43e74295e0 Fix building docs as part of checkbuild
s/module_to_check/modules_to_check/

Bug: 118815658
Test: m checkbuild
Change-Id: I53e10747ed404509fd11adb72e641c702e27655b
2020-01-27 11:36:07 -08:00
TreeHugger Robot
2f0743483b Merge "DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master" into stage-aosp-master 2020-01-16 18:29:25 +00:00
Yifan Hong
51be69f063 device_(manifest|matrix).xml -> vendor_*
Building device_manifest.xml or device_compatibility_matrix.xml only
builds vendor manifest / matrices, but not all device manifest /
matrices (e.g. vintf_fragments, ODM manifest, etc.). Make the name more
accurate.

Test: m check-vintf-all

Change-Id: Ib017507c421355263d53a9e5b357f169c77da36d
2020-01-14 14:24:51 -08:00
Automerger Merge Worker
cccefb9901 Merge "jacoco-report-classes-all.jar includes jar from other partitions" am: 3801c82e33 am: bf9e4cdd81
Change-Id: I6adf59d2188289165034d7374fe50ad1f32dda54
2020-01-09 01:05:03 +00:00
Jiyong Park
bee946e8eb jacoco-report-classes-all.jar includes jar from other partitions
jacoco-report-classes-all.jar now depends on all installed files
including apks in /apex. Previously, it depended only on files under
system.img and as a result jacoco for other partitions were missing.

Bug: 147296855
Test: m

Change-Id: I755de1205ebc43c197af36a13cca5f4b49e275e8
2020-01-08 14:41:45 +09:00
Automerger Merge Worker
3bbef8f744 Merge "Export list of "installable" files to soong_ui" am: 99202ec0a6 am: 8e080ccefe
Change-Id: I0dd6e68b91057d93f41c47da80749c7dbcb80aea
2020-01-04 05:34:11 +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
Automerger Merge Worker
4bce5b4f4b Merge "Define ro.product.vndk.version" am: e8139b905d am: a126b69335
Change-Id: If7676e80733b8a4a6b4e958a20f8e9d9e3fcf322
2019-12-25 09:15:53 +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
Automerger Merge Worker
3648df452f Merge "Only dist recovery_ramdisk if BOARD_USES_RECOVERY_AS_BOOT" am: 9de27595ec am: de2634bdf0
Change-Id: I9a2d2b6be6992423ae1f8b2117af616dd5b74cce
2019-12-24 00:14:27 +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
Automerger Merge Worker
3ff4bb8205 Merge "Dist ramdisk-recovery.img and misc_info.txt" am: b581214e65 am: aa64af5c71
Change-Id: I3002e62d53c4d21d3dcc26269583782048a1a047
2019-12-23 18:53:38 +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
Automerger Merge Worker
069bb10478 Merge changes from topic "runtime_apex_available" am: 982da2812f am: 2320db6261
Change-Id: I99a596b5c6d0393d6976c7231b49a4ef3b67b4cf
2019-12-23 05:06:42 +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
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
Automerger Merge Worker
b84f1489a2 Merge "Use apex_available property" am: 8029967a99 am: d030761781
Change-Id: I980478ff17779ac10f1dbbce26eedb7e69b8c9d1
2019-12-20 07:05:46 +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
Automerger Merge Worker
2b6fdb3dab Revert submission 1194828-revert-1191937-art_apex_available-DWXQGTKMAR am: f8b8c647e4 am: fc07c41a9e
Change-Id: I87209392968251e9c7131be858fc1b580ee60e30
2019-12-20 01:42:59 +00:00
Jiyong Park
f8b8c647e4 Revert submission 1194828-revert-1191937-art_apex_available-DWXQGTKMAR
Reason for revert: relanding with fix
Reverted Changes:
Ic4119368c:Revert submission 1191937-art_apex_available
Ia084976bb:Revert submission 1191937-art_apex_available
Iada86226d:Revert submission 1191937-art_apex_available
Ic76735eac:Revert submission 1191937-art_apex_available
I1eb30e355:Revert submission 1191937-art_apex_available
Icaf95d260:Revert submission 1191937-art_apex_available
Ie8bace4be:Revert submission 1191937-art_apex_available
I8961702cf:Revert submission 1191937-art_apex_available
I39316f9ef:Revert submission 1191937-art_apex_available
I522a7e83b:Revert submission 1191937-art_apex_available
I8b9424976:Revert submission 1191937-art_apex_available
I48b998629:Revert submission 1191937-art_apex_available

Change-Id: I8b4eed03c76153e2469f7b3e2e33c6e20e6e0409
2019-12-19 18:16:34 +09:00