blob: 55c06bc6f731786ca4862148951a84b59e3047fe [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
8
9 # TODO(b/314010764): finalize LL_NDK
Inseob Kim9d5066b2024-01-19 21:28:09 +090010
11 # system/sepolicy
12 system/sepolicy/tools/finalize-vintf-resources.sh "$top" "$FINAL_BOARD_API_LEVEL"
Steven Moreland0f84e4b2023-12-16 02:51:26 +000013
Devin Moore56f8a772024-02-02 01:06:45 +000014 create_new_compat_matrix_and_kernel_configs
Devin Moorea1339af2024-01-11 23:51:22 +000015
Steven Moreland0f84e4b2023-12-16 02:51:26 +000016 # pre-finalization build target (trunk)
Justin Yun7c28c232024-01-31 16:56:10 +090017 local aidl_m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_RELEASE=fina_0 TARGET_BUILD_VARIANT=userdebug DIST_DIR=out/dist"
Steven Moreland0f84e4b2023-12-16 02:51:26 +000018 AIDL_TRANSITIVE_FREEZE=true $aidl_m aidl-freeze-api
Steven Moreland0f84e4b2023-12-16 02:51:26 +000019}
20
Devin Moore56f8a772024-02-02 01:06:45 +000021function create_new_compat_matrix_and_kernel_configs() {
Devin Moorea1339af2024-01-11 23:51:22 +000022 # The compatibility matrix versions are bumped during vFRC
23 # These will change every time we have a new vFRC
Devin Moore56f8a772024-02-02 01:06:45 +000024 local CURRENT_COMPATIBILITY_MATRIX_LEVEL='202404'
25 local NEXT_COMPATIBILITY_MATRIX_LEVEL='202504'
26 # The kernel configs need the letter of the Android release
27 local CURRENT_RELEASE_LETTER='v'
28 local NEXT_RELEASE_LETTER='w'
Devin Moorea1339af2024-01-11 23:51:22 +000029
30 # build the targets required before touching the Android.bp/Android.mk files
Justin Yun7c28c232024-01-31 16:56:10 +090031 local build_cmd="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_RELEASE=fina_0 TARGET_BUILD_VARIANT=userdebug DIST_DIR=out/dist"
Devin Moorea1339af2024-01-11 23:51:22 +000032 $build_cmd bpmodify
Devin Moorea1339af2024-01-11 23:51:22 +000033
Devin Moore56f8a772024-02-02 01:06:45 +000034 ANDROID_BUILD_TOP="$top" PATH="$PATH:$top/out/host/linux-x86/bin/" "$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"
Devin Moorea1339af2024-01-11 23:51:22 +000035}
36
Steven Moreland0f84e4b2023-12-16 02:51:26 +000037finalize_vintf_resources
38