2009-03-04 04:28:42 +01:00
|
|
|
#
|
|
|
|
# Set up product-global definitions and include product-specific rules.
|
|
|
|
#
|
|
|
|
|
2017-04-04 22:01:18 +02:00
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
|
2010-09-15 20:59:33 +02:00
|
|
|
-include $(TARGET_DEVICE_DIR)/AndroidBoard.mk
|
2009-03-04 04:28:42 +01:00
|
|
|
|
|
|
|
# Generate a file that contains various information about the
|
|
|
|
# device we're building for. This file is typically packaged up
|
|
|
|
# with everything else.
|
|
|
|
#
|
2012-01-19 19:43:49 +01:00
|
|
|
# If TARGET_BOARD_INFO_FILE (which can be set in BoardConfig.mk) is
|
|
|
|
# defined, it is used, otherwise board-info.txt is looked for in
|
|
|
|
# $(TARGET_DEVICE_DIR).
|
2009-03-04 04:28:42 +01:00
|
|
|
#
|
|
|
|
INSTALLED_ANDROID_INFO_TXT_TARGET := $(PRODUCT_OUT)/android-info.txt
|
2011-06-14 02:36:08 +02:00
|
|
|
board_info_txt := $(TARGET_BOARD_INFO_FILE)
|
2012-01-19 19:43:49 +01:00
|
|
|
ifndef board_info_txt
|
|
|
|
board_info_txt := $(wildcard $(TARGET_DEVICE_DIR)/board-info.txt)
|
2011-06-14 02:36:08 +02:00
|
|
|
endif
|
2019-06-11 01:39:45 +02:00
|
|
|
$(INSTALLED_ANDROID_INFO_TXT_TARGET): $(board_info_txt) build/make/tools/check_radio_versions.py
|
2017-12-06 23:38:40 +01:00
|
|
|
$(hide) build/make/tools/check_radio_versions.py $< $(BOARD_INFO_CHECK)
|
2009-03-04 04:28:42 +01:00
|
|
|
$(call pretty,"Generated: ($@)")
|
|
|
|
ifdef board_info_txt
|
2012-01-19 19:43:49 +01:00
|
|
|
$(hide) grep -v '#' $< > $@
|
2021-06-03 11:54:31 +02:00
|
|
|
else ifdef TARGET_BOOTLOADER_BOARD_NAME
|
2009-11-25 22:43:25 +01:00
|
|
|
$(hide) echo "board=$(TARGET_BOOTLOADER_BOARD_NAME)" > $@
|
2021-06-03 11:54:31 +02:00
|
|
|
else
|
|
|
|
$(hide) echo "" > $@
|
2009-03-04 04:28:42 +01:00
|
|
|
endif
|
2017-04-04 22:01:18 +02:00
|
|
|
|
|
|
|
# Copy compatibility metadata to the device.
|
|
|
|
|
2017-04-28 23:39:50 +02:00
|
|
|
# Device Manifest
|
2017-04-04 22:01:18 +02:00
|
|
|
ifdef DEVICE_MANIFEST_FILE
|
2017-05-25 00:41:53 +02:00
|
|
|
# $(DEVICE_MANIFEST_FILE) can be a list of files
|
2017-04-04 22:01:18 +02:00
|
|
|
include $(CLEAR_VARS)
|
2020-01-14 22:22:17 +01:00
|
|
|
LOCAL_MODULE := vendor_manifest.xml
|
2021-02-13 06:42:54 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution
|
|
|
|
LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice
|
2017-12-14 00:03:51 +01:00
|
|
|
LOCAL_MODULE_STEM := manifest.xml
|
2017-04-04 22:01:18 +02:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
2018-01-19 02:51:15 +01:00
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/vintf
|
2017-04-14 08:30:38 +02:00
|
|
|
|
|
|
|
GEN := $(local-generated-sources-dir)/manifest.xml
|
2017-05-25 00:41:53 +02:00
|
|
|
$(GEN): PRIVATE_DEVICE_MANIFEST_FILE := $(DEVICE_MANIFEST_FILE)
|
2017-04-14 08:30:38 +02:00
|
|
|
$(GEN): $(DEVICE_MANIFEST_FILE) $(HOST_OUT_EXECUTABLES)/assemble_vintf
|
2017-05-25 00:41:53 +02:00
|
|
|
BOARD_SEPOLICY_VERS=$(BOARD_SEPOLICY_VERS) \
|
2017-12-12 02:01:00 +01:00
|
|
|
PRODUCT_ENFORCE_VINTF_MANIFEST=$(PRODUCT_ENFORCE_VINTF_MANIFEST) \
|
|
|
|
PRODUCT_SHIPPING_API_LEVEL=$(PRODUCT_SHIPPING_API_LEVEL) \
|
2017-05-25 00:41:53 +02:00
|
|
|
$(HOST_OUT_EXECUTABLES)/assemble_vintf -o $@ \
|
|
|
|
-i $(call normalize-path-list,$(PRIVATE_DEVICE_MANIFEST_FILE))
|
2017-04-14 08:30:38 +02:00
|
|
|
|
|
|
|
LOCAL_PREBUILT_MODULE_FILE := $(GEN)
|
2017-04-04 22:01:18 +02:00
|
|
|
include $(BUILD_PREBUILT)
|
|
|
|
endif
|
2019-02-14 01:32:40 +01:00
|
|
|
|
2020-03-14 02:31:57 +01:00
|
|
|
# DEVICE_MANIFEST_SKUS: a list of SKUS where DEVICE_MANIFEST_<sku>_FILES is defined.
|
2020-02-27 03:10:57 +01:00
|
|
|
ifdef DEVICE_MANIFEST_SKUS
|
|
|
|
|
|
|
|
# Install /vendor/etc/vintf/manifest_$(sku).xml
|
|
|
|
# $(1): sku
|
|
|
|
define _add_device_sku_manifest
|
2020-03-14 02:31:57 +01:00
|
|
|
my_fragment_files_var := DEVICE_MANIFEST_$$(call to-upper,$(1))_FILES
|
2020-02-27 03:10:57 +01:00
|
|
|
ifndef $$(my_fragment_files_var)
|
|
|
|
$$(error $(1) is in DEVICE_MANIFEST_SKUS but $$(my_fragment_files_var) is not defined)
|
|
|
|
endif
|
|
|
|
my_fragment_files := $$($$(my_fragment_files_var))
|
|
|
|
include $$(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := vendor_manifest_$(1).xml
|
2021-02-13 06:42:54 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution
|
|
|
|
LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice
|
2020-02-27 03:10:57 +01:00
|
|
|
LOCAL_MODULE_STEM := manifest_$(1).xml
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/vintf
|
|
|
|
|
|
|
|
GEN := $$(local-generated-sources-dir)/manifest_$(1).xml
|
|
|
|
$$(GEN): PRIVATE_SRC_FILES := $$(my_fragment_files)
|
|
|
|
$$(GEN): $$(my_fragment_files) $$(HOST_OUT_EXECUTABLES)/assemble_vintf
|
2020-03-17 23:48:11 +01:00
|
|
|
BOARD_SEPOLICY_VERS=$$(BOARD_SEPOLICY_VERS) \
|
|
|
|
PRODUCT_ENFORCE_VINTF_MANIFEST=$$(PRODUCT_ENFORCE_VINTF_MANIFEST) \
|
|
|
|
PRODUCT_SHIPPING_API_LEVEL=$$(PRODUCT_SHIPPING_API_LEVEL) \
|
2020-02-27 03:10:57 +01:00
|
|
|
$$(HOST_OUT_EXECUTABLES)/assemble_vintf -o $$@ \
|
|
|
|
-i $$(call normalize-path-list,$$(PRIVATE_SRC_FILES))
|
|
|
|
|
|
|
|
LOCAL_PREBUILT_MODULE_FILE := $$(GEN)
|
|
|
|
include $$(BUILD_PREBUILT)
|
|
|
|
my_fragment_files_var :=
|
|
|
|
my_fragment_files :=
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach sku, $(DEVICE_MANIFEST_SKUS), $(eval $(call _add_device_sku_manifest,$(sku))))
|
|
|
|
_add_device_sku_manifest :=
|
|
|
|
|
|
|
|
endif # DEVICE_MANIFEST_SKUS
|
|
|
|
|
2019-02-14 01:32:40 +01:00
|
|
|
# ODM manifest
|
|
|
|
ifdef ODM_MANIFEST_FILES
|
|
|
|
# ODM_MANIFEST_FILES is a list of files that is combined and installed as the default ODM manifest.
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := odm_manifest.xml
|
2021-02-13 06:42:54 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution
|
|
|
|
LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice
|
2019-02-14 01:32:40 +01:00
|
|
|
LOCAL_MODULE_STEM := manifest.xml
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_RELATIVE_PATH := vintf
|
|
|
|
LOCAL_ODM_MODULE := true
|
|
|
|
|
|
|
|
GEN := $(local-generated-sources-dir)/manifest.xml
|
|
|
|
$(GEN): PRIVATE_SRC_FILES := $(ODM_MANIFEST_FILES)
|
|
|
|
$(GEN): $(ODM_MANIFEST_FILES) $(HOST_OUT_EXECUTABLES)/assemble_vintf
|
|
|
|
# Set VINTF_IGNORE_TARGET_FCM_VERSION to true because it should only be in device manifest.
|
|
|
|
VINTF_IGNORE_TARGET_FCM_VERSION=true \
|
|
|
|
$(HOST_OUT_EXECUTABLES)/assemble_vintf -o $@ \
|
|
|
|
-i $(call normalize-path-list,$(PRIVATE_SRC_FILES))
|
|
|
|
|
|
|
|
LOCAL_PREBUILT_MODULE_FILE := $(GEN)
|
|
|
|
include $(BUILD_PREBUILT)
|
|
|
|
endif # ODM_MANIFEST_FILES
|
|
|
|
|
|
|
|
# ODM_MANIFEST_SKUS: a list of SKUS where ODM_MANIFEST_<sku>_FILES are defined.
|
|
|
|
ifdef ODM_MANIFEST_SKUS
|
|
|
|
|
|
|
|
# Install /odm/etc/vintf/manifest_$(sku).xml
|
|
|
|
# $(1): sku
|
|
|
|
define _add_odm_sku_manifest
|
|
|
|
my_fragment_files_var := ODM_MANIFEST_$$(call to-upper,$(1))_FILES
|
|
|
|
ifndef $$(my_fragment_files_var)
|
|
|
|
$$(error $(1) is in ODM_MANIFEST_SKUS but $$(my_fragment_files_var) is not defined)
|
|
|
|
endif
|
|
|
|
my_fragment_files := $$($$(my_fragment_files_var))
|
|
|
|
include $$(CLEAR_VARS)
|
|
|
|
LOCAL_MODULE := odm_manifest_$(1).xml
|
2021-02-13 06:42:54 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 legacy_not_a_contribution
|
|
|
|
LOCAL_LICENSE_CONDITIONS := by_exception_only not_allowed notice
|
2019-02-14 01:32:40 +01:00
|
|
|
LOCAL_MODULE_STEM := manifest_$(1).xml
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_MODULE_RELATIVE_PATH := vintf
|
|
|
|
LOCAL_ODM_MODULE := true
|
|
|
|
GEN := $$(local-generated-sources-dir)/manifest_$(1).xml
|
|
|
|
$$(GEN): PRIVATE_SRC_FILES := $$(my_fragment_files)
|
|
|
|
$$(GEN): $$(my_fragment_files) $$(HOST_OUT_EXECUTABLES)/assemble_vintf
|
|
|
|
VINTF_IGNORE_TARGET_FCM_VERSION=true \
|
|
|
|
$$(HOST_OUT_EXECUTABLES)/assemble_vintf -o $$@ \
|
|
|
|
-i $$(call normalize-path-list,$$(PRIVATE_SRC_FILES))
|
|
|
|
LOCAL_PREBUILT_MODULE_FILE := $$(GEN)
|
|
|
|
include $$(BUILD_PREBUILT)
|
|
|
|
my_fragment_files_var :=
|
|
|
|
my_fragment_files :=
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach sku, $(ODM_MANIFEST_SKUS), $(eval $(call _add_odm_sku_manifest,$(sku))))
|
|
|
|
_add_odm_sku_manifest :=
|
|
|
|
|
|
|
|
endif # ODM_MANIFEST_SKUS
|