Commit graph

8748 commits

Author SHA1 Message Date
Aditya Choudhary
58b049f749 Merge "Code metadata integration with Generator tool" into main 2023-12-06 07:37:50 +00:00
Treehugger Robot
ca96bcb0c8 Merge "Sign OTA packages inside target_files during signing" into main 2023-12-05 21:46:55 +00:00
Colin Cross
952df85c69 Merge "Support aconfig dump --dedup" into main 2023-12-05 19:12:11 +00:00
Aditya Choudhary
d96041a0c6 Code metadata integration with Generator tool
Change-Id: Icf14b48bc777207ac7cc7a287a174c8de817339b
2023-12-05 18:10:25 +00:00
Oriol Prieto Gascó
6344fdf9a6 Merge "Add container field to flag_declarations" into main 2023-12-05 11:46:43 +00:00
Yi-Yo Chiang
7a519aebde Merge "releasetools: Remove deprecated BOARD_BUILD_SYSTEM_ROOT_IMAGE" into main 2023-12-05 03:29:42 +00:00
Oriol Prieto Gasco
7afc7e7b1c Add container field to flag_declarations
A container is software which is always built in its entirety using the
same build environment. In particular, all of its parts are built using
the same build-time default flag values. In addition, containers are
always installed as a single unit.

Bug: 312696545
Test: atest aconfig.test && m all_aconfig_declarations
Change-Id: I2ef3db836c4456f4f4fb5c066edf9094e38f89cc
2023-12-05 02:25:01 +00:00
Alex Buynytskyy
48d64b886a Add the next release to Class2NonSdkList.
Fixes: 313893203
Test: step-1
Change-Id: I0f6ae822cd206df23a2ffd1dade78bb430006c5d
2023-12-04 23:15:43 +00:00
Yi-Yo Chiang
18650c7be0 releasetools: Remove deprecated BOARD_BUILD_SYSTEM_ROOT_IMAGE
This variable is always false or empty now, so clean up remaining
references to the variable.

Bug: 241346584
Test: Presubmit
Change-Id: I5dd3d356729d0bd2639633580bbb85f8b03582cf
2023-12-01 09:03:08 +00:00
Treehugger Robot
e5bfa38457 Merge "Revert "releasetools: Deprecate GKI build rules"" into main 2023-12-01 08:18:40 +00:00
Yi-Yo Chiang
92a517d75e Revert "releasetools: Deprecate GKI build rules"
This reverts commit faaede0f01.

Reason for revert: caused GSI sign failure b/311134118#comment23

Change-Id: Id794a8ab3369c907834a73cc88ea1640dc7492d1
2023-12-01 07:02:17 +00:00
Sam Saccone
452b4fd805 Remove non-functional check owners script that pre-dated gerrit.
The gerrit team has now official ways of validating owner files
https://android-review.googlesource.com/plugins/code-owners/Documentation/validation.html

BUG=312931985

Change-Id: Iafce62560bdd080cafb419af68acf24d86cdfc78
2023-12-01 00:45:05 +00:00
Daniel Rosenberg
5514a5aaf6 Merge "Add support for different F2FS block sizes" into main 2023-11-30 00:24:46 +00:00
Colin Cross
6befb342fd Support aconfig dump --dedup
Add a flag to aconfig dump that will allow identical flags to be merged
without erroring.  This will allow merging the aconfig cache files from
dependencies for each module, which requires passing less data to Make
from Soong, and thus reduces the percentage of builds require Kati
analysis.

Bug: 313698230
Test: aconfig.test
Change-Id: Id2d9b78225720ce01defad4b13ea9395f6ab1033
2023-11-29 12:04:36 -08:00
Ted Bauer
df2b347f9f Merge "aconfig: Add exported mode to aconfig Java library generation." into main 2023-11-29 18:23:10 +00:00
Ted Bauer
4a6af78b69 aconfig: Add exported mode to aconfig Java library generation.
This commit adds a third codegen mode, _exported_, in addition to
the existing modes, production and test.

When codegen mode is _exported_, getters are generated _only_ for
flags marked as exported as well. Also the getters always look
up DeviceConfig values at runtime, and have a default value of
false.

This only implements exported mode for Java codegen, follow-up CLs
will support Rust and C++.

Test: atest aconfig.test
Bug: 311152507
Change-Id: Ie39379b40de072180e05d84c76361b24cc0e0d83
2023-11-29 15:44:24 +00:00
Dennis Song
4605c0ec76 Merge "Expose --avb_resolve_rollback_index_location_conflict" into main 2023-11-29 08:54:36 +00:00
Yi-Yo Chiang
6312ff59c1 Merge "releasetools: Deprecate GKI build rules" into main 2023-11-29 06:47:25 +00:00
Dennis Song
79e313972c Expose --avb_resolve_rollback_index_location_conflict
Expose this option at `merge_builds.py` so that this script
can also resolve the conflict AVB rollback index location
while building the vbmeta image.

Bug: 289368551
Test: TreeHugger
Change-Id: I404160ff5d7591cb6a81ed2d2267de1b0e6ac65f
2023-11-29 06:03:44 +00:00
Po Hu
ce867a65b5 Remove APEX from merged target-files package
It was a temp folder created for check_target_files_vintf.py.
But now it is wrongly archived by create_target_files_archive
in merge_target_files.py.
And then such package will cause CheckVintf exception in
ota_from_target_files.py because the APEX folder is created
again but already exists.
So use MakeTempDir to make it removed after check finished.

Test: merge_target_files & ota_from_target_files
Change-Id: Iab54afff2c346a582d5ee5228103fe091e016cd0
2023-11-29 08:54:44 +08:00
Kelvin Zhang
b84d2aa7d1 Sign OTA packages inside target_files during signing
Test: th
Bug: 293313353
Change-Id: Ifd5dd08153c5970dac8166808173f7dfbbb3411d
2023-11-28 10:08:38 -08:00
Yi-Yo Chiang
faaede0f01 releasetools: Deprecate GKI build rules
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.

Bug: 229701033
Fix: 229701033
Test: presubmit
Change-Id: Ie882fccd864920289e48366e99a4ebd67e784d0d
2023-11-28 08:54:33 +00:00
Daniel Rosenberg
d9a520c5bd Add support for different F2FS block sizes
F2FS has been expanded to allow for different block sizes. Currently the
block size must be the same as page size, but this may change in the
future. This gives support for 16K while not restricting the ability to
choose a block size that isn't based on the page size later on.

Bug: 279820706
Test: Boot 16k F2FS device
Change-Id: I4e025d83a5e5ad03d89bc80b02fea390c2cbad69
2023-11-27 18:09:18 -08:00
Oriol Prieto Gascó
c96bf2caec Merge "Add is_exported field to aconfig.proto" into main 2023-11-22 13:41:09 +00:00
Wonsik Kim
8a64367cb5 Merge "aconfig: move cache_ as a memeber" into main 2023-11-21 17:57:39 +00:00
Aditya Choudhary
c35ca4de22 Merge "Split filepaths on ' ' in metadata generator" into main 2023-11-21 16:09:23 +00:00
Aditya Choudhary
93cd9f6791 Split filepaths on ' ' in metadata generator
Test: go test

Change-Id: I5063c5a0b93501010b38aea91e8648cf5960ee6e
2023-11-21 14:02:43 +00:00
Treehugger Robot
fdd0c0cdde Merge "Add --boot-image-dir-path arg" into main 2023-11-21 02:09:17 +00:00
Oriol Prieto Gasco
0b9d289e2a Add is_exported field to aconfig.proto
When a flag is exported, it can be read by code built in other containers. By
default flags are not exported. Set this to true if your flag is gating
a public API which may be called from other containers (typically, a
flag used in @FlaggedAPI annotations).

Test: atest aconfig.test
Bug: 311152500
Change-Id: I53e3ed18b96c1518f04172d5933ef96b41ccda7e
2023-11-20 21:30:18 +00:00
Wonsik Kim
d4d952f9d2 aconfig: move cache_ as a memeber
provider_ object relies on cache_ vector to be alive, but the order
of destruction between these objects at exit are not guaranteed.
This can lead to crash at the exit especially on ASAN build.
By putting cache_ as a member it is guaranteed that cache_ is not
destructed until provider_ is destructed.

Test: m ; m AconfigDemoActivity
Test: atest aconfig.test
Test: observe no crash on _hwasan build
Change-Id: If9e23e99c501bf8f06fcab003622948b9e730352
2023-11-20 09:50:52 -08:00
Treehugger Robot
085c016934 Merge "aconfig: rename test flag disabled_rw_2 -> disabled_rw_in_other_namespace" into main 2023-11-17 14:20:25 +00:00
Aditya Choudhary
d5e2717e27 Merge "Handle empty input file case in Metadata generation" into main 2023-11-17 12:19:55 +00:00
Mårten Kongstad
bc76a3d9a0 aconfig: rename test flag disabled_rw_2 -> disabled_rw_in_other_namespace
The flag `disabled_rw_2` is used to verify that aconfig can
auto-generate code for flags in different namespaces. Rename the flag to
`disabled_rw_in_other_namespace` to highlight that it belongs to a
different namespace than the other flags.

This CL is a semantic change only.

Bug: None
Test: atest aconfig.test
Change-Id: Ib82fdce0ca3f7cd56b9b3f80e44fe424a03a2ae4
2023-11-17 09:37:06 +01:00
Inseob Kim
8fc7cf6301 Merge "Add support for auto-generated characteristics RRO" into main 2023-11-17 05:02:28 +00:00
Aditya Choudhary
70fb37ec11 Handle empty input file case in Metadata generation
Bug: 296873595
Test: Manual test (use go test inside tools/metadata/testdata)

Change-Id: Ib48e88bdad4c870be3ca955abfd64ee8dd74f85d
2023-11-16 20:09:25 +00:00
Ted Bauer
ca355c09a2 Merge "Revert^2 "Cache Java codegen'd flags in static member variables."" into main 2023-11-16 18:48:00 +00:00
Ted Bauer
c3073786b3 Revert^2 "Cache Java codegen'd flags in static member variables."
This reverts commit efda207c09.

Reason for revert: this unrevert contains the fix for b/311187402

Test: cargo test
Change-Id: I210aebd30edd864a7c141ede336c12aebf4f1fcd
2023-11-16 12:26:41 -05:00
Aditya Choudhary
432c41ecbf Merge "Refactor metadata tool to support metadata generation for different rules." into main 2023-11-15 22:11:22 +00:00
Treehugger Robot
5003ff741a Merge "Move signing related options to a shared place" into main 2023-11-15 18:32:40 +00:00
Treehugger Robot
f0e5c7e321 Merge "Allow ParseOptions to compose multiple option parsers easily" into main 2023-11-15 18:32:00 +00:00
Aditya Choudhary
a96ce3223a Refactor metadata tool to support metadata generation for different rules.
Bug: 296873595
Test: Manual test (use go test inside tools/metadata/testdata)

Change-Id: I881fd76213ec78001f9e12ed2fbc860d1503a364
2023-11-15 18:05:11 +00:00
Ted Bauer
a06cff1048 Merge "Revert "Cache Java codegen'd flags in static member variables."" into main 2023-11-15 18:04:10 +00:00
Aditya Choudhary
4277d617f2 Merge "Add metadata generator tool for test spec metadata generation. Bug: 296873595 Test: Manual test (use go test inside tools/metadata/testdata)" into main 2023-11-15 17:13:28 +00:00
Ted Bauer
efda207c09 Revert "Cache Java codegen'd flags in static member variables."
This reverts commit afe55106e5.

Reason for revert: causes a bug b/311187402

Change-Id: Ic3f56fbb66a6412cd702cebd9e4247032f950324
2023-11-15 16:52:02 +00:00
Jihoon Kang
3b12b769e4 Merge "Set BUILD_FROM_SOURCE_STUB=true for finalization" into main 2023-11-15 16:29:12 +00:00
Aditya Choudhary
51f97c1963 Add metadata generator tool for test spec metadata generation.
Bug: 296873595
Test: Manual test (use go test inside tools/metadata/testdata)

Change-Id: I404b57224828149f26bcf4deadb662f513886231
2023-11-15 16:08:14 +00:00
Jihoon Kang
59c61acf64 Set BUILD_FROM_SOURCE_STUB=true for finalization
Build from text stub feature was initially implemented to improve build
performance and may be unstable for api finalization, as the stubs
generated from api signature files miss some methods, which may cause
backward compatibility issues. Therefore, this change disables building
from text stub for api finalization.

Test: build/tools/finalization/finalize-aidl-vndk-sdk-resources.sh and inspect generated ninja file to verify that the stubs are generated from source Java files.
Bug: 310279899
Change-Id: I9d374e973788bc97514815f64eeb949a94a97647
2023-11-15 00:38:41 +00:00
Kelvin Zhang
68252b801a Move signing related options to a shared place
Move OTA signing flags to payload_signer.py so that we can re-use these
flags in multiple binaries.

Test: th
Bug: 293313353
Change-Id: I44f9910cee37c449397e174a5784f747ec9fb0d6
2023-11-14 12:41:58 -08:00
Kelvin Zhang
c68c6b9530 Allow ParseOptions to compose multiple option parsers easily
There are certain options which we need to share in multiple binaries,
for example, the signer options. Current options parsing function only
accepts 1 extra option handler, which is inflexible. Extend it to take a
list of extra option handlers.

Currently, to add a new CLI flag, caller must append the flag name to
`extra_long_opts`, then pass an extra option handler which can handle
that option. Define a new dataclass which contains both the CLI flag
name and the code to handle that flag for better composition.

Test: th
Bug: 293313353
Change-Id: I758db66dfd95934f5b2701454d97bfe7d37dc16d
2023-11-14 12:41:56 -08:00
Ted Bauer
afe55106e5 Cache Java codegen'd flags in static member variables.
By caching flag values directly in member variables instead of caching
a HashMap and accessing that, flag reads avoid `hashCode()`, map
lookup, and Boolean.parse runtime costs. Flag reads are turning out
to have performance problems in hot paths, so this should help to
alleviate that.

Bug: 309625014
Test: m
Change-Id: I923bf6af2ae3fcbbf2fee7126b492a47cd6049ad
2023-11-14 12:02:01 -05:00