Commit Graph

93127 Commits

Author SHA1 Message Date
LaMont Jones
89d97bf901 base_rules: Separate aconfig and module_info code
Record LOCAL_ACONFIG_FILES when LOCAL_SOONG_MODULE_INFO_JSON is defined.

Bug: b/308625757
Test: out/soong/module-info-${TARGET_PRODUCT}.json is unchanged
Test: fixes some aconfig flags.
Change-Id: I7ca9d2723e38ec5588bc6ada8769320a0b63bcb5
2024-01-25 19:15:09 +00:00
Zhi Dou
d09505cc62 Merge "aconfig: add isOptimizationEnabled in FakeFeatureFlagsImpl" into main 2024-01-25 18:54:40 +00:00
Jiakai Zhang
b9627ac3cc Merge "Force PRODUCT_ENABLE_UFFD_GC to true on GSI." into main 2024-01-25 17:35:20 +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
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
Dennis Shen
00f4643347 Merge "update flags.mk to create one storage file per rule" into main 2024-01-25 14:39:21 +00:00
Jiakai Zhang
94c6d7a401 Force PRODUCT_ENABLE_UFFD_GC to true on GSI.
If the kernel version isn't available to the build system and
PRODUCT_ENABLE_UFFD_GC isn't explicitly set, there will be a build
warning. To address the warning and make the behavior more explicit on
GSI builds, we need this change.

Bug: 321751629
Test: lunch aosp_x86_64-trunk_staging-userdebug && m dist
Change-Id: I5b73890235827929ea3bce5a07260d6c67a00a27
2024-01-25 14:37:30 +00:00
Treehugger Robot
e11290c27c Merge "Rename arch variant goldmont-without-xsaves to goldmont-without-sha-xsaves" into main 2024-01-25 08:11:40 +00:00
Treehugger Robot
75d530cbff Merge "Enable clang coverage" into main 2024-01-25 06:18:24 +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
Treehugger Robot
ebb0bd4b81 Merge "Disable Window Extensions on TV" into main 2024-01-25 01:49:01 +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
Hongguang Chen
e068028fe7 Disable Window Extensions on TV
Window Extensions is not supported on TV. Adding it to TV GSI causes
some CTS failure.

Bug: 321898211
Test: make TV GSI, check artifacts
Test: atest CtsWindowManagerJetpackTestCases on TV GSI
Change-Id: Ice6602c7b06c2e09e557423426abaa94da55c836
2024-01-24 23:25:46 +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
Dan Shi
c1e550d515 Support test runnner option in auto generated test configs
Bug: 284179405
Bug: 236980335
Test: unittest
Change-Id: I7f96a2a2bc52316888e87af7e4bcc4ef50863716
2024-01-24 21:12:40 +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
Luca Farsi
a718299b96 Merge "Determine if the build is in presubmit using build id" into main 2024-01-24 19:11:04 +00:00
Dennis Shen
9f34a48141 Merge "Restructure aconfig repo to be a cargo workspace with many crates" into main 2024-01-24 17:51:00 +00:00
Satoshi Niwa
1b279c6b5d Rename arch variant goldmont-without-xsaves to goldmont-without-sha-xsaves
Bug: 314243939
Test: Build an image with TARGET_ARCH_VARIANT:=goldmont-without-sha-xsaves
Change-Id: I3d3147e12093fecbcc3873c44a47b1f778c09191
2024-01-24 16:31:27 +09: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
Treehugger Robot
34a9a0e851 Merge "Move fontchain_lint to build/core/tasks" into main 2024-01-24 01:13:43 +00:00
Daniel Zheng
44adde16b5 Allow cow_version to be overwriteable
Allow Cow version to be overwritten by device specific makefiles. This
change is needed so we can begin enableing virtual_ab_cow_version := 3
on cuttlefish

Test: m
Change-Id: Idd314dd24362a6e5d905db16ac260a24bbb7ae45
2024-01-23 13:37:46 -08:00
Dennis Shen
f2d4c8dc80 update flags.mk to create one storage file per rule
Bug: b/321243743
Test: tested in internal main build
Change-Id: I824c698587843fc72e8a16e8646262202663d99e
2024-01-23 20:50:54 +00:00
Treehugger Robot
04acb6d255 Merge "Use RELEASE_BOARD_API_LEVEL_FROZEN" into main 2024-01-23 04:31:31 +00:00
Luca Farsi
c18da79d3f Determine if the build is in presubmit using build id
The current logic to determine if a build is pre or postsubmit is the
existence of the change_info file but this file also exists in
postsubmit, causing the build to break. Use the build ID as the
heuristic instead which should be more reliable.

Test: abtd run
Bug: 314171817
Change-Id: I9871eee71c0574583b528135dadd42e3f485a780
2024-01-22 14:56:13 -08:00
Roshan Pius
9454c64bca Merge "Copy com_android_nfc certs for sepolicy rule" into main 2024-01-22 22:45:49 +00:00
Treehugger Robot
28007ce2e1 Merge "Add all apexes to apex_info" into main 2024-01-22 22:08:14 +00:00
Devin Moore
df791fdad0 Merge "Add all of the packages used to support older/upgrading devices" into main 2024-01-22 20:56:46 +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
Kousik Kumar
1bfd60de09 Remove workaround to copy reclient binaries
With Kernel caching enabled for files in Cog, we no longer need this workaround. This also makes clean builds after make clean simpler (no need to rerun source again after m clean).

Bug: b/289391270
TESTED: Ran ~5 full builds without workaround and none of them stalled

NOTE FOR REVIEWERS - original patch and result patch are not identical.
PLEASE REVIEW CAREFULLY.
Diffs between the patches:
 # This function moves the reclient binaries into a directory that exists in a
> -# non-cog part of the overall filesystem.  This is to workaround the problem
> -# described in b/289391270.
> -function _copy_reclient_binaries_from_cog() {
> -  if [[ "${OUT_DIR}" == "" ]]; then
> -    OUT_DIR="out"
> -  fi
> -  local RECLIENT_VERSION=`readlink prebuilts/remoteexecution-client/live`
> -
> -  local NONCOG_RECLIENT_BIN_DIR_BASE="${OUT_DIR}/.reclient"
> -  local NONCOG_RECLIENT_BIN_DIR="${NONCOG_RECLIENT_BIN_DIR_BASE}/${RECLIENT_VERSION}"
> -
> -  # Create the non cog directory and setup live symlink.
> -  mkdir -p ${NONCOG_RECLIENT_BIN_DIR}
> -
> -  if [ `ls ${NONCOG_RECLIENT_BIN_DIR} | wc -l` -lt 8 ]; then
> -    # Not all binaries exist, copy them from the Cog directory.
> -    local TOP=$(gettop)
> -    cp ${TOP}/prebuilts/remoteexecution-client/live/* ${NONCOG_RECLIENT_BIN_DIR}
> -  fi
> -
> -  ln -sfn ${RECLIENT_VERSION} ${NONCOG_RECLIENT_BIN_DIR_BASE}/live
> -  export RBE_DIR="${NONCOG_RECLIENT_BIN_DIR_BASE}/live"
> -}
> -
> -  _copy_reclient_binaries_from_cog

Original patch:
 diff --git a/cogsetup.sh b/cogsetup.sh
old mode 100644
new mode 100644
--- a/cogsetup.sh
+++ b/cogsetup.sh
@@ -34,31 +34,6 @@
   mkdir -p ${DEFAULT_OUTPUT_DIR}
   ln -s ${DEFAULT_OUTPUT_DIR} `pwd`/out
 }
-
-# This function moves the reclient binaries into a directory that exists in a
-# non-cog part of the overall filesystem.  This is to workaround the problem
-# described in b/289391270.
-function _copy_reclient_binaries_from_cog() {
-  if [[ "${OUT_DIR}" == "" ]]; then
-    OUT_DIR="out"
-  fi
-  local RECLIENT_VERSION=`readlink prebuilts/remoteexecution-client/live`
-
-  local NONCOG_RECLIENT_BIN_DIR_BASE="${OUT_DIR}/.reclient"
-  local NONCOG_RECLIENT_BIN_DIR="${NONCOG_RECLIENT_BIN_DIR_BASE}/${RECLIENT_VERSION}"
-
-  # Create the non cog directory and setup live symlink.
-  mkdir -p ${NONCOG_RECLIENT_BIN_DIR}
-
-  if [ `ls ${NONCOG_RECLIENT_BIN_DIR} | wc -l` -lt 8 ]; then
-    # Not all binaries exist, copy them from the Cog directory.
-    local TOP=$(gettop)
-    cp ${TOP}/prebuilts/remoteexecution-clie
[[[Original patch trimmed due to size. Decoded string size: 1502. Decoded string SHA1: f5a824559440a15a8ccb76dbf414facf5d578da9.]]]

Result patch:
 diff --git a/cogsetup.sh b/cogsetup.sh
index 3005d58..6439af0 100644
--- a/cogsetup.sh
+++ b/cogsetup.sh
@@ -35,31 +35,6 @@
   ln -s ${DEFAULT_OUTPUT_DIR} `pwd`/out
 }
 
-# This function moves the reclient binaries into a directory that exists in a
-# non-cog part of the overall filesystem.  This is to workaround the problem
-# described in b/289391270.
-function _copy_reclient_binaries_from_cog() {
-  if [[ "${OUT_DIR}" == "" ]]; then
-    OUT_DIR="out"
-  fi
-  local RECLIENT_VERSION=`readlink prebuilts/remoteexecution-client/live`
-
-  local NONCOG_RECLIENT_BIN_DIR_BASE="${OUT_DIR}/.reclient"
-  local NONCOG_RECLIENT_BIN_DIR="${NONCOG_RECLIENT_BIN_DIR_BASE}/${RECLIENT_VERSION}"
-
-  # Create the non cog directory and setup live symlink.
-  mkdir -p ${NONCOG_RECLIENT_BIN_DIR}
-
-  if [ `ls ${NONCOG_RECLIENT_BIN_DIR} | wc -l` -lt 8 ]; then
-    # Not all binaries exist, copy them from the Cog directory.
-    local TOP=$(gettop)
-    cp ${TOP}/prebuilts/remoteexecution-client/live/* ${NONCOG_RECLIENT_BIN_DIR}
[[[Result patch trimmed due to size. Decoded string size: 1500. Decoded string SHA1: 75090baaf2a80305e8faea0e882e7edf257a2420.]]]

Change-Id: Id9963c3f1de7d3d4151a2e84fe52cf9d2f66ba10
2024-01-22 19:51:51 +00:00
Justin Yun
b33308c88c Use RELEASE_BOARD_API_LEVEL_FROZEN
RELEASE_BOARD_API_LEVEL_FROZEN must not be overriden by a board
config value. Use RELEASE_BOARD_API_LEVEL_FROZEN directly to build
configs.

Bug: 295269182
Test: TH
Change-Id: I60ad4cf1a9f377619fef98d6f9ef4d04d3395991
2024-01-22 10:54:06 +09:00
Treehugger Robot
b14bf5f6e9 Merge "Install libvintf_jni" into main 2024-01-21 21:56:31 +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
Cole Faust
a4e395b2af Merge "Revert "symlink_outputs: Add .KATI_SYMLINK_OUTPUTS to build/make..."" into main 2024-01-19 19:38:57 +00:00
Kevin Dagostino
8ac6cd19c5 Merge "Add banner announcing adevice when running builds." into main 2024-01-19 19:29:13 +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
Roshan Pius
139c67be26 Copy com_android_nfc certs for sepolicy rule
Copied from:
  com_android_nfc.pk8 -> nfc.pk8
  com_android_nfc.x509.pem -> nfc.x509.pem

BUG: 320583956
Test: Bootup test with signed NFC APK (within NFC apex)
Merged-In: Ia0c1c7228323dec4d283f469701ae3606e2fadca

Change-Id: Ia0c1c7228323dec4d283f469701ae3606e2fadca
2024-01-19 10:23:14 -08: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
Harshit Mahajan
46dfb868b2 Merge "Revert^2 "[CrashRecovery] Add module to BCP and SSCP"" into main 2024-01-19 16:20:35 +00:00
Nelson Li
6a699c8d47 Move fontchain_lint to build/core/tasks
Because `system.img` is a dependency of `fontchain_lint`, and
`system.img` is currently not generated inside `Soong`, it is not
possible to directly convert `fontchain_lint` to `Android.bp`.
Move it to build/core/task first.

Bug: 319050958
Test: m fontchain_lint
Change-Id: I2c318f6f51107cd80f0c70531e23f73569b0ec83
2024-01-19 06:59:22 +00:00
Inseob Kim
2f7809b437 Merge "Remove LOCAL_FILE_CONTEXTS" into main 2024-01-19 01:40:03 +00:00
Cole Faust
8f2283e6f2 Revert "symlink_outputs: Add .KATI_SYMLINK_OUTPUTS to build/make..."
Revert submission 1433935-symlink_outputs

Reason for revert: symlink_outputs was added so bazel could run ninja files, but we abanoned that approach in roboleaf, and then roboleaf was cancelled entirely. Remove this feature so we're more compatible with upstream ninja / n2.

Reverted changes: /q/submissionid:1433935-symlink_outputs

Change-Id: I5a779695689148ed32037f7f82887c458a3587cd
2024-01-18 20:12:12 +00:00
Luca Farsi
9c7dbf06a4 Merge changes Ia3ad8ebf,I94422993 into main
* changes:
  Add option to print command output and fix env on dumpvars commands
  Make build script executable via python
2024-01-18 19:56:57 +00:00
Yu Liu
15fb2a41b1 Merge "Tweak the CUJ scripts to make it work in CI." into main 2024-01-18 04:23:49 +00:00