Commit graph

379 commits

Author SHA1 Message Date
Alice Wang
28a57dc1cc Allow AVF remote attestation to be disabled
This CL adds a variable in makefile that allows the
AVF remote attestation feature to be disabled easily.

The remote attestation feature is opt-in by default, as it
is a strongly recommended feature from Android V. It will
be disabled if PRODUCT_AVF_REMOTE_ATTESTATION_DISABLED is
set to true in the Makefile, otherwise it will be enabled
when the feature flag
RELEASE_AVF_ENABLE_REMOTE_ATTESTATION is on.

Bug: 331269709
Bug: 341292601
Test: run VM remote attestation on Pixel 6 and check it is
disabled

Change-Id: Id48ebd0eacf0d7a6c69b9100aee5ab6e4f112fe5
2024-05-24 09:22:41 +00:00
Pawan Wagh
c75b3e352b Merge "Add PRODUCT_16K_DEVELOPER_OPTION to product.mk" into main 2024-05-17 22:46:58 +00:00
Pawan Wagh
ea2121dc56 Add PRODUCT_16K_DEVELOPER_OPTION to product.mk
Test: m
Bug: 295035851
Change-Id: I5c7474efe873eca5369790a564ee483967541f6b
2024-05-17 21:41:32 +00:00
Martin Stjernholm
a8c687ff4f Document that ro.dalvik.vm.enable_uffd_gc has a limited lifetime.
Test: N/A - comment change only
Bug: 256438776
Change-Id: I1d2efe2f1985b967de17c25a9327fa4e9dcbaca3
2024-05-16 16:38:29 +01:00
Spandan Das
e4a3e9ee5a Update BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE documentation
With trunk stable, we no longer have multiple development branches, and
this flag is no longer in use.

Test: N/A (documentation change)
Bug: 308188056
Change-Id: Icdaddde9d107de9a453106cae35645b7e6cc21e9
2024-05-07 22:56:45 +00:00
Nikita Ioffe
ed8bd8aaf4 Add PRODUCT_AVF_MICRODROID_GUEST_GKI_VERSION to _product_single_value_vars
Forgot to add it in aosp/3044155.

Bug: 325991735
Test: m
Change-Id: I21d08b85b25426e498fc90c90729f7cb01f1f9d1
2024-04-23 18:34:52 +00:00
Daniel Zheng
b24b46d43f Merge "add build property for compression_factor" into main 2024-04-18 20:59:40 +00:00
Daniel Zheng
270130a025 add build property for compression_factor
Compression factor, as discussed, should be a configurable build
property. This flag here will control that. From initial analysis, it
looks like 64k is a good default. go/variable-block-vabc-perf

Bug: 313962438
Test: th
Change-Id: I2bddede22655e36446e734ac1917be560b1a3a1b
2024-04-18 11:22:26 -07:00
T.J. Mercier
70533992f4 Merge "Add flags for cgroup v2 and memcg v2 features" into main 2024-04-16 21:40:38 +00:00
Devin Moore
6c5aedfbef Define PRODUCT_HIDL_ENABLED
This is used to force HIDL to be enabled for device bring-up when
partners have converted all of their AOSP HAL implementations to AIDL,
but still have some partner-owned interfaces that they are working on
converting from HIDL TO AIDL.

Test: PRODUCT_HIDL_ENABLED = true && adb shell lshal
Test: PRODUCT_HIDL_ENABLED = false && adb shell lshal
Bug: 332548148

Change-Id: I6e6dc6c9e22d31c270e3c3520fc074bbeb349808
2024-04-05 23:06:37 +00:00
Spandan Das
7f52f2a804 Convert BuildIgnoreApexContritbutions variable to a boolean
(This relands aosp/3007754 with additional handling for go apexes. The
additional handling was added in internal in ag/26705862, so we need to
add this to aosp as well)

The ignore list is burdensome to maintain once we start adding the
module sdk contents to apex_contributions. Convert the variable to a
boolean. When set to true, all contents in `apex_contributions` will be
ignored

Test: m nothing on aosp,google and google_fullmte devices
Ignore-AOSP-first: CL topic does a cleanup of an internal only denylist

Merged-In: If899f6eaf5449c2aa789d0bd5b791a3db715c676
Merged-In: I4532f3743eb3b7121e1f5e522097c1aba3d9a4fd
Change-Id: I18db6657b78b2741c7f9af9e9d0150f85edeeda7
2024-04-03 01:00:01 +00:00
T.J. Mercier
18a5d3920a Add flags for cgroup v2 and memcg v2 features
These flags allow devices to opt in to memory control group v2 features.

Bug: 327480673
Test: m
Change-Id: I243f468cb0d89b3180303543a94ff05d30981d7d
2024-03-27 21:55:15 +00:00
Vilas Bhat
d3ad962cdc 16k: core: Remove page size limitation for setting TARGET_NO_BIONIC_PAGE_SIZE_MACRO
TARGET_NO_BIONIC_PAGE_SIZE_MACRO could be enabled regardless of the
value specified by TARGET_MAX_PAGE_SIZE_SUPPORTED and hence, the check
is no longer required.

Test: lunch <target> && get_build_var TARGET_NO_BIONIC_PAGE_SIZE_MACRO
Bug: 310232825

Change-Id: I4da314b803c4d84ac4ac1da691b9c195c2f2fb1d
2024-03-26 15:49:39 +00:00
Android Culprit Assistant
c7220c4877 Revert "Convert BuildIgnoreApexContritbutions variable to a boolean"
This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/53721efb-c49e-4ce8-b96c-fd03598b4202).

Change-Id: Ifb82b8ec92b3ba8ad5da63ba497e4daad8093e4b
2024-03-22 06:15:54 +00:00
Spandan Das
b20d060c3c Convert BuildIgnoreApexContritbutions variable to a boolean
The ignore list is burdensome to maintain once we start adding the
module sdk contents to apex_contributions. Convert the variable to a
boolean. When set to true, all contents in `apex_contributions` will be
ignored

Bug: 308187268
Test: m nothing on aosp,google and google_fullmte devices
Ignore-AOSP-first: CL topic does a cleanup of an internal only denylist

Change-Id: If899f6eaf5449c2aa789d0bd5b791a3db715c676
Merged-In: If899f6eaf5449c2aa789d0bd5b791a3db715c676
(cherry picked from commit 025492c4ea092b7f25a4d442e67143954b5ffaa5)
2024-03-21 18:04:25 +00:00
Justin Yun
000e31c9ed Define PRODUCT_SHIPPING_VENDOR_API_LEVEL
Devices may set its first vendor api level to
PRODUCT_SHIPPING_VENDOR_API_LEVEL. This will manually set to
ro.vendor.api_level and will be used by tests.

If this value is not defined, init process will automatically
calculate the ro.vendor.api_level property for tests.

Bug: 326164316
Test: Check vendor/build.prop
Change-Id: I89f844ffaad9e3e39deab1c680bd1f7f17f4d8ad
2024-02-28 21:01:40 +09:00
Jihoon Kang
49f08d9328 Introduce the product variable PRODUCT_EXPORT_RUNTIME_APIS
PRODUCT_EXPORT_RUNTIME_APIS is a product variable that inherits the
behavior of the build flag RELEASE_EXPORT_RUNTIME_APIS, which is being
removed. This will be utilized in the product `sdk_with_runtime_apis`,
which will be introduced in a future change.

Test: m nothing --no-skip-soong-tests
Bug: 326312949
Change-Id: I4966b7bfc7423db049acfcede67233352ba8341b
2024-02-22 20:08:53 +00:00
Jihoon Kang
c974a2786f Introduce product variable PRODUCT_HIDDEN_API_EXPORTABLE_STUBS
The new product variable behaves identical to the build flag
RELEASE_HIDDEN_API_EXPORTABLE_STUBS: if the variable is set to true, the
hiddenapi flags are generated from the "exportable" stubs (i.e. the
stubs that does not include READ_WRITE permission or DISABLE state
flagged apis) instead of the "everything" stubs (i.e. the stubs that
includes all flagged apis regardless of the state of the flags). If the
variable is set to false, the stubs are generated from the "everything"
stubs.

This product variable will be utilized for `sdk_with_runtime_apis`
product in the future changes.

Test: m nothing
Bug: 326310637
Change-Id: Iab3b46ac39972b8721d3aa07cec622c57dafbd0e
2024-02-22 20:08:18 +00:00
Spandan Das
7416360cb3 Revert "Revert "Create a product variable for skipping apex cont..."
Revert submission 2966055-revert-2964509-skip-apex-contributions-EOKWOFHENC

Reason for revert: The root cause CL has been reverted https://googleplex-android-review.git.corp.google.com/c/platform/vendor/google/build/+/26268799

Reverted changes: /q/submissionid:2966055-revert-2964509-skip-apex-contributions-EOKWOFHENC

Change-Id: I9a40b652d38f1a4a4693e0cdb66cbe48632bafff
2024-02-17 03:31:51 +00:00
Jihoon Kang
8804a8e2bd Revert "Create a product variable for skipping apex contribution..."
Revert submission 2964509-skip-apex-contributions

Reason for revert: 325666427

Reverted changes: /q/submissionid:2964509-skip-apex-contributions

Change-Id: I0172bdf99adce7b0eef42161c79cc7c1fdf977eb
2024-02-16 23:25:08 +00:00
Spandan Das
debf166cad Create a product variable for skipping apex contribution contents
This denylist will be used to ignore the prebuilt google apexes listed
in apex_contributions of vendor/google/build when building aosp products
in next.

Test: in main, lunch aosp_cf_x86_64_phone-next-userdebug && m nothing
(with ag/25842580)
Bug: 308187268

Change-Id: I5330b44caf15193a00f1e255cef24b67c794382b
Merged-In: I5330b44caf15193a00f1e255cef24b67c794382b
2024-02-15 01:38:50 +00:00
Jihoon Kang
5a438e61ba Remove RELEASE_EXPOSE_FLAGGED_API and PRODUCT_NEXT_RELEASE_HIDE_FLAGGED_API export
As seen in the CLs in the same topic, these two variables are no longer
in used and do not need to be exported to Soong.

Test: m nothing --no-skip-soong-tests
Bug: 320515715
Change-Id: I268dc3f051d3ff15d95515755dd0c9f9c15dfc82
2024-01-16 20:09:50 +00:00
Vilas Bhat
01e2b98ca8 16k: core: Update PRODUCT_PAGE_SIZE_AGNOSTIC to PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO
This is to help clarify that this flag doesn't mean the device
will actually work end-to-end with any page size. Renaming
several dependent variables will be done in subsequent patches.

Bug: 312541564
Test:
```
 $ source build/envsetup.sh
 $ lunch aosp_cf_arm64_phone_pgagnostic-trunk-userdebug
 $ get_build_var TARGET_NO_BIONIC_PAGE_SIZE_MACRO
 true
```
Change-Id: I9bae8b00139f601a3324da902aeb4ae82113ccdd
2023-12-05 21:59:31 +00:00
Treehugger Robot
1a9dd1c7de Merge "Increase scudo MTE buffer for fullmte devices" into main 2023-12-01 02:52:38 +00:00
Jiakai Zhang
364e9c39de Remove PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK.
This was added by r.android.com/513843 to force dexpreopt some GMS core
modules even if dexpreopt is disabled, to avoid some memory usage
regression. We no longer need it because dexpreopt is never disabled on
production builds.

Bug: 313505540
Test: m
Change-Id: Iff7f1d340a3ecd64cdc3d2f83f9c37c109a81fda
2023-11-28 13:46:13 +00:00
Inseob Kim
aa9a4a4907 Add CHECK_DEV_TYPE_VIOLATIONS
If PRODUCT_CHECK_DEV_TYPE_VIOLATIONS is set or vendor api level is
greater than V (35), sepolicy dev type test will be run which checks if
all /dev nodes have dev_type attribute.

Bug: 303367345
Test: set PRODUCT_CHECK_DEV_TYPE_VIOLATIONS, see
sepolicy_dev_type_test's build command

Change-Id: Ibf25c1dacb5132ccda5265d6d2ce9fe655ffbc87
2023-11-21 13:01:40 +00:00
Jihoon Kang
9e0998b777 Revert^2 "Disable from-text stub build for sdk products"
This change introduces `PRODUCT_BUILD_FROM_SOURCE_STUB` product
variable, which is set to true for sdk targets.

This change resubmits https://r.android.com/2834692.

Test: m TARGET_PRODUCT=sdk TARGET_RELEASE=trunk_staging sdk and inspect ninja query to verify that stubs are built from source
Bug: 311203379
Change-Id: I7d9f833ae76ceabbf2ce4df0141688e24ea164c8
2023-11-17 01:52:12 +00:00
Florian Mayer
beb5bed41f Increase scudo MTE buffer for fullmte devices
Bug: 309446692
Change-Id: Idfb7956a1f7031d908f026d120fe8e253976ff4f
2023-11-14 02:51:14 -08:00
Jiakai Zhang
bf0c0e6856 Add a Make variable to disable all dexpreopt and dexopt activities.
This change adds a Make variable "OVERRIDE_DISABLE_DEXOPT_ALL", which
disables all dexpreopt and dexopt activities.

This is for faster iteration during development and should never be
enabled for production.

Bug: 309011617
Test: See no dex2oat invocation during build.
Test: Boot and see no dex2oat invocation during boot, except for the
  in-memory boot image for JIT Zygote.
Change-Id: I0193b57fdb18e1fb717f44af81d1cf525f1609ee
2023-11-09 16:50:18 +00:00
LaMont Jones
38b195ea7e Reapply "Add support for product-specific build flags"
1. release config maps now specify where the flag definitions are found.
2. PRODUCT_RELEASE_CONFIG_MAPS specifies additional release config map
files to use.

This allows product config to specify build flags, which can then be
specified by users of that product.

Bug: b/302593603, b/309477343
Test: manual
Change-Id: Ic1f0512ec4b06ac94dd3f29eadd6a03ba8ebf6d2
2023-11-06 22:15:19 +00:00
Colin Cross
671bc15286 Revert "Reapply "Add support for product-specific build flags""
Revert submission 2815850-product-flags

Reason for revert: b/309477343

Reverted changes: /q/submissionid:2815850-product-flags

Bug: 302593603
Bug: 309477343
Change-Id: I6294609d4c60973fceba567e37a6bc3b89239e42
2023-11-06 21:39:40 +00:00
Cole Faust
7aa649a62c Add PRODUCT_VALIDATION_CHECKS
This is a new mechanism for asserting properties about your product
config. See the documentation in product_validation_checks.mk for
more information.

Test: Manually
Change-Id: I698dea899441f3773f839ea2ba1a2a6cfe59b57b
2023-11-06 10:42:01 -08:00
LaMont Jones
df398d19d4 Reapply "Add support for product-specific build flags"
1. release config maps now specify where the flag definitions are found.
2. PRODUCT_RELEASE_CONFIG_MAPS specifies additional release config map
   files to use.

This allows product config to specify build flags, which can then be
specified by users of that product.

This reverts commit 75bfc37ef4.

Bug: b/302593603
Test: manual
Change-Id: I031a00459893644d7f67b63b982db9ae9015ae4d
2023-11-02 15:56:03 +00:00
Colin Cross
75bfc37ef4 Revert "Add support for product-specific build flags"
Revert submission 2787001-product-build-flags

Reason for revert: Possible cause of b/308849337

Reverted changes: /q/submissionid:2787001-product-build-flags

Bug: 302593603
Bug: 308849337
Change-Id: I01b5905a0a20a1401dcc1267e7fafc893e57d637
2023-11-02 00:13:30 +00:00
LaMont Jones
c6631fed48 Add support for product-specific build flags
1. release config maps now specify where the flag definitions are found.
2. PRODUCT_RELEASE_CONFIG_MAPS specifies additional release config map
   files to use.

This allows product config to specify build flags, which can then be
specified by users of that product.

Bug: b/302593603
Test: manual
Change-Id: I660a3d88c2aaecc14d6f370bebb0d05a8cc224f2
2023-10-30 23:40:04 +00:00
Jihoon Kang
e06e4c5037 Add PRODUCT_NEXT_RELEASE_HID_FLAGGED_API for sdk targets
PRODUCT_NEXT_RELEASE_HIDE_FLAGGED_API added to the sdk targets will be used to determine whether to exclude flagged apis for next release or not.

Test: m TARGET_PRODUCT=sdk nothing
Bug: 299570421
Change-Id: I00cb84341a05e296a0c747d4921ed5fe445eabe6
2023-09-20 19:53:04 +00:00
Treehugger Robot
ed234171f8 Merge "make: HWASan exclude path support" into main 2023-09-06 01:14:12 +00:00
Devin Moore
01e56d0ae0 Merge changes from topic "no_hidl_support" into main
* changes:
  Add symlink to hwservicemanager
  Remove hwservicemanager and hidl allocator.
2023-08-31 15:51:14 +00:00
Inseob Kim
3c7b91bac1 Use board api level for seapp coredomain check
Rather than PRODUCT_SHIPPING_API_LEVEL, use board api level
(BOARD_API_LEVEL or BOARD_SHIPPING_API_LEVEL) to determine whether we
check coredomain violations or not.

Also provides a Makefile variable to override the flag, for targets that
want to turn on the check optionally.

Bug: 280547417
Test: see build command of vendor_seapp_contexts
Change-Id: I177630d33313334ca4a56a9be88b78cff678281e
2023-08-28 07:33:12 +00:00
Tomislav Novak
d8febc98b3 make: HWASan exclude path support
Like aosp/2495518, but adds the ability to centrally disable HWASan
for multiple modules when building with SANITIZE_TARGET=hwaddress.

HWASan takes precedence over CFI and several other sanitizers that it's
incompatible with[1], which can be problematic for modules that require
those sanitizers (e.g. those that depend on vendor prebuilts where only
sanitized variants are provided). This patch adds an easy way to disable
HWASan for such modules while still keeping it globally enabled.

Test: build with HWASAN_EXCLUDE_PATHS set and verify with readelf that
      relevant modules have no references to __hwasan symbols

[1] bb31ca1168/core/config_sanitizers.mk (236)

Change-Id: I64185b570bc64e61680c3212934a02d80a4904b9
2023-08-22 18:15:04 +00:00
Juan Yescas
1083f36818 16k: core: Add flag to make AOSP page size agnostic
The new boolean flag will be PRODUCT_PAGE_SIZE_AGNOSTIC.

When PRODUCT_PAGE_SIZE_AGNOSTIC is true:

- AOSP will use getpagesize() to retrieve the page size.
- The flag `TARGET_MAX_PAGE_SIZE_SUPPORTED` has to be equals to `65536`.
- AOSP will be able to use 4k/16k page size Linux kernels

When PRODUCT_PAGE_SIZE_AGNOSTIC is false:

- AOSP will only support 4k page size kernels.

Test: source build/envsetup.sh
      lunch aosp_raven_64-userdebug
      get_build_var TARGET_PAGE_SIZE_AGNOSTIC
      get_build_var PRODUCT_MAX_PAGE_SIZE_SUPPORTED
      65536

      source build/envsetup.sh
      lunch aosp_raven_64-userdebug
      build/make/core/config.mk:414: error: TARGET_MAX_PAGE_SIZE_SUPPORTED has to be 65536 to support page size agnostic.
      10:32:55 dumpvars failed with: exit status 1

Bug: 289419664
Change-Id: If8fc243a3e2cad77414a53a29805c7b6d349d4dd
2023-07-24 13:48:52 -07:00
Jiakai Zhang
7bdb2b3c32 Add a Make variable to determine ART boot image jars for testing.
Bug: 290583827
Test: m nothing
Change-Id: Ibd0dd99593e4efb357e674c6a89804ea9cd47a84
2023-07-13 14:24:18 +01:00
Jiakai Zhang
17c6af46df Add a Make variable that overrides configured jar locations.
Bug: 290583827
Test: m nothing
Change-Id: I9a23d6a033d50d2a8c5d9e8dd79d00033efa1f53
2023-07-13 14:24:16 +01:00
Devin Moore
64c2559577 Remove hwservicemanager and hidl allocator.
...from devices launching after Android V.

Devices can add them back in explicitly now that they are also moved to
system_ext.

Test: m
Bug: 218588089
Change-Id: Ib3c917896c7a9b2c5940922c9faddb44cc7a0766
2023-06-28 20:53:10 +00:00
Jooyung Han
8cc42f429f Remove PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES
We will deprecate flattened apexes. In this change, GSI-specific make
variable (PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES) is removed. The
variable was used to install both image/flattened apexes in the GSI, so
that it works on ro.apex.updatable devices and not-updatable devices.

Now, GSI will have only image APEXes in it.

Bug: 278826656
Test: lunch gsi_arm64-userdebug && m # no flattened apexes
Change-Id: I4702973d4ee75aa693e4e7f4e57577b77059dc09
2023-06-20 14:27:10 +09:00
Evgenii Stepanov
80b53b8c77 Move MTE mode settings to a product variable.
Allow product configuration of memtag target list by
moving the current set into a product variable instead of the various
.bp files.

The default list of memtag targets can be found in
  build/make/target/product/memtag-common.mk

This is NFC as all targets in the list already have "memtag_heap: true"
in the build files.

Bug: 280343521
Test: no functional change
Change-Id: I5954fde05256e00a8e01c114ad522f50ed0cfa9f
2023-06-13 13:11:52 -07:00
Nikita Ioffe
cae3ef96c6 Add PRODUCT_AVF_KERNEL_MODULES_ENABLED
This flag controls whether com.android.virt APEX should include an
additional kernel image that supports modules loading.

Bug: 283822676
Bug: 278008256
Test: m
Change-Id: I296c57308e130ee6d5d185dcb4b690d11d2b04ac
2023-06-07 16:33:55 +01:00
Daniel Zheng
d00675c764 Merge "Adding Build time flag to specify Cow Version" 2023-05-05 22:19:02 +00:00
Daniel Zheng
025099c4bc Adding Build time flag to specify Cow Version
Adding in build time flag for specifying cow version, in preparation to
add new cow version in libsnapshot

Test: m -> cat misc-info.txt
Bug: 279954153
Change-Id: I148d4e7cdd669496c91213889787172ffd83a5ab
2023-05-05 11:03:27 -07:00
Treehugger Robot
6d406f854e Merge "Enable HWASan for multiple modules in one place(Make)" 2023-04-29 00:10:16 +00:00