blob: ca61890ec387f577079e77751220e33b6f006e92 [file] [log] [blame]
Steven Moreland0f84e4b2023-12-16 02:51:26 +00001#!/bin/bash
2
3set -ex
4
5function finalize_vintf_resources() {
6 local top="$(dirname "$0")"/../../../..
7 source $top/build/make/tools/finalization/environment.sh
Devin Moorebdc54ad2024-02-09 23:18:55 +00008 # environment needed to build dependencies and run scripts
9 # These should remain the same for all steps here to speed up build time
10 export ANDROID_BUILD_TOP="$top"
11 export ANDROID_HOST_OUT="$ANDROID_BUILD_TOP/out/host/linux-x86"
12 export ANDROID_PRODUCT_OUT="$ANDROID_BUILD_TOP/out/target/product/generic_arm64"
13 export PATH="$PATH:$ANDROID_HOST_OUT/bin/"
14 export TARGET_BUILD_VARIANT=userdebug
15 export DIST_DIR=out/dist
16 export TARGET_RELEASE=fina_0
17 export TARGET_PRODUCT=aosp_arm64
Steven Moreland0f84e4b2023-12-16 02:51:26 +000018
19 # TODO(b/314010764): finalize LL_NDK
Inseob Kim9d5066b2024-01-19 21:28:09 +090020
21 # system/sepolicy
22 system/sepolicy/tools/finalize-vintf-resources.sh "$top" "$FINAL_BOARD_API_LEVEL"
Steven Moreland0f84e4b2023-12-16 02:51:26 +000023
Devin Moore56f8a772024-02-02 01:06:45 +000024 create_new_compat_matrix_and_kernel_configs
Devin Moorea1339af2024-01-11 23:51:22 +000025
Steven Moreland0f84e4b2023-12-16 02:51:26 +000026 # pre-finalization build target (trunk)
Devin Moorebdc54ad2024-02-09 23:18:55 +000027 local aidl_m="$top/build/soong/soong_ui.bash --make-mode"
Steven Moreland0f84e4b2023-12-16 02:51:26 +000028 AIDL_TRANSITIVE_FREEZE=true $aidl_m aidl-freeze-api
Steven Moreland0f84e4b2023-12-16 02:51:26 +000029}
30
Devin Moore56f8a772024-02-02 01:06:45 +000031function create_new_compat_matrix_and_kernel_configs() {
Devin Moorea1339af2024-01-11 23:51:22 +000032 # The compatibility matrix versions are bumped during vFRC
33 # These will change every time we have a new vFRC
Devin Moore56f8a772024-02-02 01:06:45 +000034 local CURRENT_COMPATIBILITY_MATRIX_LEVEL='202404'
35 local NEXT_COMPATIBILITY_MATRIX_LEVEL='202504'
36 # The kernel configs need the letter of the Android release
37 local CURRENT_RELEASE_LETTER='v'
38 local NEXT_RELEASE_LETTER='w'
Devin Moorea1339af2024-01-11 23:51:22 +000039
Devin Moorebdc54ad2024-02-09 23:18:55 +000040
Devin Moorea1339af2024-01-11 23:51:22 +000041 # build the targets required before touching the Android.bp/Android.mk files
Devin Moorebdc54ad2024-02-09 23:18:55 +000042 local build_cmd="$top/build/soong/soong_ui.bash --make-mode"
Devin Moorea1339af2024-01-11 23:51:22 +000043 $build_cmd bpmodify
Devin Moorea1339af2024-01-11 23:51:22 +000044
Devin Moorebdc54ad2024-02-09 23:18:55 +000045 "$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"
46
47 # Freeze the current framework manifest file. This relies on the
48 # aosp_cf_x86_64-trunk_staging build target to get the right manifest
49 # fragments installed.
50 "$top/system/libhidl/vintfdata/freeze.sh" "$CURRENT_COMPATIBILITY_MATRIX_LEVEL"
Devin Moorea1339af2024-01-11 23:51:22 +000051}
52
Devin Moorebdc54ad2024-02-09 23:18:55 +000053function freeze_framework_manifest() {
54 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
55
56}
57
58
Steven Moreland0f84e4b2023-12-16 02:51:26 +000059finalize_vintf_resources
60