Commit graph

85669 commits

Author SHA1 Message Date
Dan Albert
2610a328ce Filter REL out of preview codenames.
Relanding https://r.android.com/2773148 in a different way, since
removing REL from ALL_CODENAMES prevents -next builds from booting
(see the comment for the code that relies on this behavior).

This reverts commit d637190deb.

Bug: http://b/303087088
Test: m ndk # with barbet-next-userdebug in goog/main
Change-Id: I8f750645f79c3cf48a85879c36e1549df47eee97
2023-10-05 21:32:06 +00:00
Treehugger Robot
f4e7e17dc4 Merge "Install VNDK v35 in the vendor partition" into main 2023-10-05 12:28:34 +00:00
Alina Kalyakina
618d848f0d Merge "Revert "Filter REL out of PLATFORM_VERSION_ALL_CODENAMES."" into main 2023-10-05 09:55:37 +00:00
Justin Yun
4a39d20909 Install VNDK v35 in the vendor partition
This is required for the vendor image with VNDK v35 to be used for
the GRF configuration.
This does not modify the VNDK install path before release.

Bug: 299867815
Test: lunch cf_x86_64_phone-next-userdebug; m
Change-Id: I689cb6dcf66cd4a23c447bd0d761677f78b0936a
2023-10-05 18:07:20 +09:00
Treehugger Robot
44a7f9ccb3 Merge "Add zip2zip as a required module of releasetools_common." into main 2023-10-05 06:46:26 +00:00
Dan Shi
d637190deb Revert "Filter REL out of PLATFORM_VERSION_ALL_CODENAMES."
This reverts commit 5346f7db62.

Reason for revert: b/303552537 

Change-Id: I915be23c7d234d28642c141473bf2a180ec4c3c6
2023-10-05 06:07:52 +00:00
Wei Li
9e37cf263b Add zip2zip as a required module of releasetools_common.
zip2zip is used in function ZipDelete in common.py.

Bug: 303082945
Test: CIs
Change-Id: I7ff1189122aac4915d411b50a6cc76bd76d658f6
2023-10-04 22:23:13 -07:00
Edward Liaw
41d4b0b3af Merge "linux-kselftest: Remove special cased build rule for kselftest" into main 2023-10-05 01:08:32 +00:00
Treehugger Robot
624b0f4b2f Merge "Filter REL out of PLATFORM_VERSION_ALL_CODENAMES." into main 2023-10-05 00:08:08 +00:00
Dan Albert
5346f7db62 Filter REL out of PLATFORM_VERSION_ALL_CODENAMES.
The codename of the current release is replaced by "REL" when the
build is configured as a release rather than a preview. For example,
PLATFORM_VERSION_CODENAME.UpsideDownCake will be "REL" rather than
UpsideDownCake in a -next target when the upcoming release is
UpsideDownCake. "REL" shouldn't really be treated as a codename
though. It's a placeholder to indicate that the build is a release and
so doesn't really have a codename. The list of all codenames ends up
in ro.build.version.all_codenames, and also ends up feeding the logic
for stub generation in soong, neither of which are places that should
include REL.

Bug: http://b/303087088
Test: m ndk # with barbet-next-userdebug in goog/main
Change-Id: I97972439e1f06c09f0ed59e7e2191c489a214e88
2023-10-04 23:11:39 +00:00
Dennis Song
764585118f Merge "Resolve conflict AVB rollback index location" into main 2023-10-04 17:16:11 +00:00
Treehugger Robot
2b181f9aa1 Merge "Use deterministic salt for boot image avb footer" into main 2023-10-04 17:08:25 +00:00
Dennis Song
4aae62ee77 Resolve conflict AVB rollback index location
Add an `--avb-resolve-rollback-index-location-conflict`
option in merge_target_files. When this option is set,
the merge tool will resolve conflicting index locations
by assigning the smallest unused index location.

This is to support merging system and vendor target files
from two different targets. In this case, the two target
files may have conflict rollback index location because
they were built independently.

Test: atest releasetools_test
Test: validate_target_files *-target_files-*.zip
Test: merge_target_files &&
        add_img_to_target_files &&
        img_from_target_files &&
        flash device
Bug: 300604688
Change-Id: Ibd18ef2a9f3784157fe17966f5364c3c81c9bd9f
2023-10-04 06:45:15 +00:00
Justin Yun
f81405aab0 Merge "Remove PRODUCT_PRODUCT_VNDK_VERSION from soong_config" into main 2023-10-04 06:29:31 +00:00
Treehugger Robot
842d96dc40 Merge "Clean out old rustc compiler intermediates" into main 2023-10-04 00:01:08 +00:00
Treehugger Robot
7683671bcd Merge "Allow installing fake vendor packages" into main 2023-10-03 22:40:30 +00:00
Cole Faust
976a52c007 Allow installing fake vendor packages
This line in base_rules.mk requires a variable that's qualified by
target/host, the partition, and the module class. There didn't exist
one for target/vendor/fake, so fake vendor modules failed to compile.
Add a TARGET_OUT_FAKE so we can use fake vendor modules. This is aimed
at using install_symlink on the vendor partition.

https://cs.android.com/android/platform/superproject/main/+/main:build/make/core/base_rules.mk;l=279;drc=c67e769b8c44eeb9bb851f20003b63d35193e155

Bug: 205632228
Test: presubmits
Change-Id: If4618f90cebbafcd44e88e38513033282c37c1b7
2023-10-03 14:27:35 -07:00
Kelvin Zhang
de53f7df43 Use deterministic salt for boot image avb footer
avbtool by default generates a random salt everytime, this makes builds
less reproducible. Use sha256 checksum of kernel image as the hex to
make the build reproducible.

Test: th
Bug: 293313353

Change-Id: I959b3dee77654098ab9fde475f11eaee8d40c790
2023-10-03 12:26:08 -07:00
Zhi Dou
d61f2efdbb Merge "aconfig: change Map.of to Map.ofEntries in FakeFeatureFlagsImp" into main 2023-10-03 17:58:22 +00:00
Jihoon Kang
a65cdd5024 Merge "Revert^2 "Add soong config variable Release_expose_flagged_api"" into main 2023-10-03 17:55:17 +00:00
Colin Cross
42f5a6bb6a Clean out old rustc compiler intermediates
The CL that splits rust complation and linking into separate actions
is being reverted to save disk space.  Delete the intermediates that
are no longer needed in order to immediately free the disk space.

Bug: 293349612
Test: builds
Change-Id: I1e9f015bf9b6ffe8ba3ccd11ac3075e90640e9b3
2023-10-03 10:35:32 -07:00
Dennis Song
50e5fbd688 Merge "Minor refactor tools/releasetools/common.py" into main 2023-10-03 06:19:23 +00:00
Treehugger Robot
551570a073 Merge "Convert gsi_skip_mount.cfg to soong" into main 2023-10-03 03:06:44 +00:00
Dennis Song
6e5e44df72 Minor refactor tools/releasetools/common.py
- Sort the import modules in alphabetical order.
- Define module variables for avbtool arguments name.

Test: atest releasetools_test
Bug: 300604688
Change-Id: I7990b94cfc1d7b3e977ceb0a3dc2317689891229
2023-10-03 02:46:51 +00:00
Jihoon Kang
00328e40be Revert^2 "Add soong config variable Release_expose_flagged_api"
This reverts commit 453d74ba48.

Change-Id: Ic5cc83ebe396ccf05b51b8306b79a61dbb689807
2023-10-03 01:02:07 +00:00
Cole Faust
36e089a6cc Convert gsi_skip_mount.cfg to soong
The LOCAL_POST_INSTALL_CMD is problematic for m installclean-less
builds.

Bug: 205632228
Test: presubmits
Change-Id: Id4eb2fd5fbd4f080aec89fa90583ac2ec97c5e1c
2023-10-02 17:28:59 -07:00
Zhi Dou
b095acbc57 aconfig: change Map.of to Map.ofEntries in FakeFeatureFlagsImp
Map.of can only take 10 entries. Map.ofEntries uses variable arguments.

Bug: 303045451
Test: atest AconfigJavaHostTest
Change-Id: I26a3fa0b8a731f9203934d4a800a5c695cfc730f
2023-10-02 23:57:10 +00:00
Kousik Kumar
0d9b3a99ef Merge "Copy reclient binaries into the out directory itself" into main 2023-10-01 02:27:03 +00:00
Treehugger Robot
517308b890 Merge "Delete staging directory after creating module package zip" into main 2023-09-30 00:41:06 +00:00
Colin Cross
585967c08a Delete staging directory after creating module package zip
The staging directory isn't used after the module packaging zip is
built.  Delete the staging directory to reduce disk usage without
affecting incremental build performance.

Bug: 302573555
Change-Id: I377c60714f78760d0b6c2588935c12e10a9ed224
Test: treehugger
2023-09-30 00:37:38 +00:00
Cole Faust
985332eaca Merge "Revert^3 "Make the target_files zip reflect the recent partition change"" into main 2023-09-29 18:09:39 +00:00
Mark White
d577d60221 Merge "Added new framework-pdf jar inside MediaProvider module" into main 2023-09-29 12:21:33 +00:00
Cole Faust
83fe17e0a4 Revert^3 "Make the target_files zip reflect the recent partition change"
This reverts commit cb63de55b7.

Reason for revert: Still more broken devices

Change-Id: Ic55ba78dd9c2e34dc96549ac8aba65fdbefd379b
2023-09-29 00:22:27 +00:00
Cole Faust
06223362d7 Merge "Remove other partition's AVB properties" into main 2023-09-28 22:56:30 +00:00
Cole Faust
13d374ab41 Remove other partition's AVB properties
This is to ensure a partition doesn't need to be aware of the other
partitions in order to be built.

Also sort the image info file so it's easier to compare with bazel.

Bug: 297269187
Test: m && emulator on sdk_phone_x86_64-userdebug
Change-Id: I8e4b2049f602c8db109bf53e1359751a9ed9dd7a
2023-09-28 12:04:56 -07:00
Kousik Kumar
798080b0f3 Copy reclient binaries into the out directory itself
This is to avoid the problem of multiple source commands / builds run in parallel overwriting the binaries in the reclient dir.

TESTED=ran concurrent builds, ensured binaries weren't being overwritten.

Bug: b/302378775

NOTE FOR REVIEWERS - original patch and result patch are not identical.
PLEASE REVIEW CAREFULLY.
Diffs between the patches:
 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}"
+  if [ -d "${NONCOG_RECLIENT_BIN_DIR}" ]; then
+    if [ `ls ${NONCOG_RECLIENT_BIN_DIR} | wc -l` -gt 1 ] ; then
+      # binaries already exist, only update the symlink to ensure correct
+      # reclient version is set.
+      ln -sf ${RECLIENT_VERSION} ${NONCOG_RECLIENT_BIN_DIR_BASE}/live
+      return
+    fi
+  # Create the non cog directory and copy binaries into it.
+  mkdir -p ${NONCOG_RECLIENT_BIN_DIR}
-
-  # Copy the binaries out of live.
-  cp $TOP/prebuilts/remoteexecution-client/live/* $NONCOG_RECLIENT_BIN_DIR
+  cp ${TOP}/prebuilts/remoteexecution-client/live/* ${NONCOG_RECLIENT_BIN_DIR}
+  ln -sf ${RECLIENT_VERSION} ${NONCOG_RECLIENT_BIN_DIR_BASE}/live
-  export RBE_DIR=$NONCOG_RECLIENT_BIN_DIR
+  export RBE_DIR="${NONCOG_RECLIENT_BIN_DIR_BASE}/live"

Original patch:
 diff a/cogsetup.sh b/cogsetup.sh
--- a/cogsetup.sh
+++ b/cogsetup.sh
@@ -39,22 +39,30 @@
 # non-cog part of the overall filesystem.  This is to workaround the problem
 # described in b/289391270.
 function _copy_reclient_binaries_from_cog() {
-  local NONCOG_RECLIENT_BIN_DIR="${HOME}/.cog/reclient/bin"
-  if [ ! -d "$NONCOG_RECLIENT_BIN_DIR" ]; then
-    # Create the non cog directory if it doesn't exist.
-    mkdir -p ${NONCOG_RECLIENT_BIN_DIR}
-  else
-    # Clear out the non cog directory if it does exist.
-    rm -f ${NONCOG_RECLIENT_BIN_DIR}/*
+  if [[ "${OUT_DIR}" == "" ]]; then
+    OUT_DIR="out"
   fi
+  local RECLIENT_VERSION=`readlink prebuilts/remoteexecution-client/live`
 
-  local TOP=$(gettop)
+  local NONCOG_RECLIENT_BIN_DIR_BASE="${OUT_DIR}/.reclient"
+  local NONCOG_RECLIENT_BIN_DIR="${NONCOG_RECLIENT_BIN_DIR_BASE}/${RECLIENT_VERSION}"
+  if [ -d "${NONCOG_RECLIENT_BIN_DIR}" ]; then
+    if [ `ls ${NONCOG_RECLIENT_BIN_DIR} | wc -l` -gt 1 ] ; then
+      # binaries already exist, only update t

Change-Id: Ia6cb7faae6366ee7491fcf91777318b772a3ba88
2023-09-28 17:46:59 +00:00
Cole Faust
b78b334041 Merge "Add extra variables to soong.variables" into main 2023-09-28 16:38:28 +00:00
Maxim Siniavine
377cf62987 Merge "Revert "Add soong config variable Release_expose_flagged_api"" into main 2023-09-28 01:08:44 +00:00
Maxim Siniavine
453d74ba48 Revert "Add soong config variable Release_expose_flagged_api"
Revert submission 2755310

Reason for revert: Broken build b/302407753

Reverted changes: /q/submissionid:2755310

Change-Id: If2b09e6609cdd4c47eea12cb2d877c3874e0560b
2023-09-28 01:02:02 +00:00
Cole Faust
c874c70f45 Add extra variables to soong.variables
Also always use BUILD_NUMBER_FROM_FILE in the BUILD_FINGERPRINT.
The build number file now always exists, even if HAS_BUILD_NUMBER is
false.

Bug: 297269187
Test: m bazel_sandwich
Change-Id: Idf745b600b167e5cec161e07139be09a037bdc13
2023-09-27 13:44:56 -07:00
Rajeev Kumar
d7965bd12c Merge "Add devicelock to the list of individually toggleable module." into main 2023-09-27 19:06:11 +00:00
Treehugger Robot
ad7f4666a6 Merge "Prevent VABC from being disabled on release-key builds" into main 2023-09-27 18:33:10 +00:00
Jihoon Kang
19cd806de1 Merge "Add soong config variable Release_expose_flagged_api" into main 2023-09-27 17:09:27 +00:00
Treehugger Robot
aad75f8f1b Merge "Fix custom image OTA generation with extracted target files" into main 2023-09-27 16:56:17 +00:00
Kelvin Zhang
2f9a9ae64b Prevent VABC from being disabled on release-key builds
VABC is mandated now, and plain VAB will be unsupported later.

Test: th
Change-Id: Iad19433c06b25246d4f7bffe5599035836e36076
2023-09-27 09:35:21 -07:00
Mårten Kongstad
dd1ebe9300 Merge changes from topic "printflags-include-device-config" into main
* changes:
  printflags: add printflags to PRODUCT_PACKAGES
  printflags: include device_config values
2023-09-27 13:04:40 +00:00
Mårten Kongstad
583a52478b printflags: add printflags to PRODUCT_PACKAGES
Include the printflags device tool in the system image by default.

Bug: 301547297
Test: adb shell printflags
Change-Id: I3b2d71c89742bd389f6cafff8d8ab25fb81c7b00
2023-09-27 10:42:04 +02:00
Mårten Kongstad
3bb7988492 printflags: include device_config values
Amend the default flag values read from
/<partition>/etc/aconfig_flags.pb with the currently used values as
stored in device_config.

Bug: 301547297
Test: atest printflags.test
Test: adb shell printflags
Change-Id: Ic11702a0ae093d2e9dc3ff543b5ca0684b67e0dc
2023-09-27 10:42:04 +02:00
Justin Yun
cd7c0300b5 Remove PRODUCT_PRODUCT_VNDK_VERSION from soong_config
We can remove PRODUCT_PRODUCT_VNDK_VERSION safely as soong does not
read it.

Bug: 302255959
Test: m
Change-Id: I1d4080b8e6f8b04c0c1333bcd9bf055d329fdd71
2023-09-27 16:38:13 +09:00
Rajeev Kumar
e71b6333c4 Add devicelock to the list of individually toggleable module.
Bug: 300099037
Test: Builds successfully
Change-Id: I4231021982819cf227f3f1298c376635e160ab72
2023-09-26 20:16:57 -07:00