From 4a39d20909185a87dcf673bc966a45cb49125449 Mon Sep 17 00:00:00 2001 From: Justin Yun Date: Thu, 5 Oct 2023 10:17:39 +0900 Subject: [PATCH] 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 --- target/product/gsi/Android.mk | 37 +++++++++++++++-------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/target/product/gsi/Android.mk b/target/product/gsi/Android.mk index 70ee78db75..655a66622f 100644 --- a/target/product/gsi/Android.mk +++ b/target/product/gsi/Android.mk @@ -1,33 +1,23 @@ LOCAL_PATH:= $(call my-dir) -# VNDK will not be frozen if the PLATFORM_VNDK_VERSION is a codename or greater than 34 -ifeq ($(call math_is_number,$(PLATFORM_VNDK_VERSION)),) -UNFROZEN_VNDK := true -else -ifeq ($(call math_gt,$(PLATFORM_VNDK_VERSION),34),true) -UNFROZEN_VNDK := true -endif -endif - ##################################################################### # list of vndk libraries from the source code. INTERNAL_VNDK_LIB_LIST := $(SOONG_VNDK_LIBRARIES_FILE) ##################################################################### # This is the up-to-date list of vndk libs. -# TODO(b/62012285): the lib list should be stored somewhere under -# /prebuilts/vndk +LATEST_VNDK_LIB_LIST := $(LOCAL_PATH)/current.txt +UNFROZEN_VNDK := ifeq (REL,$(PLATFORM_VERSION_CODENAME)) -ifndef UNFROZEN_VNDK -LATEST_VNDK_LIB_LIST := $(LOCAL_PATH)/$(PLATFORM_VNDK_VERSION).txt -ifeq ($(wildcard $(LATEST_VNDK_LIB_LIST)),) -$(error $(LATEST_VNDK_LIB_LIST) file not found. Please copy "$(LOCAL_PATH)/current.txt" to "$(LATEST_VNDK_LIB_LIST)" and commit a CL for release branch) -endif -else # UNFROZEN_VNDK -LATEST_VNDK_LIB_LIST := $(LOCAL_PATH)/current.txt -endif # UNFROZEN_VNDK -else -LATEST_VNDK_LIB_LIST := $(LOCAL_PATH)/current.txt + # Use frozen vndk lib list only if "34 >= PLATFORM_VNDK_VERSION" + ifeq ($(call math_gt_or_eq,34,$(PLATFORM_VNDK_VERSION)),true) + LATEST_VNDK_LIB_LIST := $(LOCAL_PATH)/$(PLATFORM_VNDK_VERSION).txt + ifeq ($(wildcard $(LATEST_VNDK_LIB_LIST)),) + $(error $(LATEST_VNDK_LIB_LIST) file not found. Please copy "$(LOCAL_PATH)/current.txt" to "$(LATEST_VNDK_LIB_LIST)" and commit a CL for release branch) + endif + else + UNFROZEN_VNDK := true + endif endif ##################################################################### @@ -198,6 +188,11 @@ LOCAL_REQUIRED_MODULES += \ $(VNDK_USING_CORE_VARIANT_LIBRARIES) \ com.android.vndk.current +# Install VNDK apex on vendor partition if VNDK is unfrozen +ifdef UNFROZEN_VNDK +LOCAL_REQUIRED_MODULES += com.android.vndk.current.on_vendor +endif + LOCAL_ADDITIONAL_DEPENDENCIES += $(call module-built-files,\ $(addsuffix .vendor,$(VNDK_CORE_LIBRARIES) $(VNDK_SAMEPROCESS_LIBRARIES)))