Merge Android 24Q2 Release (ab/11526283) to aosp-main-future
Bug: 337098550 Merged-In: I713a528d437e3446d32461add648e3b52b036d7a Change-Id: I7fdd415a218d1425f7fc37095d02c674ddfae6eb
This commit is contained in:
@@ -3,18 +3,19 @@ This folder contains automation and CI scripts for [finalizing](https://go/andro
|
||||
|
||||
## Automation:
|
||||
1. [Environment setup](./environment.sh). Set values for varios finalization constants.
|
||||
2. [Finalize SDK](./finalize-aidl-vndk-sdk-resources.sh). Prepare the branch for SDK release. SDK contains Android Java APIs and other stable APIs. Commonly referred as a 1st step.
|
||||
3. [Finalize Android](./finalize-sdk-rel.sh). Mark branch as "REL", i.e. prepares for Android release. Any signed build containing these changes will be considered an official Android Release. Referred as a 2nd finalization step.
|
||||
4. [Finalize SDK and submit](./step-1.sh). Do [Finalize SDK](./finalize-aidl-vndk-sdk-resources.sh) step, create CLs, organize them into topic and send to Gerrit.
|
||||
a. [Update SDK and submit](./update-step-1.sh). Same as above, but updates the existings CLs.
|
||||
5. [Finalize Android and submit](./step-2.sh). Do [Finalize Android](./finalize-sdk-rel.sh) step, create CLs, organize them into topic and send to Gerrit.
|
||||
a. [Update Android and submit](./update-step-2.sh). Same as above, but updates the existings CLs.
|
||||
1. [Finalize VINTF](./finalize-vintf-resources.sh). Prepare the branch for VINTF release.
|
||||
1. [Finalize SDK](./finalize-sdk-resources.sh). Prepare the branch for SDK release. SDK contains Android Java APIs and other stable APIs. Commonly referred as a 1st step.
|
||||
1. [Finalize Android](./finalize-sdk-rel.sh). Mark branch as "REL", i.e. prepares for Android release. Any signed build containing these changes will be considered an official Android Release. Referred as a 2nd finalization step.
|
||||
1. [Finalize VINTF and submit](./step-0.sh). Do Finalize VINTF step, create CLs, organize them into topic and send to Gerrit.
|
||||
1. [Finalize SDK and submit](./step-1.sh). Do Finalize SDK step, create CLs, organize them into topic and send to Gerrit.
|
||||
1. [Finalize Android and submit](./step-2.sh). Do [Finalize Android](./finalize-sdk-rel.sh) step, create CLs, organize them into topic and send to Gerrit.
|
||||
|
||||
## CI:
|
||||
Performed in build targets in Finalization branches.
|
||||
1. [Finalization Step 1, git_main-fina-1-release](https://android-build.corp.google.com/build_explorer/branch/git_main-fina-1-release). Test [1st step/Finalize SDK](./finalize-aidl-vndk-sdk-resources.sh).
|
||||
3. [Finalization Step 2, git_main-fina-2-release](https://android-build.corp.google.com/build_explorer/branch/git_main-fina-2-release). Test [1st step/Finalize SDK](./finalize-aidl-vndk-sdk-resources.sh) and [2nd step/Finalize Android](./finalize-sdk-rel.sh). Use [local finalization](./localonly-steps.sh) to build and copy presubmits.
|
||||
5. [Local finalization steps](./localonly-steps.sh) are done only during local testing or in the CI lab. Normally these steps use artifacts from other builds.
|
||||
1. [Finalization Step 0, git_main-fina-0-release](https://android-build.corp.google.com/build_explorer/branch/git_main-fina-0-release). Test Finalize VINTF.
|
||||
1. [Finalization Step 1, git_main-fina-1-release](https://android-build.corp.google.com/build_explorer/branch/git_main-fina-1-release). Test Finalize VINTF, Finalize SDK.
|
||||
1. [Finalization Step 2, git_main-fina-2-release](https://android-build.corp.google.com/build_explorer/branch/git_main-fina-2-release). Test Finalize VINTF, Finalize SDK, and [2nd step/Finalize Android](./finalize-sdk-rel.sh). Use [local finalization](./localonly-steps.sh) to build and copy presubmits.
|
||||
1. [Local finalization steps](./localonly-steps.sh) are done only during local testing or in the CI lab. Normally these steps use artifacts from other builds.
|
||||
|
||||
## Utility:
|
||||
[Full cleanup](./cleanup.sh). Remove all local changes and switch each project into head-less state. This is the best state to sync/rebase/finalize the branch.
|
||||
|
17
tools/finalization/build-step-0.sh
Executable file
17
tools/finalization/build-step-0.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2024 Google Inc. All rights reserved.
|
||||
|
||||
set -ex
|
||||
|
||||
function finalize_main_step0() {
|
||||
local top="$(dirname "$0")"/../../../..
|
||||
source $top/build/make/tools/finalization/environment.sh
|
||||
|
||||
if [ "$FINAL_STATE" = "unfinalized" ] ; then
|
||||
# VINTF finalization
|
||||
source $top/build/make/tools/finalization/finalize-vintf-resources.sh
|
||||
fi;
|
||||
}
|
||||
|
||||
finalize_main_step0
|
||||
|
@@ -7,11 +7,16 @@ function finalize_main_step12() {
|
||||
source $top/build/make/tools/finalization/environment.sh
|
||||
|
||||
if [ "$FINAL_STATE" = "unfinalized" ] ; then
|
||||
# SDK codename -> int
|
||||
source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh
|
||||
# VINTF finalization
|
||||
source $top/build/make/tools/finalization/finalize-vintf-resources.sh
|
||||
fi;
|
||||
|
||||
if [ "$FINAL_STATE" = "unfinalized" ] || [ "$FINAL_STATE" = "sdk" ] ; then
|
||||
if [ "$FINAL_STATE" = "unfinalized" ] || [ "$FINAL_STATE" = "vintf" ] ; then
|
||||
# SDK codename -> int
|
||||
source $top/build/make/tools/finalization/finalize-sdk-resources.sh
|
||||
fi;
|
||||
|
||||
if [ "$FINAL_STATE" = "unfinalized" ] || [ "$FINAL_STATE" = "vintf" ] || [ "$FINAL_STATE" = "sdk" ] ; then
|
||||
# ADB, Platform/Mainline SDKs build and move to prebuilts
|
||||
source $top/build/make/tools/finalization/localonly-steps.sh
|
||||
|
||||
|
@@ -7,8 +7,13 @@ function finalize_main_step1() {
|
||||
source $top/build/make/tools/finalization/environment.sh
|
||||
|
||||
if [ "$FINAL_STATE" = "unfinalized" ] ; then
|
||||
# VINTF finalization
|
||||
source $top/build/make/tools/finalization/finalize-vintf-resources.sh
|
||||
fi;
|
||||
|
||||
if [ "$FINAL_STATE" = "unfinalized" ] || [ "$FINAL_STATE" = "vintf" ] ; then
|
||||
# Build finalization artifacts.
|
||||
source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh
|
||||
source $top/build/make/tools/finalization/finalize-sdk-resources.sh
|
||||
fi;
|
||||
}
|
||||
|
||||
|
@@ -19,8 +19,14 @@ export FINAL_MAINLINE_EXTENSION='58'
|
||||
|
||||
# Options:
|
||||
# 'unfinalized' - branch is in development state,
|
||||
# 'sdk' - SDK/API is finalized
|
||||
# 'vintf' - VINTF is finalized
|
||||
# 'sdk' - VINTF and SDK/API are finalized
|
||||
# 'rel' - branch is finalized, switched to REL
|
||||
export FINAL_STATE='unfinalized'
|
||||
export FINAL_STATE='vintf'
|
||||
|
||||
export BUILD_FROM_SOURCE_STUB=true
|
||||
export BUILD_FROM_SOURCE_STUB=true
|
||||
|
||||
# FINAL versions for VINTF
|
||||
# TODO(b/323985297): The version must match with that from the release configuration.
|
||||
# Instead of hardcoding the version here, read it from a release configuration.
|
||||
export FINAL_BOARD_API_LEVEL='202404'
|
||||
|
@@ -40,9 +40,6 @@ function finalize_sdk_rel() {
|
||||
fi
|
||||
git -C "$top/cts" mv hostsidetests/theme/assets/${FINAL_PLATFORM_CODENAME} hostsidetests/theme/assets/${FINAL_PLATFORM_SDK_VERSION}
|
||||
|
||||
# system/sepolicy
|
||||
system/sepolicy/tools/finalize-sdk-rel.sh "$top" "$FINAL_PLATFORM_SDK_VERSION"
|
||||
|
||||
# prebuilts/abi-dumps/platform
|
||||
mkdir -p "$top/prebuilts/abi-dumps/platform/$FINAL_PLATFORM_SDK_VERSION"
|
||||
cp -r "$top/prebuilts/abi-dumps/platform/current/64/" "$top/prebuilts/abi-dumps/platform/$FINAL_PLATFORM_SDK_VERSION/"
|
||||
@@ -52,10 +49,6 @@ function finalize_sdk_rel() {
|
||||
# prebuilts/abi-dumps/ndk
|
||||
#mkdir -p "$top/prebuilts/abi-dumps/ndk/$FINAL_PLATFORM_SDK_VERSION"
|
||||
#cp -r "$top/prebuilts/abi-dumps/ndk/current/64/" "$top/prebuilts/abi-dumps/ndk/$FINAL_PLATFORM_SDK_VERSION/"
|
||||
#if [ "$FINAL_STATE" != "sdk" ] || [ "$FINAL_PLATFORM_CODENAME" == "$CURRENT_PLATFORM_CODENAME" ] ; then
|
||||
# prebuilts/abi-dumps/vndk
|
||||
#mv "$top/prebuilts/abi-dumps/vndk/$CURRENT_PLATFORM_CODENAME" "$top/prebuilts/abi-dumps/vndk/$FINAL_PLATFORM_SDK_VERSION"
|
||||
#fi;
|
||||
}
|
||||
|
||||
finalize_sdk_rel
|
||||
|
@@ -96,7 +96,7 @@ function bumpSdkExtensionsVersion() {
|
||||
$modules_arg
|
||||
}
|
||||
|
||||
function finalize_aidl_vndk_sdk_resources() {
|
||||
function finalize_sdk_resources() {
|
||||
local top="$(dirname "$0")"/../../../..
|
||||
source $top/build/make/tools/finalization/environment.sh
|
||||
|
||||
@@ -111,13 +111,6 @@ function finalize_aidl_vndk_sdk_resources() {
|
||||
# bionic/NDK
|
||||
finalize_bionic_ndk
|
||||
|
||||
# pre-finalization build target (trunk)
|
||||
local aidl_m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_RELEASE=trunk TARGET_BUILD_VARIANT=userdebug DIST_DIR=out/dist"
|
||||
AIDL_TRANSITIVE_FREEZE=true $aidl_m aidl-freeze-api
|
||||
|
||||
# TODO(b/309880485)
|
||||
# Add back create_reference_dumps and $top/build/make/target/product/gsi/current.txt
|
||||
|
||||
# Finalize SDK
|
||||
|
||||
# frameworks/libs/modules-utils
|
||||
@@ -129,10 +122,6 @@ function finalize_aidl_vndk_sdk_resources() {
|
||||
local build_tools_source="$top/development/sdk/build_tools_source.prop_template"
|
||||
sed -i -e 's/Pkg\.Revision.*/Pkg\.Revision=${PLATFORM_SDK_VERSION}.0.0/g' $build_tools_source
|
||||
|
||||
# build/make
|
||||
sed -i -e "s/sepolicy_major_vers := .*/sepolicy_major_vers := ${FINAL_PLATFORM_SDK_VERSION}/g" "$top/build/make/core/config.mk"
|
||||
cp "$top/build/make/target/product/gsi/current.txt" "$top/build/make/target/product/gsi/$FINAL_PLATFORM_SDK_VERSION.txt"
|
||||
|
||||
# build/soong
|
||||
local codename_version="\"${FINAL_PLATFORM_CODENAME}\": ${FINAL_PLATFORM_SDK_VERSION}"
|
||||
if ! grep -q "$codename_version" "$top/build/soong/android/api_levels.go" ; then
|
||||
@@ -179,5 +168,5 @@ function finalize_aidl_vndk_sdk_resources() {
|
||||
$sdk_m update-api
|
||||
}
|
||||
|
||||
finalize_aidl_vndk_sdk_resources
|
||||
finalize_sdk_resources
|
||||
|
60
tools/finalization/finalize-vintf-resources.sh
Executable file
60
tools/finalization/finalize-vintf-resources.sh
Executable file
@@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
function finalize_vintf_resources() {
|
||||
local top="$(dirname "$0")"/../../../..
|
||||
source $top/build/make/tools/finalization/environment.sh
|
||||
# environment needed to build dependencies and run scripts
|
||||
# These should remain the same for all steps here to speed up build time
|
||||
export ANDROID_BUILD_TOP="$top"
|
||||
export ANDROID_HOST_OUT="$ANDROID_BUILD_TOP/out/host/linux-x86"
|
||||
export ANDROID_PRODUCT_OUT="$ANDROID_BUILD_TOP/out/target/product/generic_arm64"
|
||||
export PATH="$PATH:$ANDROID_HOST_OUT/bin/"
|
||||
export TARGET_BUILD_VARIANT=userdebug
|
||||
export DIST_DIR=out/dist
|
||||
export TARGET_RELEASE=fina_0
|
||||
export TARGET_PRODUCT=aosp_arm64
|
||||
|
||||
# TODO(b/314010764): finalize LL_NDK
|
||||
|
||||
# system/sepolicy
|
||||
"$top/system/sepolicy/tools/finalize-vintf-resources.sh" "$top" "$FINAL_BOARD_API_LEVEL"
|
||||
|
||||
create_new_compat_matrix_and_kernel_configs
|
||||
|
||||
# pre-finalization build target (trunk)
|
||||
local aidl_m="$top/build/soong/soong_ui.bash --make-mode"
|
||||
AIDL_TRANSITIVE_FREEZE=true $aidl_m aidl-freeze-api
|
||||
}
|
||||
|
||||
function create_new_compat_matrix_and_kernel_configs() {
|
||||
# The compatibility matrix versions are bumped during vFRC
|
||||
# These will change every time we have a new vFRC
|
||||
local CURRENT_COMPATIBILITY_MATRIX_LEVEL='202404'
|
||||
local NEXT_COMPATIBILITY_MATRIX_LEVEL='202504'
|
||||
# The kernel configs need the letter of the Android release
|
||||
local CURRENT_RELEASE_LETTER='v'
|
||||
local NEXT_RELEASE_LETTER='w'
|
||||
|
||||
|
||||
# build the targets required before touching the Android.bp/Android.mk files
|
||||
local build_cmd="$top/build/soong/soong_ui.bash --make-mode"
|
||||
$build_cmd bpmodify
|
||||
|
||||
"$top/prebuilts/build-tools/path/linux-x86/python3" "$top/hardware/interfaces/compatibility_matrices/bump.py" "$CURRENT_COMPATIBILITY_MATRIX_LEVEL" "$NEXT_COMPATIBILITY_MATRIX_LEVEL" "$CURRENT_RELEASE_LETTER" "$NEXT_RELEASE_LETTER"
|
||||
|
||||
# Freeze the current framework manifest file. This relies on the
|
||||
# aosp_cf_x86_64-trunk_staging build target to get the right manifest
|
||||
# fragments installed.
|
||||
"$top/system/libhidl/vintfdata/freeze.sh" "$CURRENT_COMPATIBILITY_MATRIX_LEVEL"
|
||||
}
|
||||
|
||||
function freeze_framework_manifest() {
|
||||
ANDROID_PRODUCT_OUT=~/workspace/internal/main/out/target/product/vsoc_x86 ANDROID_BUILD_TOP=~/workspace/internal/main ANDROID_HOST_OUT=~/workspace/internal/main/out/host/linux-x86 ./freeze.sh 202404
|
||||
|
||||
}
|
||||
|
||||
|
||||
finalize_vintf_resources
|
||||
|
37
tools/finalization/step-0.sh
Executable file
37
tools/finalization/step-0.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2024 Google Inc. All rights reserved.
|
||||
|
||||
# Script to perform a 0th step of Android Finalization: VINTF finalization, create CLs and upload to Gerrit.
|
||||
|
||||
set -ex
|
||||
|
||||
function commit_step_0_changes() {
|
||||
set +e
|
||||
repo forall -c '\
|
||||
if [[ $(git status --short) ]]; then
|
||||
repo start "VINTF-$FINAL_BOARD_API_LEVEL-Finalization" ;
|
||||
git add -A . ;
|
||||
git commit -m "Vendor API level $FINAL_BOARD_API_LEVEL is now frozen" \
|
||||
-m "Ignore-AOSP-First: VINTF $FINAL_BOARD_API_LEVEL Finalization
|
||||
Bug: $FINAL_BUG_ID
|
||||
Test: build";
|
||||
repo upload --cbr --no-verify -o nokeycheck -t -y . ;
|
||||
fi'
|
||||
}
|
||||
|
||||
function finalize_step_0_main() {
|
||||
local top="$(dirname "$0")"/../../../..
|
||||
source $top/build/make/tools/finalization/environment.sh
|
||||
|
||||
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
|
||||
|
||||
source $top/build/make/tools/finalization/finalize-vintf-resources.sh
|
||||
|
||||
# move all changes to finalization branch/topic and upload to gerrit
|
||||
commit_step_0_changes
|
||||
|
||||
# build to confirm everything is OK
|
||||
AIDL_FROZEN_REL=true $m
|
||||
}
|
||||
|
||||
finalize_step_0_main
|
@@ -21,10 +21,9 @@ function finalize_step_1_main() {
|
||||
local top="$(dirname "$0")"/../../../..
|
||||
source $top/build/make/tools/finalization/environment.sh
|
||||
|
||||
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
|
||||
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
|
||||
|
||||
# vndk etc finalization
|
||||
source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh
|
||||
source $top/build/make/tools/finalization/finalize-sdk-resources.sh
|
||||
|
||||
# move all changes to finalization branch/topic and upload to gerrit
|
||||
commit_step_1_changes
|
||||
|
@@ -19,7 +19,7 @@ function finalize_step_2_main() {
|
||||
local top="$(dirname "$0")"/../../../..
|
||||
source $top/build/make/tools/finalization/environment.sh
|
||||
|
||||
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
|
||||
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
|
||||
|
||||
# prebuilts etc
|
||||
source $top/build/make/tools/finalization/finalize-sdk-rel.sh
|
||||
|
@@ -1,39 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Script to perform a 1st step of Android Finalization: API/SDK finalization, update CLs and upload to Gerrit.
|
||||
|
||||
# WIP, does not work yet
|
||||
exit 10
|
||||
|
||||
set -ex
|
||||
|
||||
function update_step_1_changes() {
|
||||
set +e
|
||||
repo forall -c '\
|
||||
if [[ $(git status --short) ]]; then
|
||||
git stash -u ;
|
||||
repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization" ;
|
||||
git stash pop ;
|
||||
git add -A . ;
|
||||
git commit --amend --no-edit ;
|
||||
repo upload --cbr --no-verify -o nokeycheck -t -y . ;
|
||||
fi'
|
||||
}
|
||||
|
||||
function update_step_1_main() {
|
||||
local top="$(dirname "$0")"/../../../..
|
||||
source $top/build/make/tools/finalization/environment.sh
|
||||
|
||||
|
||||
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
|
||||
|
||||
# vndk etc finalization
|
||||
source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh
|
||||
|
||||
# update existing CLs and upload to gerrit
|
||||
update_step_1_changes
|
||||
|
||||
# build to confirm everything is OK
|
||||
AIDL_FROZEN_REL=true $m
|
||||
}
|
||||
|
||||
update_step_1_main
|
@@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Script to perform a 2nd step of Android Finalization: REL finalization, create CLs and upload to Gerrit.
|
||||
|
||||
# WIP, does not work yet
|
||||
exit 10
|
||||
|
||||
set -ex
|
||||
|
||||
function update_step_2_changes() {
|
||||
set +e
|
||||
repo forall -c '\
|
||||
if [[ $(git status --short) ]]; then
|
||||
git stash -u ;
|
||||
repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization-Rel" ;
|
||||
git stash pop ;
|
||||
git add -A . ;
|
||||
git commit --amend --no-edit ;
|
||||
repo upload --cbr --no-verify -o nokeycheck -t -y . ;
|
||||
fi'
|
||||
}
|
||||
|
||||
function update_step_2_main() {
|
||||
local top="$(dirname "$0")"/../../../..
|
||||
source $top/build/make/tools/finalization/environment.sh
|
||||
|
||||
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
|
||||
|
||||
# prebuilts etc
|
||||
source $top/build/make/tools/finalization/finalize-sdk-rel.sh
|
||||
|
||||
# move all changes to finalization branch/topic and upload to gerrit
|
||||
update_step_2_changes
|
||||
|
||||
# build to confirm everything is OK
|
||||
AIDL_FROZEN_REL=true $m
|
||||
}
|
||||
|
||||
update_step_2_main
|
Reference in New Issue
Block a user