Commit Graph

9037 Commits

Author SHA1 Message Date
Steven Moreland
2a19321e3d Merge "finalization: remove VNDK stuff" into main 2024-01-29 21:01:47 +00:00
Treehugger Robot
41f3130e4e Merge "Fix ext4 size estimates" into main am: 1cc902690e am: e297eca95a
Original change: https://android-review.googlesource.com/c/platform/build/+/2924814

Change-Id: I68eeeda3a6987ac030caeb18781afe43cc73fb3b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-29 20:48:12 +00:00
Dennis Shen
da522efa7e Merge "aconfig: add flag table offset query function" into main am: 9a76f645a2 am: 7455bfa7a5
Original change: https://android-review.googlesource.com/c/platform/build/+/2932350

Change-Id: Ie8e233c156dc6c9009d1eb075ead162bbc88ebf3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-29 20:29:45 +00:00
Dennis Shen
ec41bfad94 Merge "aconfig: create package table query public function" into main am: 043a1eec4d am: 3e83375d08
Original change: https://android-review.googlesource.com/c/platform/build/+/2929211

Change-Id: I228c0fd087fca5a830675c8848c2ef53b331047f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-29 20:29:30 +00:00
Treehugger Robot
1cc902690e Merge "Fix ext4 size estimates" into main 2024-01-29 20:06:18 +00:00
Dennis Shen
9a76f645a2 Merge "aconfig: add flag table offset query function" into main 2024-01-29 19:47:23 +00:00
Dennis Shen
043a1eec4d Merge "aconfig: create package table query public function" into main 2024-01-29 19:47:15 +00:00
Steven Moreland
af6c94a9a6 finalization: remove VNDK stuff
Now that the VNDK is deprecated, we can remove all
references in the finalization script. This is a no-op
since it is only removing comments.

Bug: 318888218
Test: `grep -rin vndk` no output
Change-Id: Ia07dffc21d5e02e6d6d52400a2fdf6572242c160
2024-01-29 18:33:48 +00:00
Treehugger Robot
99690daccc Merge "aconfig: fix workspace resolver warning" into main am: bc7f1a2e67 am: c0e7137bf4
Original change: https://android-review.googlesource.com/c/platform/build/+/2932072

Change-Id: I733feacbe708218e8363495ac61922bd83179103
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-29 16:07:08 +00:00
Dennis Shen
9fd970198d aconfig: add flag table offset query function
Bug: b/321077378
Test: atest aconfig.test; atest aconfig_storage_file.test
Change-Id: Ib0ec1ec809c65d8f9f1284e4214cfbb683812f1d
2024-01-29 15:11:55 +00:00
Dennis Shen
8aa9bbeb99 aconfig: create package table query public function
Bug: b/321077378
Test: atest aconfig.test
Change-Id: I097e8ebecff6d5d9e73738a7f80a63cb482bcfbe
2024-01-29 14:43:19 +00:00
Mårten Kongstad
edd678063c aconfig: fix workspace resolver warning
Fix the following warning:

  warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
  note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
  note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
  note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions

Further info: https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html

Bug: N/A
Test: cargo c # no warnings related to the resolver
Change-Id: I5ee546e4f2ba9e854026bf4baee380e89cf4a01b
2024-01-29 14:51:51 +01:00
Dennis Shen
341c58e46a Merge "aconfig: add aconfig_storage_metadata proto" into main am: dfb817c223 am: e184356379
Original change: https://android-review.googlesource.com/c/platform/build/+/2928251

Change-Id: Ia6dfaf3d893d6d567100bb6f6a9a146941cb30ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-26 23:08:48 +00:00
Dennis Shen
43865fcba3 Merge "aconfig: create unit test targets for aconfig_protos and aconfig_storage_file crate" into main am: c7a1c76e28 am: 035eade892
Original change: https://android-review.googlesource.com/c/platform/build/+/2928090

Change-Id: I298bc18bbbf277e8a68b9374357c6b4ecf252f20
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-26 19:15:43 +00:00
Dennis Shen
997745dc13 aconfig: add aconfig_storage_metadata proto
Introduce a new proto to capture storage file location for each
container. This proto file will appeara as
/metadata/aconfig/storage_file_location.pb. Storage service daemon is
responsible for writing entires to it when a new storage file set is
available. The flag read lib will use this file to find the
corresponding storage file and mmap them.

Bug: b/321077378
Test: atest aconfig_storage_file.test
Change-Id: I226e76be895805dce52a075050dcd5b42d337be8
2024-01-26 18:02:07 +00:00
Dennis Shen
c7a1c76e28 Merge "aconfig: create unit test targets for aconfig_protos and aconfig_storage_file crate" into main 2024-01-26 18:01:54 +00:00
Zhi Dou
c94175831e Merge "aconfig: add isOptimizationEnabled in FakeFeatureFlagsImpl" into main am: d09505cc62 am: 4a29d17d3e
Original change: https://android-review.googlesource.com/c/platform/build/+/2925520

Change-Id: I3fa5fc729146a270cf407942cb6d1534ba85f156
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 20:18:22 +00:00
Dennis Shen
a4294b0c6a aconfig: create unit test targets for aconfig_protos and
aconfig_storage_file crate

also added a bunch of comments to satisfy android lint requirements

Bug: b/321077378
Test: atest aconfig.test, atest aconfig_protos.test, atest aconfig_storage_files.test
Change-Id: I9bce302ac3bc98c5347e5334d915e77337ee89c4
2024-01-25 17:33:36 +00:00
Dennis Shen
4075bfbd30 Merge "aconfig: create aconfig_storage_file crate" into main am: 11529aa52f am: b15dd2d25a
Original change: https://android-review.googlesource.com/c/platform/build/+/2924734

Change-Id: I349899d7f74872ed78eba7708379c59cc80b5c09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 16:54:39 +00:00
Zhi Dou
b874ca75e4 aconfig: add isOptimizationEnabled in FakeFeatureFlagsImpl
This change adds isOptimizationEnabled method in FakeFeatureFlagsImpl.
This method can help test to decide whether the code using flag is
optimized.

Bug: 309406391
Test: atest aconfig.test aconfig.test.java
Change-Id: I7e7109ac06ab44f9b8dee56c76be9479f60a9148
2024-01-25 16:07:32 +00:00
Dennis Shen
11529aa52f Merge "aconfig: create aconfig_storage_file crate" into main 2024-01-25 15:28:34 +00:00
Yi-Yo Chiang
845ce58c61 Merge "Re-land: releasetools: Deprecate GKI build rules" into main am: accdd3f087 am: 883f4b9456
Original change: https://android-review.googlesource.com/c/platform/build/+/2926251

Change-Id: Iaae26bb0d8ec53cae451727736165d9864885138
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 06:59:10 +00:00
Yi-Yo Chiang
accdd3f087 Merge "Re-land: releasetools: Deprecate GKI build rules" into main 2024-01-25 05:29:11 +00:00
Yi-Yo Chiang
a4d5f4380b Re-land: releasetools: Deprecate GKI build rules
(Re-land of Ie882fccd864920289e48366e99a4ebd67e784d0d)

We no longer build GKIs from the platform tree.
These build commands were neither used nor maintained anymore, so clean
them up to reduce maintenance effort.
Keep the command line options as no-op, so existing scripts that still
specifies the deprecated options don't break.

Bug: 229701033
Test: presubmit
Change-Id: I0f7d05562dbc3eed29e902d6dc9a0f2e4083aaa6
2024-01-25 11:21:00 +08:00
Kelvin Zhang
158a5ebbc9 Fix ext4 size estimates
Currently, EXT4 image building is done in a 2 pass fashion:

First pass: build ext4 image with small margin/headroom, check the
number of block used in the output image

Second pass: Build ext4 image again with an estimated block count from
first pass

The two pass implementation is done to keep image size at a
minimum. Recently some failures in first pass invocation is observed due
to image being undersized. Since we will reduce the image size in 2nd
pass, it's OK to increase the image size estimate during first pass. Add
a headroom 10% of total file size to fix build failures.

Test: cherry pick r.android.com/q/topic:%22aosp_cf_system_x86_64%22 and
m aosp_cf_system_x86_64

Bug: 321003625
Change-Id: I254310c67a08b98b05d2c858d4ab59a48112a07b
2024-01-24 18:37:27 -08:00
Devin Moore
538b58683f Merge "find_static_candidates.py: protect against missing keys in module" into main am: 14d1d0b155 am: 608fbb3bcd
Original change: https://android-review.googlesource.com/c/platform/build/+/2924721

Change-Id: Ice453aef3442ef9d530f9f3c58119883a6fc72bd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 00:51:41 +00:00
Devin Moore
14d1d0b155 Merge "find_static_candidates.py: protect against missing keys in module" into main 2024-01-24 23:29:34 +00:00
Dennis Shen
cf9a752092 aconfig: create aconfig_storage_file crate
Move aconfig storage file definition into its own crate, as flag read
lib will need it as well. The new crate is placed under
aconfig_storage_file dir.

Bug: b/321077378
Test: atest aconfig.test, Cargo test at repo root level
Change-Id: I91e8ada2c9bab479ed81cf03824042f3fa460be5
2024-01-24 21:33:42 +00:00
Devin Moore
621b02ab22 find_static_candidates.py: protect against missing keys in module
Looks like modules can now be missing "shared_libs" and "static_libs".
Use default values of empty sets where applicable, or check for the
existence of the keys before looking for them.

Test: python find_static_candidates.py --module audioserver
Bug: 322190716
Change-Id: I8be9bd2c1562975db57ffbf89d57ff2767f0b1f1
2024-01-24 19:28:21 +00:00
Dennis Shen
277e5dc36e Restructure aconfig repo to be a cargo workspace with many crates
Previously, aconfig repo is the root directory of aconfig binary crate,
but it also hosts printflags crate inside, and there is no cargo support
for printflags binary crate. In addition, with more aconfig development,
more crates are being added to this repo. Thus this repo should be
configured as a Cargo workspace with multiple crates rather than a
single crate.

Note the top level Cargo.toml file specifies the crates this workspace
carries:
(1) aconfig_protos: the proto library crate that will be used by many other
crates such as aconfig binary crate and printflags binary crate
(2) aconfig: the aconfig binary crate
(3) printflags: the printflags binary crate

(1) aconfig_protos crate setup:

Inside aconfig_protos dir we set up the aconfig_protos crate, the
previously src/proto.rs is now aconfig_protos/src/lib.rs, the build.rs
is carried over to this crate.

(2) aconfig binary crate setup:

Notice its Cargo.toml file claims package dependency on aconfig_protos
crate. It no longer carries proto related module and build.rs file.

(3) printflags binary crate setup:

Similary, notice that in its Cargo.toml file, it claims package
dependency on aconfig_protos crate.

With this setup, we can Cargo build/test each crate individually when
inside a specific crate dir. But we can also run Cargo build/test at
repo root level, which will build/test all the crates in this workplace.

This is the structuring cl. The next cl is to move storage modules into
its own library crate. This storage file library crate will be used by
both aconfig binary crate as well as flag read library crate (to be
created as another new crate here).

Bug: b/321984352
Test: top and individual crate dir level Cargo build/test, m each
individual targets

Change-Id: I75833f4997f7ee554ff6c1557df9ac87f62b2732
Merged-In: I75833f4997f7ee554ff6c1557df9ac87f62b2732
2024-01-24 02:18:52 +00:00
Dennis Shen
c77c6612e7 Restructure aconfig repo to be a cargo workspace with many crates
This is cherry pick of aosp/2924191 to avoid merge conflict in git main

Previously, aconfig repo is the root directory of aconfig binary crate,
but it also hosts printflags crate inside, and there is no cargo support
for printflags binary crate. In addition, with more aconfig development,
more crates are being added to this repo. Thus this repo should be
configured as a Cargo workspace with multiple crates rather than a
single crate.

Note the top level Cargo.toml file specifies the crates this workspace
carries:
(1) aconfig_protos: the proto library crate that will be used by many other
crates such as aconfig binary crate and printflags binary crate
(2) aconfig: the aconfig binary crate
(3) printflags: the printflags binary crate

(1) aconfig_protos crate setup:

Inside aconfig_protos dir we set up the aconfig_protos crate, the
previously src/proto.rs is now aconfig_protos/src/lib.rs, the build.rs
is carried over to this crate.

(2) aconfig binary crate setup:

Notice its Cargo.toml file claims package dependency on aconfig_protos
crate. It no longer carries proto related module and build.rs file.

(3) printflags binary crate setup:

Similary, notice that in its Cargo.toml file, it claims package
dependency on aconfig_protos crate.

With this setup, we can Cargo build/test each crate individually when
inside a specific crate dir. But we can also run Cargo build/test at
repo root level, which will build/test all the crates in this workplace.

This is the structuring cl. The next cl is to move storage modules into
its own library crate. This storage file library crate will be used by
both aconfig binary crate as well as flag read library crate (to be
created as another new crate here).

Bug: b/321984352
Test: top and individual crate dir level Cargo build/test, m each
individual targets

Ignore-AOSP-First: cherrypick to git main to resolve merge conflict
Change-Id: I75833f4997f7ee554ff6c1557df9ac87f62b2732
2024-01-24 02:17:57 +00:00
Treehugger Robot
edca94fdf8 Merge "Add all apexes to apex_info" into main am: 28007ce2e1 am: 23fbbf9a3f
Original change: https://android-review.googlesource.com/c/platform/build/+/2918805

Change-Id: I5908e64101c48d023a2845fff70b402f5051880f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-22 23:25:54 +00:00
Treehugger Robot
28007ce2e1 Merge "Add all apexes to apex_info" into main 2024-01-22 22:08:14 +00:00
Dennis Shen
7297f0aff4 Merge "aconfig: create one file at each create-storage command invocation" into main am: 1ef905869f am: 56146b0ed1
Original change: https://android-review.googlesource.com/c/platform/build/+/2918566

Change-Id: Icc83ff3b2f4793854c023169c3528a35b88bc6b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-22 22:02:45 +00:00
Jooyung Han
750aad5c32 Add all apexes to apex_info
Previously, META/apex_info.pb contained only /system/apex apexes. Now,
it has all apexes from all possible partitions.

The main purpose of this file is to caculate the decompressed apex size
when applying OTA. Hence it should have all apexes, not just system
apexes.

Bug: 320228659
Test: m dist # check META/apex_info.pb
Change-Id: I3428dc502e4fe3336d1fc5ca941f1fbc332985cd
2024-01-23 05:52:51 +09:00
Dennis Shen
1ef905869f Merge "aconfig: create one file at each create-storage command invocation" into main 2024-01-22 20:49:36 +00:00
Treehugger Robot
f640f246b9 Merge "Fix signing failures on targets with >4GB target_files" into main am: 3b7d46f4ca am: 892a16105c
Original change: https://android-review.googlesource.com/c/platform/build/+/2920107

Change-Id: Id0c82921c7cc04da118e16cf4b2b6f6fc40968b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 20:41:33 +00:00
Treehugger Robot
3b7d46f4ca Merge "Fix signing failures on targets with >4GB target_files" into main 2024-01-19 20:06:07 +00:00
Treehugger Robot
8f0023ba72 Merge "Add the rebuilt modules to the benchmark formatting" into main am: 1094ec1e81 am: 89c0a7feea
Original change: https://android-review.googlesource.com/c/platform/build/+/2920105

Change-Id: Ide009bfe47f13c43a4e56c53be7822fda5db9112
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-19 19:06:55 +00:00
Kelvin Zhang
12ac11025e Fix signing failures on targets with >4GB target_files
An old python zipfile hack prevented zipfile module from decoding 64 bit
sizes correctly, remove the legacy hack to fix.

Test: check_target_files_signatures -v 5GB_target_files.zip
Bug: 319367048
Change-Id: I376c7b68f549ddf88680280d604548d1849cdfe2
2024-01-19 11:04:58 -08:00
Dennis Shen
bac87875fa aconfig: create one file at each create-storage command invocation
Based on the build system feedback, it is better to create storage file
individually per each aconfig command invocation in a makefile. Thus
updating the create-storage command to create one file at a time based
on passed in file selection.

Bug: b/321243743
Test: atest aconfig.test and manually invoke create-storage command
Change-Id: I53625c08e44d3ece4476835827c6b7d28ddd5a1b
2024-01-19 19:02:07 +00:00
Treehugger Robot
1094ec1e81 Merge "Add the rebuilt modules to the benchmark formatting" into main 2024-01-19 17:38:02 +00:00
Joe Onorato
6b40826d2e Add the rebuilt modules to the benchmark formatting
Test: format_benchmarks
Change-Id: Ib3fffc99a1c66a2f700c27821886e8de2e2ec041
2024-01-19 16:41:27 +00:00
Yu Liu
158b4df6f9 Merge "Tweak the CUJ scripts to make it work in CI." into main am: 15fb2a41b1 am: d0273e9ca8
Original change: https://android-review.googlesource.com/c/platform/build/+/2911571

Change-Id: I74ad3dfbd45f8495d459161e3408620ce18b6312
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-18 05:48:06 +00:00
Yu Liu
cda84245af Tweak the CUJ scripts to make it work in CI.
Bug: 318706915
Test: manual test
Change-Id: I0982d1d724ec05aee7a0d6bdaa05497745421674
2024-01-18 00:35:13 +00:00
Devin Moore
65a2aa24dd Merge changes from topic "fina-vintf-fix" into main
* changes:
  Capture queryview stderr and stdout in finalization scripts
  Update vintf levels for finalization script
2024-01-17 21:52:52 +00:00
Tim Tsai
21fd6d814b Merge "Fixed not mapping sdk_sandbox key to vendor key" into main am: 7cd5b313f6 am: ff22ed407c
Original change: https://android-review.googlesource.com/c/platform/build/+/2903807

Change-Id: I85e0eab1cf581c9b30e4ae8e25d71995c5b33979
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-17 18:26:19 +00:00
Tim Tsai
7cd5b313f6 Merge "Fixed not mapping sdk_sandbox key to vendor key" into main 2024-01-17 17:08:07 +00:00
Devin Moore
395d5e32e2 Capture queryview stderr and stdout in finalization scripts
Sometimes the output wasn't grep-able and this fixes it.

Ignore-AOSP-First: b/304316873#comment10

Test: Run the bazel query command multiple times before/after
      and verify it works 100% of the time after.
Bug: 320589170
Change-Id: Ic60d3318287353aa71fdeb2c540899d588a2d273
2024-01-17 16:51:10 +00:00
Devin Moore
196c1b5352 Update vintf levels for finalization script
This year's vintf levels changed from 9 to 202404, so the levels in the
finalization script need to change.

Ignore-AOSP-First: b/304316873#comment10

Test: ./finalize-vintf-resources.sh
Bug: 320589170
Change-Id: I2e9b3953233c8d032f44f379546919b9f3642a6f
2024-01-17 16:50:59 +00:00