Commit graph

84234 commits

Author SHA1 Message Date
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
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
Treehugger Robot
876912a2a1 Merge "Support test runnner option in auto generated test configs" 2023-06-02 11:20:23 +00: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
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
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
Spandan Das
90673eb224 Merge "Create default PRODUCT_INCLUDE_TAGS in product_config" 2023-05-25 16:46:42 +00:00
Mårten Kongstad
f73b963283 aconfig: first iteration of Rust codegen
Add a new `create-rust-lib` command to generate Rust code. The output is
a src/lib.rs file; the build system is assumed to set the generated
crate's name.

For READ_ONLY flags, the generated code returns a hard-coded true or false.

For READ_WRITE flags, the generated code reaches out to DeviceConfig via
the cc_library server_configurable_flags via the
libprofcollect_libflags_rust Rust bindings. The build system is assumed
to add this to the generated crate's dependencies.

Note: libprofcollect_libflags_rust seems generic enough that it should
be moved to an official Rust wrapper for server_configurable_flags. This
is tracked in b/284096062.

Summary of module the built system is assumed to wrap the auto-generated
code in:

  rust_library {
      name: "lib<namespace>_rs",
      crate_name: "<namespace>_rs",
      edition: "2021",
      clippy_lints: "none",
      no_stdlibs: true,
      lints: "none",
      srcs: ["src/lib.rs"],
      rustlibs: [
          "libprofcollect_libflags_rust",
      ],
  }

Also add a set of test input to be used in the unit tests for a more
coherent test strategy. A follow-up CL will migrate the code in
commands.rs, codegen_java.rs and codegen_cpp.rs.

Bug: 279483360
Bug: 283907905
Test: atest aconfig.test
Test: manual: create cache from files in testdata, create rust lib, add to module template above, verify the module builds
Change-Id: I02606aa3686eda921116e33f7e2df8fd1156a7aa
2023-05-25 16:18:59 +02:00
Treehugger Robot
6f74957c19 Merge "Add a copy of AB OTA partition list prop in vendor partition" 2023-05-25 11:14:40 +00:00
Treehugger Robot
b3adc24301 Merge "Fix merge_target_files in GRF case" 2023-05-25 10:46:32 +00:00
Nikolas Havrikov
15ba4a9bc6 Do not include SoundPicker on Android TV
This CL leverages the PRODUCT_IS_ATV build time variable to selectively
exclude the SoundPicker package from the PRODUCT_PACKAGES. This also
paves the way to approach the removal of other unused packages from TV.

Bug: 276897441
Test: make
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:413b614d0d7bc1b412c87672f995fabfadbb6bc8)
Merged-In: Ifb25c1f26df545d31fb80f8e43c217fa8806e021
Change-Id: Ifb25c1f26df545d31fb80f8e43c217fa8806e021
2023-05-25 09:00:18 +00:00
Treehugger Robot
95ad4d4ba0 Merge "Support dynamic 64-bit drmserver" 2023-05-25 02:22:45 +00:00
Kelvin Zhang
ef158a9a51 Add a copy of AB OTA partition list prop in vendor partition
The sysprop to enable/disable AB OTA update is in vendor partition,
but the sysprop which stores list of AB partitions is in product(which
is on system side of treble boundary). This is inconsistent and might
cause problems during mixed build. To mitigate, add a copy of AB
partition list prop in vendor, and readers of this prop will prefer the
vendor copy instead.

Bug: 283042235
Test: th
Change-Id: Idd73971817f663b08824e285d840ed8d8dd60d2c
2023-05-24 18:26:27 -07:00
Mårten Kongstad
993111f91c aconfig: improve dump --format=debug output
Use Rust's {:#?} formatter for more readable output.

Bug: 279485059
Test: atest aconfig.test
Change-Id: I127f413e3d7aebfba96cad1dd58d9e261dd613a4
2023-05-24 14:56:45 +02:00
Vinh Tran
2c5fb95f32 Merge "Support sandboxing genrule" 2023-05-23 21:29:27 +00:00
Treehugger Robot
b4406d06f0 Merge "Unsparse images before generating OTA" 2023-05-23 20:51:10 +00:00
Spandan Das
2e69ea6228 Create default PRODUCT_INCLUDE_TAGS in product_config
In the current setup in partner branch, we
1. Add blueprint_package_includes to prebuilts/module_sdk/*
2. Add the correct PRODUCT_INCLUDE_TAGS to partner_modules

This means in those setups,none of the prebuilts are visible to aosp products since
they they do not inherit partner_module makefiles.
```
e.g.
prebuilts/module_sdk/art/current/Android.bp
prebuilts/module_sdk/art/<go_specific>/current/Android.bp

// aosp_arm cannot find either

```

To solve this, this CL creates a default inclusion tag for all products
that do not set any PRODUCT_INCLUDE_TAGS explicitly.
In the previous example, Soong analysis of aosp_* will use
prebuilts/module_sdk/art/current/Android.bp. This should be a no-op for
aosp and internal branches since none of the Android.bp files today contains
blueprint_package_includes

Test: m nothing for aosp_arm in the test branch of b/278604467#comment20
Test: m nothing for partner product that uses big android sdk
Test: m nothing for partner product that uses go sdk

Bug: 278604467
Change-Id: I322b52c34ed339989207609dd0fd23c27ed1f697
2023-05-23 20:01:39 +00:00
Treehugger Robot
2014bbb8e7 Merge "Add BUILD_BROKEN_PLUGIN_VALIDATION flag" 2023-05-23 17:08:46 +00:00
Treehugger Robot
910393d5a3 Merge "Update vndk with update-vndk-list.sh" 2023-05-23 16:33:31 +00:00
Treehugger Robot
27efd6e1eb Merge "Fix build error about jar manifest" 2023-05-23 12:44:10 +00:00
Treehugger Robot
2231df8a54 Merge changes from topic "b/278060169"
* changes:
  Replace touch -a with comment
  BUILD_NUMBER and BUILD_HOSTNAME doesn't affect kati regeneration
2023-05-23 08:56:48 +00:00
Jeongik Cha
7e00234b84 Fix build error about jar manifest
It still depended on old intermediate files (out/host/common/obj/JAVA_LIBRARIES/<modulename>_intermediates//manifest.mf)
But the intermediate manifest.mf isn't created after aosp/2563995,
it causes merge_zip error due to missing file.
So make it use the manifest file from source directly.

Test: m out/host/common/obj/JAVA_LIBRARIES/ahat-tests_intermediates/classes-combined.jar
Bug: 278060169
Bug: 283821744
Bug: 283903672
Change-Id: Iebff6bf90b93dab693aef2492383cd3b03f239fb
2023-05-23 05:59:09 +00:00
Treehugger Robot
8485145bd7 Merge "Add 16K artifacts to PREBUILT_IMAGES/ dir of target_files" 2023-05-23 02:36:17 +00:00
Devin Moore
2ea277dbce Update vndk with update-vndk-list.sh
libdiskconfig has been removed.

Test: m
Bug: 280829178
Change-Id: I58948c92012501f2666c8c2b6a99343a141ad1d0
2023-05-23 00:34:09 +00:00
Jeongik Cha
54403316c0 Replace touch -a with comment
Bug: 278060169
Test: m
Change-Id: Ie5ad1b5c6cf335cc3de641fd76a76bfa5f3f79cb
2023-05-23 07:14:51 +09:00
Jeongik Cha
05210f96b3 BUILD_NUMBER and BUILD_HOSTNAME doesn't affect kati regeneration
* Extract BUILD_NUMBER, BUILD_HOSTNAME to file to avoid kati change
* Handle FILE_NAME_TAG_PLACEHOLDER string in dist in build/make/packaging/distdir.mk

Test: check if kati isn't invoked even though BUILD_NUMBER, BUILD_HOSTNAME
  is changed
Test: m && m, and check if the second m is no-op
Bug: 278060169
Change-Id: I1b37760242853c1a145bad255d0bb15524234b25
Merged-In: I1b37760242853c1a145bad255d0bb15524234b25
2023-05-23 07:14:22 +09:00