Commit graph

8430 commits

Author SHA1 Message Date
Treehugger Robot
93aea9b493 Merge "Adding option to disable fastboot_info" am: ecf635f507 am: 8f26a9ca1d am: b083f09783 am: b2989fc109 am: 2f4491756e am: 555a224b98
Original change: https://android-review.googlesource.com/c/platform/build/+/2612133

Change-Id: Ib53c1f41e977fea4ddf648af5ee54fd68e7263f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-03 06:27:32 +00:00
Treehugger Robot
b2989fc109 Merge "Adding option to disable fastboot_info" am: ecf635f507 am: 8f26a9ca1d am: b083f09783
Original change: https://android-review.googlesource.com/c/platform/build/+/2612133

Change-Id: Ic02ad4911e965eb9d07e0882c804f56d945ad6e9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-03 04:13:22 +00:00
Treehugger Robot
8f26a9ca1d Merge "Adding option to disable fastboot_info" am: ecf635f507
Original change: https://android-review.googlesource.com/c/platform/build/+/2612133

Change-Id: I45872eab4df9b1044ff6a6fb1c582f5cd316a365
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-03 02:42:53 +00:00
Treehugger Robot
ecf635f507 Merge "Adding option to disable fastboot_info" 2023-06-03 01:56:41 +00:00
Dennis Shen
afdab2e9d5 Merge "aconfig: update rust code gen to use libflags_rust" am: 3b0ca61d36 am: 8c1cce4e39 am: 1b0d706359 am: d0799b1a77 am: 3f793a4d9e am: 1feb863fb6
Original change: https://android-review.googlesource.com/c/platform/build/+/2607428

Change-Id: I03586d7dc212e39d63da9ce79106a9c8858828dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 20:49:02 +00:00
Dennis Shen
d0799b1a77 Merge "aconfig: update rust code gen to use libflags_rust" am: 3b0ca61d36 am: 8c1cce4e39 am: 1b0d706359
Original change: https://android-review.googlesource.com/c/platform/build/+/2607428

Change-Id: Id767e678c777b383a0143584c4bd9dd55e858abe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 17:41:54 +00:00
Dennis Shen
8c1cce4e39 Merge "aconfig: update rust code gen to use libflags_rust" am: 3b0ca61d36
Original change: https://android-review.googlesource.com/c/platform/build/+/2607428

Change-Id: I5f100c044c906f06714ad1b4acbcbea83048a770
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 15:48:31 +00:00
Dennis Shen
3b0ca61d36 Merge "aconfig: update rust code gen to use libflags_rust" 2023-06-02 15:13:40 +00:00
Treehugger Robot
e2f363bd0f Merge "Open ab_partitions.txt with just read access" am: f9a6f5f06b am: b5535214ad am: 4cd34e5ce6 am: eb6c9b7921 am: e41419cc79 am: d48d007456
Original change: https://android-review.googlesource.com/c/platform/build/+/2611511

Change-Id: I3a96e70b490594e3875d2d68d50af6d2f2ee10e9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 02:35:32 +00:00
Treehugger Robot
eb6c9b7921 Merge "Open ab_partitions.txt with just read access" am: f9a6f5f06b am: b5535214ad am: 4cd34e5ce6
Original change: https://android-review.googlesource.com/c/platform/build/+/2611511

Change-Id: I263ecf630f7e62caaa6a70e4642f02122dfb64d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 00:13:28 +00:00
Treehugger Robot
b5535214ad Merge "Open ab_partitions.txt with just read access" am: f9a6f5f06b
Original change: https://android-review.googlesource.com/c/platform/build/+/2611511

Change-Id: I075bf60c1586dd0af5d39cc23db97e9ae5c5532d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-01 22:42:53 +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
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
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
65bcaca532 Merge "aconfig: restrict valid namespace and flag names" am: cfc5f5e9fd am: 2d8615198c am: 6129693adb am: 1fe7af4274 am: 1fd419dc63 am: 95a2283138
Original change: https://android-review.googlesource.com/c/platform/build/+/2607087

Change-Id: I9819fd8630941b171ba9d518cbda5a9ce0edf1c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-31 00:26:24 +00:00
Treehugger Robot
1fe7af4274 Merge "aconfig: restrict valid namespace and flag names" am: cfc5f5e9fd am: 2d8615198c am: 6129693adb
Original change: https://android-review.googlesource.com/c/platform/build/+/2607087

Change-Id: Ic26969bbb8b273ceeabd4004e2b3ac07815fac03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 22:11:32 +00:00
Treehugger Robot
2d8615198c Merge "aconfig: restrict valid namespace and flag names" am: cfc5f5e9fd
Original change: https://android-review.googlesource.com/c/platform/build/+/2607087

Change-Id: Ifb0c77ff4e3c51f8bd0dce787abb022946518c79
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-30 20:42:52 +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
0e73f792d4 Merge changes from topic "aconfig-create-rust-lib" am: aa977fb083 am: 5c2756c13a am: e6c068798d am: e144b18ab9 am: 346da8c084 am: 654d98caa5
Original change: https://android-review.googlesource.com/c/platform/build/+/2602726

Change-Id: I01f16d5d6510511794b52f50520fece480fc5b90
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-26 11:24:15 +00:00
Mårten Kongstad
e144b18ab9 Merge changes from topic "aconfig-create-rust-lib" am: aa977fb083 am: 5c2756c13a am: e6c068798d
Original change: https://android-review.googlesource.com/c/platform/build/+/2602726

Change-Id: I84c5ac6dc692612f1caa9c45fc99be8319287c3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-26 09:01:35 +00:00
Mårten Kongstad
5c2756c13a Merge changes from topic "aconfig-create-rust-lib" am: aa977fb083
Original change: https://android-review.googlesource.com/c/platform/build/+/2602726

Change-Id: I2e708156312d2274c430a698b983b5cfe73c20ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-26 07:08:20 +00: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
Treehugger Robot
0af0154582 Merge "Fix merge_target_files in GRF case" am: b3adc24301 am: 592ad2cb13 am: 7c629dbb53 am: 26fda7e335 am: 90da3111c5 am: e4f3acc99e
Original change: https://android-review.googlesource.com/c/platform/build/+/2564310

Change-Id: I4e43853eb4034552499147e9fc1de82268bd07f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 14:54:05 +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
26fda7e335 Merge "Fix merge_target_files in GRF case" am: b3adc24301 am: 592ad2cb13 am: 7c629dbb53
Original change: https://android-review.googlesource.com/c/platform/build/+/2564310

Change-Id: I5a0f0236e07f50b7d8cfa05b476734ed3f98300a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 13:06:05 +00:00
Treehugger Robot
592ad2cb13 Merge "Fix merge_target_files in GRF case" am: b3adc24301
Original change: https://android-review.googlesource.com/c/platform/build/+/2564310

Change-Id: I564bb6d43bfa5b9cb79463f0ba50038d03ef6abb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 11:37:45 +00:00
Treehugger Robot
b3adc24301 Merge "Fix merge_target_files in GRF case" 2023-05-25 10:46:32 +00: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
Treehugger Robot
04c5cc0856 Merge "Unsparse images before generating OTA" am: b4406d06f0 am: 74ad39125c am: 8b55fd52a0 am: 4f4da804bf am: 435fb1636a am: b97da3222e
Original change: https://android-review.googlesource.com/c/platform/build/+/2598008

Change-Id: I11838f90414170828264e29860539cef2d04c67a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-24 01:26:48 +00:00
Treehugger Robot
4f4da804bf Merge "Unsparse images before generating OTA" am: b4406d06f0 am: 74ad39125c am: 8b55fd52a0
Original change: https://android-review.googlesource.com/c/platform/build/+/2598008

Change-Id: Ib062901d1b91380b98da95f38666c66f1205f587
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 23:11:17 +00:00
Treehugger Robot
74ad39125c Merge "Unsparse images before generating OTA" am: b4406d06f0
Original change: https://android-review.googlesource.com/c/platform/build/+/2598008

Change-Id: I40ac20dd7b30d11e1eda77688718566af4c1c416
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 21:22:54 +00:00
Treehugger Robot
b4406d06f0 Merge "Unsparse images before generating OTA" 2023-05-23 20:51:10 +00:00
Treehugger Robot
3a3c393262 Merge "Add 16K artifacts to PREBUILT_IMAGES/ dir of target_files" am: 8485145bd7 am: f6d61bd3c1 am: af0cfd9e98 am: 2f727af4b9 am: 100aca5a37 am: ff805d2319
Original change: https://android-review.googlesource.com/c/platform/build/+/2595883

Change-Id: I4c79fbb330cc89c59dad4b5fac3426ba7cf6dcc3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 06:38:26 +00:00
Treehugger Robot
2f727af4b9 Merge "Add 16K artifacts to PREBUILT_IMAGES/ dir of target_files" am: 8485145bd7 am: f6d61bd3c1 am: af0cfd9e98
Original change: https://android-review.googlesource.com/c/platform/build/+/2595883

Change-Id: I4f6bac39abfd1ec19d21b763201770c92a2e0c3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 04:55:01 +00:00
Treehugger Robot
f6d61bd3c1 Merge "Add 16K artifacts to PREBUILT_IMAGES/ dir of target_files" am: 8485145bd7
Original change: https://android-review.googlesource.com/c/platform/build/+/2595883

Change-Id: I36815cfa877645e242d40a3b4b4cadd0e50a6ef5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 03:30:56 +00:00
Yihan Dong
1e058d5130 Merge "Remove GTS-Verifier license check" into udc-dev am: a75b82f9d2 am: e423ee9598
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/23343092

Change-Id: Id32793fd51c9d7eefb93d3157c5473cd82d3d9e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 03:06:53 +00:00
Treehugger Robot
8485145bd7 Merge "Add 16K artifacts to PREBUILT_IMAGES/ dir of target_files" 2023-05-23 02:36:17 +00:00
Yihan Dong
355b6b4a52 Merge "Remove GTS-Verifier license check" into udc-dev am: a75b82f9d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/23343092

Change-Id: I41e817b323c93d103486825200936b41fdfac8d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 02:23:02 +00:00
Yihan Dong
a75b82f9d2 Merge "Remove GTS-Verifier license check" into udc-dev 2023-05-23 02:00:54 +00:00
Kelvin Zhang
2268091521 Unsparse images before generating OTA
Test: th
Bug: 283172692
Change-Id: Ie6d3dc704fd9a8c107e2888222e4c2bf804dad3e
2023-05-22 10:22:59 -07:00
Treehugger Robot
d0629de68c Merge changes from topic "aconfig-stable-flag-order" am: f469fd6cc6 am: 1ad09e0bfa am: 90ea531bb2 am: f44cf94667 am: ffa3d13926 am: 52c041e8d7
Original change: https://android-review.googlesource.com/c/platform/build/+/2595206

Change-Id: Ib7592054fd0c021edd4427c8cb3f75300a2d8f3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-22 14:50:37 +00:00
Treehugger Robot
1ad09e0bfa Merge changes from topic "aconfig-stable-flag-order" am: f469fd6cc6
Original change: https://android-review.googlesource.com/c/platform/build/+/2595206

Change-Id: Ic66ea4047487b6f8c4c51237bf583d035b7032d1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-22 12:30:11 +00:00
Mårten Kongstad
2f95444281 aconfig: sort items in cache by name
Introduce a builder pattern for constructing a cache from flag
declarations and flag values. Teach the builder to sort the flags by
name as the last step. This will ensure consistent dump output
regardless of the order flags are specified in the input files.

Bug: 279485059
Test: atest aconfig.test
Change-Id: Icdd62f51fa3761a469663f17581a83d9909e9ffe
2023-05-22 10:01:05 +02:00
Mårten Kongstad
af677038b3 aconfig: dump: support multiple caches
Teach `aconfig dump` to read multiple caches at the same time.

A cache represents a single namespace, and the Android build creates
multiple caches for different namespaces. By passing in all those cache
files to `aconfig dump`, aconfig will create a complete overview of all
flags in the Android tree.

Caches are traversed in order of namespace to produce the same output
regardless of the order the cache files are given on the command line.
If two caches use the same namespace, their order with respect to each
other is undefined.

Bug: 279485059
Test: atest aconfig.test
Change-Id: I54c3950bbb7b2be7d96c8928e78ae83aa626c2e2
2023-05-22 09:57:48 +02:00
Kelvin Zhang
decee4adb7 Add 16K artifacts to PREBUILT_IMAGES/ dir of target_files
Test: th
Bug: 283506035
Change-Id: I9be3982b5a4324ec839937d10c33266c7d27c525
2023-05-19 14:31:00 -07:00
Yihan Dong
58c428e336 Remove GTS-Verifier license check
The whole GTS-Verifier will be removed. Before that, remove GTS-V
license check first.

Ignore-AOSP-First: This CL must be submit with other CLs in the topic to avoid breaking the test. This CL will be cherry pick to AOSP after submitting.

Bug: 283384166
Test: m gts
Change-Id: I5bc8c1f4609f55cedd5bfbed014b65de164e2b16
2023-05-19 10:38:55 +00:00
Wei Li
233d5b97f8 Some changes to support SBOM generation for b build unbundled APEXs.
1) Use output file path of installed files in build system since there is no PRODUCT_OUT in Bazel
2) Use CONTAINS to describe the relationship between a APEX and files it contains
3) Generate SBOM of APEXs, which is similar to SBOM of products

Bug: 275472038
Test: CIs
(cherry picked from https://android-review.googlesource.com/q/commit:fd7e6517d345d3b8d4af12dae345434d968b83b9)
Merged-In: I41622366e5e6ed9dc78cca7bc7bb69a1f8f9bd9f
Change-Id: I41622366e5e6ed9dc78cca7bc7bb69a1f8f9bd9f
2023-05-19 00:35:20 +00:00
Daniel Zheng
b87d46cb1a Merge "Add --max_threads to OTA generation" into udc-dev 2023-05-18 19:53:12 +00:00
Treehugger Robot
be000647b0 Merge "aconfig: Add first iteration of cpp codegen to aconfig" am: 4266df817d am: 97f144f4f7 am: 31804378ca am: d714e3d18f am: 03b72a9cc9 am: 3bc09a6d96
Original change: https://android-review.googlesource.com/c/platform/build/+/2585679

Change-Id: Ibeddc26006f50596c1addb0fa00df59a81c4ac7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 23:21:23 +00:00
Wei Li
4baf0b46aa Merge "Some changes to support SBOM generation for b build unbundled APEXs." am: eb035dc89f am: 802310c4fd am: 1f8974d7b5 am: c2dd3fd0a0 am: 3f7aabc6eb am: c3ef35318d
Original change: https://android-review.googlesource.com/c/platform/build/+/2585677

Change-Id: I4f1a8b5b140fb04875b06abca49bfcca356cc7aa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-17 23:19:50 +00:00