Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e67573e5 authored by Kiyoung Kim's avatar Kiyoung Kim Committed by Automerger Merge Worker
Browse files

Merge "Remove BOARD_VNDK_VERSION usage from Kati" into main am: 665827ea

parents c4ce1bd8 665827ea
Loading
Loading
Loading
Loading
+0 −12
Original line number Original line Diff line number Diff line
@@ -57,18 +57,6 @@ else
  KEEP_VNDK ?= true
  KEEP_VNDK ?= true
endif
endif


ifeq ($(KEEP_VNDK),true)
  # Starting in Android U, non-VNDK devices not supported
  # WARNING: DO NOT CHANGE: if you are downstream of AOSP, and you change this, without
  # letting upstream know it's important to you, we may do cleanup which breaks this
  # significantly. Please let us know if you are changing this.
  ifndef BOARD_VNDK_VERSION
  # READ WARNING - DO NOT CHANGE
  BOARD_VNDK_VERSION := current
  # READ WARNING - DO NOT CHANGE
  endif
endif

# ---------------------------------------------------------------
# ---------------------------------------------------------------
# Set up version information
# Set up version information
include $(BUILD_SYSTEM)/version_util.mk
include $(BUILD_SYSTEM)/version_util.mk
+1 −2
Original line number Original line Diff line number Diff line
@@ -1222,8 +1222,7 @@ endef
# Returns modules included automatically as a result of certain BoardConfig
# Returns modules included automatically as a result of certain BoardConfig
# variables being set.
# variables being set.
define auto-included-modules
define auto-included-modules
  $(if $(and $(BOARD_VNDK_VERSION),$(filter true,$(KEEP_VNDK))),vndk_package) \
  llndk_in_system \
  $(if $(filter true,$(KEEP_VNDK)),,llndk_in_system) \
  $(if $(DEVICE_MANIFEST_FILE),vendor_manifest.xml) \
  $(if $(DEVICE_MANIFEST_FILE),vendor_manifest.xml) \
  $(if $(DEVICE_MANIFEST_SKUS),$(foreach sku, $(DEVICE_MANIFEST_SKUS),vendor_manifest_$(sku).xml)) \
  $(if $(DEVICE_MANIFEST_SKUS),$(foreach sku, $(DEVICE_MANIFEST_SKUS),vendor_manifest_$(sku).xml)) \
  $(if $(ODM_MANIFEST_FILES),odm_manifest.xml) \
  $(if $(ODM_MANIFEST_FILES),odm_manifest.xml) \
+0 −4
Original line number Original line Diff line number Diff line
@@ -152,10 +152,6 @@ $(call add_json_bool, ArtUseReadBarrier, $(call invert_bool,$(fi
$(call add_json_str,  BtConfigIncludeDir,                $(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR))
$(call add_json_str,  BtConfigIncludeDir,                $(BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR))
$(call add_json_list, DeviceKernelHeaders,               $(TARGET_DEVICE_KERNEL_HEADERS) $(TARGET_BOARD_KERNEL_HEADERS) $(TARGET_PRODUCT_KERNEL_HEADERS))
$(call add_json_list, DeviceKernelHeaders,               $(TARGET_DEVICE_KERNEL_HEADERS) $(TARGET_BOARD_KERNEL_HEADERS) $(TARGET_PRODUCT_KERNEL_HEADERS))
$(call add_json_str,  VendorApiLevel,                    $(BOARD_API_LEVEL))
$(call add_json_str,  VendorApiLevel,                    $(BOARD_API_LEVEL))
ifeq ($(KEEP_VNDK),true)
$(call add_json_str,  DeviceVndkVersion,                 $(BOARD_VNDK_VERSION))
$(call add_json_str,  Platform_vndk_version,             $(PLATFORM_VNDK_VERSION))
endif
$(call add_json_list, ExtraVndkVersions,                 $(PRODUCT_EXTRA_VNDK_VERSIONS))
$(call add_json_list, ExtraVndkVersions,                 $(PRODUCT_EXTRA_VNDK_VERSIONS))
$(call add_json_list, DeviceSystemSdkVersions,           $(BOARD_SYSTEMSDK_VERSIONS))
$(call add_json_list, DeviceSystemSdkVersions,           $(BOARD_SYSTEMSDK_VERSIONS))
$(call add_json_str,  RecoverySnapshotVersion,           $(RECOVERY_SNAPSHOT_VERSION))
$(call add_json_str,  RecoverySnapshotVersion,           $(RECOVERY_SNAPSHOT_VERSION))
+0 −5
Original line number Original line Diff line number Diff line
@@ -24,11 +24,6 @@ BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
# the devices with metadata parition
# the devices with metadata parition
BOARD_USES_METADATA_PARTITION := true
BOARD_USES_METADATA_PARTITION := true


ifeq ($(KEEP_VNDK),true)
# Default is current, but allow devices to override vndk version if needed.
BOARD_VNDK_VERSION ?= current
endif

# 64 bit mediadrmserver
# 64 bit mediadrmserver
TARGET_ENABLE_MEDIADRM_64 := true
TARGET_ENABLE_MEDIADRM_64 := true


+10 −117
Original line number Original line Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
LOCAL_PATH:= $(call my-dir)


#####################################################################
# list of vndk libraries from the source code.
INTERNAL_VNDK_LIB_LIST := $(SOONG_VNDK_LIBRARIES_FILE)

#####################################################################
#####################################################################
# Check the generate list against the latest list stored in the
# Check the generate list against the latest list stored in the
# source tree
# source tree
.PHONY: check-vndk-list
.PHONY: check-abi-dump-list


# Check if vndk list is changed
# Check if vndk list is changed
droidcore: check-vndk-list
droidcore: check-abi-dump-list


check-vndk-list-timestamp := $(call intermediates-dir-for,PACKAGING,vndk)/check-list-timestamp
check-vndk-abi-dump-list-timestamp := $(call intermediates-dir-for,PACKAGING,vndk)/check-abi-dump-list-timestamp
check-vndk-abi-dump-list-timestamp := $(call intermediates-dir-for,PACKAGING,vndk)/check-abi-dump-list-timestamp


ifeq ($(TARGET_IS_64_BIT)|$(TARGET_2ND_ARCH),true|)
# TODO(b/110429754) remove this condition when we support 64-bit-only device
check-vndk-list: ;
else ifeq ($(TARGET_SKIP_CURRENT_VNDK),true)
check-vndk-list: ;
else ifeq ($(BOARD_VNDK_VERSION),)
check-vndk-list: ;
else
check-vndk-list: $(check-vndk-list-timestamp)
ifneq ($(SKIP_ABI_CHECKS),true)
ifneq ($(SKIP_ABI_CHECKS),true)
check-vndk-list: $(check-vndk-abi-dump-list-timestamp)
check-abi-dump-list: $(check-abi-dump-list-timestamp)
endif
endif

_vndk_check_failure_message := " error: VNDK library list has been changed.\n"
ifeq (REL,$(PLATFORM_VERSION_CODENAME))
_vndk_check_failure_message += "       Changing the VNDK library list is not allowed in API locked branches."
else
_vndk_check_failure_message += "       Run \`update-vndk-list.sh\` to update $(LATEST_VNDK_LIB_LIST)"
endif

# The *-ndk_platform.so libraries no longer exist and are removed from the VNDK set. However, they
# can exist if NEED_AIDL_NDK_PLATFORM_BACKEND is set to true for legacy devices. Don't be bothered
# with the extraneous libraries.
ifeq ($(NEED_AIDL_NDK_PLATFORM_BACKEND),true)
	_READ_INTERNAL_VNDK_LIB_LIST := sed /ndk_platform.so/d $(INTERNAL_VNDK_LIB_LIST)
else
	_READ_INTERNAL_VNDK_LIB_LIST := cat $(INTERNAL_VNDK_LIB_LIST)
endif
endif


$(check-vndk-list-timestamp): $(INTERNAL_VNDK_LIB_LIST) $(LATEST_VNDK_LIB_LIST) $(HOST_OUT_EXECUTABLES)/update-vndk-list.sh
	$(hide) ($(_READ_INTERNAL_VNDK_LIB_LIST) | sort | \
	diff --old-line-format="Removed %L" \
	  --new-line-format="Added %L" \
	  --unchanged-line-format="" \
	  <(cat $(LATEST_VNDK_LIB_LIST) | sort) - \
	  || ( echo -e $(_vndk_check_failure_message); exit 1 ))
	$(hide) mkdir -p $(dir $@)
	$(hide) touch $@

#####################################################################
# Script to update the latest VNDK lib list
include $(CLEAR_VARS)
LOCAL_MODULE := update-vndk-list.sh
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
LOCAL_LICENSE_CONDITIONS := notice
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_MODULE_STEM := $(LOCAL_MODULE)
LOCAL_IS_HOST_MODULE := true
include $(BUILD_SYSTEM)/base_rules.mk
$(LOCAL_BUILT_MODULE): PRIVATE_INTERNAL_VNDK_LIB_LIST := $(INTERNAL_VNDK_LIB_LIST)
$(LOCAL_BUILT_MODULE): PRIVATE_LATEST_VNDK_LIB_LIST := $(LATEST_VNDK_LIB_LIST)
$(LOCAL_BUILT_MODULE):
	@echo "Generate: $@"
	@mkdir -p $(dir $@)
	@rm -f $@
	$(hide) echo "#!/bin/bash" > $@
ifeq (REL,$(PLATFORM_VERSION_CODENAME))
	$(hide) echo "echo Updating VNDK library list is NOT allowed in API locked branches." >> $@; \
	        echo "exit 1" >> $@
else
	$(hide) echo "if [ -z \"\$${ANDROID_BUILD_TOP}\" ]; then" >> $@; \
	        echo "  echo Run lunch or choosecombo first" >> $@; \
	        echo "  exit 1" >> $@; \
	        echo "fi" >> $@; \
	        echo "cd \$${ANDROID_BUILD_TOP}" >> $@
ifeq ($(NEED_AIDL_NDK_PLATFORM_BACKEND),true)
	$(hide) echo "sed /ndk_platform.so/d $(PRIVATE_INTERNAL_VNDK_LIB_LIST) > $(PRIVATE_LATEST_VNDK_LIB_LIST)" >> $@
else
	$(hide) echo "cp $(PRIVATE_INTERNAL_VNDK_LIB_LIST) $(PRIVATE_LATEST_VNDK_LIB_LIST)" >> $@
endif
	$(hide) echo "echo $(PRIVATE_LATEST_VNDK_LIB_LIST) updated." >> $@
endif
	@chmod a+x $@

#####################################################################
#####################################################################
# ABI reference dumps.
# ABI reference dumps.


@@ -142,15 +65,13 @@ define filter-abi-dump-names
$(notdir $(call filter-abi-dump-paths,$(1),$(2)))
$(notdir $(call filter-abi-dump-paths,$(1),$(2)))
endef
endef



VNDK_ABI_DUMP_DIR := prebuilts/abi-dumps/vndk/$(RELEASE_BOARD_API_LEVEL)
ifeq (REL,$(PLATFORM_VERSION_CODENAME))
ifeq (REL,$(PLATFORM_VERSION_CODENAME))
    NDK_ABI_DUMP_DIR := prebuilts/abi-dumps/ndk/$(PLATFORM_SDK_VERSION)
    PLATFORM_ABI_DUMP_DIR := prebuilts/abi-dumps/platform/$(PLATFORM_SDK_VERSION)
    PLATFORM_ABI_DUMP_DIR := prebuilts/abi-dumps/platform/$(PLATFORM_SDK_VERSION)
else
else
    NDK_ABI_DUMP_DIR := prebuilts/abi-dumps/ndk/current
    PLATFORM_ABI_DUMP_DIR := prebuilts/abi-dumps/platform/current
    PLATFORM_ABI_DUMP_DIR := prebuilts/abi-dumps/platform/current
endif
endif
NDK_ABI_DUMPS := $(call find-abi-dump-paths,$(NDK_ABI_DUMP_DIR))
VNDK_ABI_DUMPS := $(call find-abi-dump-paths,$(VNDK_ABI_DUMP_DIR))
PLATFORM_ABI_DUMPS := $(call find-abi-dump-paths,$(PLATFORM_ABI_DUMP_DIR))
PLATFORM_ABI_DUMPS := $(call find-abi-dump-paths,$(PLATFORM_ABI_DUMP_DIR))


# Check for superfluous lsdump files. Since LSDUMP_PATHS only covers the
# Check for superfluous lsdump files. Since LSDUMP_PATHS only covers the
@@ -158,22 +79,15 @@ PLATFORM_ABI_DUMPS := $(call find-abi-dump-paths,$(PLATFORM_ABI_DUMP_DIR))
# Mainline modules may be in use, we also allow the libs in STUB_LIBRARIES for
# Mainline modules may be in use, we also allow the libs in STUB_LIBRARIES for
# NDK and platform ABIs.
# NDK and platform ABIs.


$(check-vndk-abi-dump-list-timestamp): PRIVATE_LSDUMP_PATHS := $(LSDUMP_PATHS)
$(check-abi-dump-list-timestamp): PRIVATE_LSDUMP_PATHS := $(LSDUMP_PATHS)
$(check-vndk-abi-dump-list-timestamp): PRIVATE_STUB_LIBRARIES := $(STUB_LIBRARIES)
$(check-abi-dump-list-timestamp): PRIVATE_STUB_LIBRARIES := $(STUB_LIBRARIES)
$(check-vndk-abi-dump-list-timestamp):
$(check-abi-dump-list-timestamp):
	$(eval added_vndk_abi_dumps := $(strip $(sort $(filter-out \
	$(eval added_vndk_abi_dumps := $(strip $(sort $(filter-out \
	  $(call filter-abi-dump-names,LLNDK VNDK-SP VNDK-core,$(PRIVATE_LSDUMP_PATHS)), \
	  $(call filter-abi-dump-names,LLNDK,$(PRIVATE_LSDUMP_PATHS)), \
	  $(notdir $(VNDK_ABI_DUMPS))))))
	  $(notdir $(VNDK_ABI_DUMPS))))))
	$(if $(added_vndk_abi_dumps), \
	$(if $(added_vndk_abi_dumps), \
	  echo -e "Found unexpected ABI reference dump files under $(VNDK_ABI_DUMP_DIR). It is caused by mismatch between Android.bp and the dump files. Run \`find \$${ANDROID_BUILD_TOP}/$(VNDK_ABI_DUMP_DIR) '(' -name $(subst $(space), -or -name ,$(added_vndk_abi_dumps)) ')' -delete\` to delete the dump files.")
	  echo -e "Found unexpected ABI reference dump files under $(VNDK_ABI_DUMP_DIR). It is caused by mismatch between Android.bp and the dump files. Run \`find \$${ANDROID_BUILD_TOP}/$(VNDK_ABI_DUMP_DIR) '(' -name $(subst $(space), -or -name ,$(added_vndk_abi_dumps)) ')' -delete\` to delete the dump files.")


	$(eval added_ndk_abi_dumps := $(strip $(sort $(filter-out \
	  $(call filter-abi-dump-names,NDK,$(PRIVATE_LSDUMP_PATHS)) \
	  $(addsuffix .lsdump,$(PRIVATE_STUB_LIBRARIES)), \
	  $(notdir $(NDK_ABI_DUMPS))))))
	$(if $(added_ndk_abi_dumps), \
	  echo -e "Found unexpected ABI reference dump files under $(NDK_ABI_DUMP_DIR). It is caused by mismatch between Android.bp and the dump files. Run \`find \$${ANDROID_BUILD_TOP}/$(NDK_ABI_DUMP_DIR) '(' -name $(subst $(space), -or -name ,$(added_ndk_abi_dumps)) ')' -delete\` to delete the dump files.")

	# TODO(b/314010764): Remove LLNDK tag after PLATFORM_SDK_VERSION is upgraded to 35.
	# TODO(b/314010764): Remove LLNDK tag after PLATFORM_SDK_VERSION is upgraded to 35.
	$(eval added_platform_abi_dumps := $(strip $(sort $(filter-out \
	$(eval added_platform_abi_dumps := $(strip $(sort $(filter-out \
	  $(call filter-abi-dump-names,LLNDK PLATFORM,$(PRIVATE_LSDUMP_PATHS)) \
	  $(call filter-abi-dump-names,LLNDK PLATFORM,$(PRIVATE_LSDUMP_PATHS)) \
@@ -182,34 +96,13 @@ $(check-vndk-abi-dump-list-timestamp):
	$(if $(added_platform_abi_dumps), \
	$(if $(added_platform_abi_dumps), \
	  echo -e "Found unexpected ABI reference dump files under $(PLATFORM_ABI_DUMP_DIR). It is caused by mismatch between Android.bp and the dump files. Run \`find \$${ANDROID_BUILD_TOP}/$(PLATFORM_ABI_DUMP_DIR) '(' -name $(subst $(space), -or -name ,$(added_platform_abi_dumps)) ')' -delete\` to delete the dump files.")
	  echo -e "Found unexpected ABI reference dump files under $(PLATFORM_ABI_DUMP_DIR). It is caused by mismatch between Android.bp and the dump files. Run \`find \$${ANDROID_BUILD_TOP}/$(PLATFORM_ABI_DUMP_DIR) '(' -name $(subst $(space), -or -name ,$(added_platform_abi_dumps)) ')' -delete\` to delete the dump files.")


	$(if $(added_vndk_abi_dumps)$(added_ndk_abi_dumps)$(added_platform_abi_dumps),exit 1)
	$(if $(added_vndk_abi_dumps)$(added_platform_abi_dumps),exit 1)
	$(hide) mkdir -p $(dir $@)
	$(hide) mkdir -p $(dir $@)
	$(hide) touch $@
	$(hide) touch $@


#####################################################################
#####################################################################
# VNDK package and snapshot.
# VNDK package and snapshot.


include $(CLEAR_VARS)
LOCAL_MODULE := vndk_package
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
LOCAL_LICENSE_CONDITIONS := notice
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
# Filter LLNDK libs moved to APEX to avoid pulling them into /system/LIB
LOCAL_REQUIRED_MODULES := llndk_in_system

ifneq ($(TARGET_SKIP_CURRENT_VNDK),true)
LOCAL_REQUIRED_MODULES += \
    vndkcorevariant.libraries.txt \
    $(addsuffix .vendor,$(VNDK_CORE_LIBRARIES)) \
    $(addsuffix .vendor,$(VNDK_SAMEPROCESS_LIBRARIES)) \
    $(VNDK_USING_CORE_VARIANT_LIBRARIES)

LOCAL_ADDITIONAL_DEPENDENCIES += $(call module-built-files,\
    $(addsuffix .vendor,$(VNDK_CORE_LIBRARIES) $(VNDK_SAMEPROCESS_LIBRARIES)))

endif
include $(BUILD_PHONY_PACKAGE)

include $(CLEAR_VARS)
include $(CLEAR_VARS)


LOCAL_MODULE := vndk_apex_snapshot_package
LOCAL_MODULE := vndk_apex_snapshot_package