diff options
Diffstat (limited to 'tools/finalization/finalize-vintf-resources.sh')
-rwxr-xr-x | tools/finalization/finalize-vintf-resources.sh | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/tools/finalization/finalize-vintf-resources.sh b/tools/finalization/finalize-vintf-resources.sh index 45efc104db..9660e3fc8c 100755 --- a/tools/finalization/finalize-vintf-resources.sh +++ b/tools/finalization/finalize-vintf-resources.sh @@ -3,6 +3,21 @@ set -ex function finalize_vintf_resources() { + if [ $# -gt 1 ]; then + echo "No argument or '--steps_for_build_test_only' is allowed" + exit 1 + fi + if [ $# -eq 1 ]; then + if [ "$1" == "--steps_for_build_test_only" ]; then + echo "This is only to verify building a target." + echo "Skip LLNDK ABI dump and VINTF check." + local build_test_only=true + else + echo "Unknown argument $1" + exit 1 + fi + fi + local top="$(dirname "$0")"/../../../.. source $top/build/make/tools/finalization/environment.sh # environment needed to build dependencies and run scripts @@ -26,37 +41,30 @@ function finalize_vintf_resources() { # 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 create_reference_dumps - # Generate LLNDK ABI dumps - # This command depends on ANDROID_BUILD_TOP - "$ANDROID_HOST_OUT/bin/create_reference_dumps" -release "$TARGET_RELEASE" --build-variant "$TARGET_BUILD_VARIANT" --lib-variant LLNDK + finalize_compat_matrix $build_test_only + + if ! [ "$build_test_only" = "true" ]; then + # Generate LLNDK ABI dumps + # This command depends on ANDROID_BUILD_TOP + "$ANDROID_HOST_OUT/bin/create_reference_dumps" -release "$TARGET_RELEASE" --build-variant "$TARGET_BUILD_VARIANT" --lib-variant LLNDK + fi } -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 +function finalize_compat_matrix() { + local build_test_only=$1 local CURRENT_COMPATIBILITY_MATRIX_LEVEL="$FINAL_BOARD_API_LEVEL" - local NEXT_COMPATIBILITY_MATRIX_LEVEL="$FINAL_NEXT_BOARD_API_LEVEL" - # The kernel configs need the letter of the Android release - local CURRENT_RELEASE_LETTER="$FINAL_CORRESPONDING_VERSION_LETTER" - local NEXT_RELEASE_LETTER="$FINAL_NEXT_CORRESPONDING_VERSION_LETTER" - - # 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/finalize.py" "$CURRENT_COMPATIBILITY_MATRIX_LEVEL" - "$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" "$FINAL_CORRESPONDING_PLATFORM_VERSION" - - # 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" + if ! [ "$build_test_only" = "true" ]; then + # Freeze the current framework manifest file. This relies on the + # interfaces already being frozen because we are building with fina_0 which + # inherits from `next` where RELEASE_AIDL_USE_UNFROZEN=false + "$top/system/libhidl/vintfdata/freeze.sh" "$CURRENT_COMPATIBILITY_MATRIX_LEVEL" + fi } function freeze_framework_manifest() { @@ -65,5 +73,5 @@ function freeze_framework_manifest() { } -finalize_vintf_resources +finalize_vintf_resources $@ |