Commit graph

84254 commits

Author SHA1 Message Date
Nikita Ioffe
fe22cc38da Merge "Add PRODUCT_AVF_KERNEL_MODULES_ENABLED" 2023-06-07 23:36:20 +00:00
Devin Moore
9bf17fd9dd Merge "Add new script to analyze static/shared library usage" 2023-06-07 20:18:09 +00:00
Treehugger Robot
69227ff9ae Merge "Resolve test crash in build/make/tools/compliance." 2023-06-07 17:41:04 +00: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
Jingwen Chen
376b6b6378 Resolve test crash in build/make/tools/compliance.
Test: m compliance_sbom
Test: go test ./...
Fixes: 285157766
BUG: 282746032
Change-Id: I5cc39f45f7ac3d9c574e2ebaa7fdfda864cb109d
2023-06-07 13:06:13 +00:00
Treehugger Robot
2bb714ed2b Merge changes from topic "aconfig-gen-device-config-files"
* changes:
  aconfig: add create-device-config-sysprops command
  aconfig: add create-device-config-defaults command
  aconfig: add test utilities
  aconfig: cache.rs: remove unnecessary use statements
  aconfig: give commands ownership of all arguments
2023-06-07 09:50:23 +00:00
Seigo Nonaka
52b65fef51 Merge "Include RobotoFlex into AOSP system image" 2023-06-07 02:14:27 +00:00
Treehugger Robot
3cda7834aa Merge "Use python based unzip function for portability" 2023-06-06 18:24:03 +00:00
Treehugger Robot
fff48d788f Merge "Always set a avb salt for hermetic build" 2023-06-06 18:23:58 +00:00
Devin Moore
b1bae84508 Merge "Add static_libs to module-info.json" 2023-06-06 15:36:57 +00:00
Steven Moreland
0b219d399c Merge "Remove PRODUCT_SEPOLICY_SPLIT." 2023-06-05 23:08:24 +00:00
Kelvin Zhang
7c9205b008 Use python based unzip function for portability
Bug: 283033491
Test: th
Change-Id: Ief86b55c1d4a14220a0fb593c583a721d59cf86c
2023-06-05 15:54:12 -07:00
Devin Moore
bd13e63e99 Add new script to analyze static/shared library usage
Parses module-info.json, gathers stats on how many times each library is
included shared or statically.

Can print a list of libraries that would be a candidate for changing
from static to shared or visa versa.

Test: m
Bug: 280829178
Change-Id: I4bbffbd673ab2e08c69d0ab6e68402be77c9ffbc
2023-06-05 20:23:36 +00:00
Devin Moore
48d7b3462d Add static_libs to module-info.json
This is helpful for analyzing how often a library is included statically
on a device. If a large library is linked statically in many processes
in a single device, it may be a good candidate for shared linking
instead.

This increases the size of module-info.json file on Cuttlefish by ~12.5%
from 65MB to 72MB.

Test: m
Bug: 280829178
Change-Id: I3614d86d799810e1ce845e1097f43f1ec0a412a3
2023-06-05 20:17:50 +00:00
Kelvin Zhang
c819b29f46 Always set a avb salt for hermetic build
When building images via `m` , build_image.py is invoked directly
without going through add_img_to_target_files. To ensure images built in
either way are identical, move uuid/salt computation to build_image.py,
so that the same uuid/salt will be used.

Bug: 281960439
Test: m installclean && m && m target-files-dir , maks sure images in
$OUT and $OUT/obj/PACKING/target_files_intermediates are identical

Change-Id: Icdab29df84f5a0ec7c080f99f9fdbdc3c9b10b90
2023-06-05 09:59:54 -07:00
Jiakai Zhang
ccf0471af3 Merge "Add an allowlist for modules that have broken optional_uses_libs." 2023-06-05 14:05:49 +00:00
Jooyung Han
e5cf1f98b8 Merge "Deprecation message for TARGET_FLATTEN_APEX" 2023-06-05 01:57:13 +00:00
Treehugger Robot
ecf635f507 Merge "Adding option to disable fastboot_info" 2023-06-03 01:56:41 +00:00
Jiakai Zhang
9fd786cd55 Add an allowlist for modules that have broken optional_uses_libs.
Bug: 282877248
Test: m nothing
Change-Id: I6f0e76a6f147de1e6043b5abc4630342d46bafcc
2023-06-02 23:41:59 +01:00
Rob Seymour
7edc734ec1 Merge "Do not set DISABLE_PREOPT_BOOT_IMAGES when doing a VSDK build." 2023-06-02 19:27:09 +00:00
Dennis Shen
3b0ca61d36 Merge "aconfig: update rust code gen to use libflags_rust" 2023-06-02 15:13:40 +00:00
Jiakai Zhang
66a9cd195c Merge "Drop INTERNAL_PLATFORM_MISSING_USES_LIBRARIES." 2023-06-02 14:59:09 +00:00
Mårten Kongstad
c31a6ff653 aconfig: add create-device-config-sysprops command
Add a new "create-device-config-sysprops" command that works like
"create-device-config-defaults" but for system properties.

DeviceConfig is a Java service, and will mirror (some of) its values by
setting system properties in the persist.device_config namespace. Native
code will access DeviceConfig (actually, the system properties) via the
server_configurable_flags library.

The new command writes a file that can be appended to /system/build.prop
to pre-populate persist.device_config before DeviceConfig has started.

Like create-device-config-defaults, the new command skips READ_ONLY
flags.

Bug: 285468565
Test: atest aconfig.test
Change-Id: I311c7c5e0b03dc897b09204137d43cc182324717
2023-06-02 16:47:04 +02:00
Mårten Kongstad
f02734e915 aconfig: add create-device-config-defaults command
DeviceConfig is the backend for READ_WRITE flags.

Add a new command "create-device-config-defaults" to create a file that
DeviceConfig will read to pre-populate its data store on first init.

This will be used to quickly switch flag values during CI tests:
rebuilding and reflashing a device would have the same effect, but would
be costlier. This feature is not expected to be used outside CI tests.

Note: because DeviceConfig only works with READ_WRITE flags, the
generated file excludes READ_ONLY flags.

Bug: 285468565
Test: atest aconfig.test
Change-Id: I4caff1a10647b8da0ce4e3615678993a957a92dd
2023-06-02 16:46:28 +02:00
Treehugger Robot
876912a2a1 Merge "Support test runnner option in auto generated test configs" 2023-06-02 11:20:23 +00:00
Mårten Kongstad
83a8760bbc aconfig: add test utilities
Create a test utility function to create a Cache from the files in
testdata/*. A follow-up CL will update the unit tests to use this
instead of creating their own caches.

Bug: 283910447
Test: atest aconfig.test
Change-Id: Ice5064eadb0babde5eb38d292330d213ab136d96
2023-06-02 12:54:22 +02:00
Mårten Kongstad
1cd166cd31 aconfig: cache.rs: remove unnecessary use statements
Remove unnecessary use from the cache::test module: they already covered
by `use super:*;`.

Bug: 283910447
Test: atest aconfig.test
Change-Id: I9e03385629f38180c0f92080c7f097a8e0d9ef69
2023-06-02 12:52:48 +02:00
Mårten Kongstad
b27f2ce436 aconfig: give commands ownership of all arguments
Pass the Cache argument to command::create_<lang>_lib functions by value
instead of by reference, to align with other commands.

The intended ownership flow is as follows:

  - main creates objects based on command line arguments
  - main hands commands ownership of the objects
  - command processes the objects
  - command gives main ownership of any generated output
  - main writes the output to file

Rationale: commands.rs is a unit testable version of main, and to the
rest of aconfig, acts as the top level entry point; main.rs exists only
to parse command line arguments and perform I/O.

Bug: 283910447
Test: atest aconfig.test
Change-Id: I1e1dea7da8ecc2bb6e2f7ee4a6df64562c148959
2023-06-02 12:49:26 +02:00
Jooyung Han
4b8c962c7b Deprecation message for TARGET_FLATTEN_APEX
Bug: 278826656
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m nothing (shows warning)
Change-Id: I60e463348f87d8e1520245702eaa99c4c5356b61
2023-06-02 14:15:34 +09:00
Florian Mayer
5e2c1bec02 Merge "Use linker_hwasan64 for make built HWASan executables" 2023-06-02 04:30:18 +00:00
Kelvin Zhang
bf8e3d5dc8 Merge "Adding vendor_kernel_boot to fasboot-info" 2023-06-02 02:57:37 +00:00
Treehugger Robot
f9a6f5f06b Merge "Open ab_partitions.txt with just read access" 2023-06-01 21:39:35 +00:00
Daniel Zheng
ee10d07057 Adding option to disable fastboot_info
Fastboot_info can be disabled if use_fastboot_info is set to false.
Adding this flag as fastboot-info.txt is currently broken

Test: m updatepackage -> inspect contents
Bug: 284263071
Change-Id: I3e0ca13968ba9747cc39284ea6798981d22ad5e5
2023-06-01 14:21:58 -07:00
Florian Mayer
97222e192a Use linker_hwasan64 for make built HWASan executables
Test: build chre on oriole_hwasan
      verify linker with `file`
Bug: 276930343
Change-Id: I92e07b38f9198fc72f4aa3418420cc155085b324
2023-06-01 14:21:54 -07:00
Kelvin Zhang
89b87f6aa9 Open ab_partitions.txt with just read access
We don't actually need write permission, so going with least privilege
principle. We have observed some mysterious permission denied errors on server environments. Without detailed logs or access to the server it's hard to pinpoint what the root cause is. This is an attempt/hypothesis to fix the permission denied error.

Test: th
Bug: 283033491
Change-Id: I52dc360d593aab57c749109994bf3e1e3625d0ce
2023-06-01 17:28:25 +00:00
Rob Seymour
0aaa561255 Do not set DISABLE_PREOPT_BOOT_IMAGES when doing a VSDK build.
Bug: 283843071
Test: build vsdk based image
Change-Id: Id35196d266994fe222f55a0711b52938253d48a7
2023-06-01 16:48:46 +00:00
Jiakai Zhang
f09e76c173 Drop INTERNAL_PLATFORM_MISSING_USES_LIBRARIES.
INTERNAL_PLATFORM_MISSING_USES_LIBRARIES was a workaround for CLC
construction. It's no longer needed because we have deferred the CLC
construction to Ninja phase.

Bug: 282877248
Test: Presubmit build tests.
Change-Id: Ib5d59caf58394f3bb93b4338146cbbbd58bb4f34
2023-06-01 16:44:35 +01:00
Treehugger Robot
05e0a133aa Merge "Do not include SoundPicker on Android TV" 2023-05-31 23:21:43 +00:00
Steven Moreland
41792255af Remove PRODUCT_SEPOLICY_SPLIT.
Obsolete.

Bug: 257176017
Test: build&boot
Change-Id: I7ac95f8e55254b7c07ee5e5ba6c18c23a432bfa1
2023-05-31 22:01:16 +00:00
Dennis Shen
6461673140 aconfig: update rust code gen to use libflags_rust
Bug: b/284096062, b/279483360
Test: atest aconfig.test
Change-Id: I4c96f35807de5cb2a745ba1c653513d9b22a5013
2023-05-31 14:35:59 +00:00
Treehugger Robot
4f6a18d4cf Merge "Enable UFFD GC." 2023-05-31 13:33:13 +00:00
Daniel Zheng
7d85d4f7b7 Adding vendor_kernel_boot to fasboot-info
Adding new partition to fastboot-info

Test: m fastboot_info
Bug: 284263071
Change-Id: I2540cbc224ebaffe5781c7aa3570e3e56f1bdcdd
2023-05-30 14:22:19 -07:00
Treehugger Robot
cfc5f5e9fd Merge "aconfig: restrict valid namespace and flag names" 2023-05-30 19:35:48 +00:00
Jiakai Zhang
117212e422 Enable UFFD GC.
Bug: 160737021
Change-Id: Ic19c8764087607338963b0e5d351ff14f536dd20
Test: Presbumit
2023-05-30 15:22:40 +00:00
Jiakai Zhang
d5d51e21bf Merge "Move CLC construction to Ninja phase." 2023-05-30 14:58:15 +00:00
Kiyoung Kim
6a821158b1 Merge "Rename soong.variable with target product" 2023-05-30 07:17:08 +00:00
Seigo Nonaka
1260450745 Include RobotoFlex into AOSP system image
Bug: 235303866
Test: Manually done
Change-Id: I8ff5ef9441b8103d87bd4eb575e5abe87a2750c1
2023-05-29 17:49:20 +09:00
Dan Shi
1e4d747628 Support test runnner option in auto generated test configs
Bug: 284179405
Bug: 236980335
Test: unittest
Change-Id: I7f96a2a2bc52316888e87af7e4bcc4ef50863716
2023-05-26 21:35:10 +00:00
Mårten Kongstad
00cf045c85 aconfig: restrict valid namespace and flag names
The namespace and flag names will be used as identifiers in the
auto-generated code. Place restrictions on what constitutes a valid
name.

Valid identifiers are those that match /[a-z][a-z0-9_]/. aconfig
explicitly does not implement any automatic translation to make names
valid identifiers: this sidesteps potential conflicts such as "foo.bar"
and "foo_bar" mapping to the same name if dots were translated to
underscores.

Bug: b/284252015
Test: atest aconfig.test
Change-Id: I38d005a74311e5829e540063404d1565071e6e96
2023-05-26 17:09:10 +02:00
Mårten Kongstad
aa977fb083 Merge changes from topic "aconfig-create-rust-lib"
* changes:
  aconfig: first iteration of Rust codegen
  aconfig: improve dump --format=debug output
2023-05-26 06:00:47 +00:00