aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/Makefile40
-rw-r--r--target/board/Android.mk4
-rwxr-xr-xtools/releasetools/check_target_files_vintf.py18
3 files changed, 47 insertions, 15 deletions
diff --git a/core/Makefile b/core/Makefile
index 30ad4b66ed..baed68d14e 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -3697,6 +3697,13 @@ check_vintf_common_srcs_patterns :=
check_vintf_has_system :=
check_vintf_has_vendor :=
+ifneq (,$(filter EMPTY_ODM_SKU_PLACEHOLDER,$(ODM_MANIFEST_SKUS)))
+$(error EMPTY_ODM_SKU_PLACEHOLDER is an internal variable and cannot be used for ODM_MANIFEST_SKUS)
+endif
+ifneq (,$(filter EMPTY_VENDOR_SKU_PLACEHOLDER,$(DEVICE_MANIFEST_SKUS)))
+$(error EMPTY_VENDOR_SKU_PLACEHOLDER is an internal variable and cannot be used for DEIVCE_MANIFEST_SKUS)
+endif
+
# -- Check system manifest / matrix including fragments (excluding other framework manifests / matrices, e.g. product);
check_vintf_system_deps := $(filter $(TARGET_OUT)/etc/vintf/%, $(check_vintf_common_srcs))
ifneq ($(check_vintf_system_deps),)
@@ -3715,8 +3722,14 @@ ifneq ($(check_vintf_vendor_deps),)
check_vintf_has_vendor := true
check_vintf_vendor_log := $(intermediates)/check_vintf_vendor_log
check_vintf_all_deps += $(check_vintf_vendor_log)
+$(check_vintf_vendor_log): PRIVATE_VENDOR_SKUS := \
+ $(if $(DEVICE_MANIFEST_FILE),EMPTY_VENDOR_SKU_PLACEHOLDER) \
+ $(DEVICE_MANIFEST_SKUS)
$(check_vintf_vendor_log): $(HOST_OUT_EXECUTABLES)/checkvintf $(check_vintf_vendor_deps)
- @( $< --check-one --dirmap /vendor:$(TARGET_OUT_VENDOR) > $@ 2>&1 ) || ( cat $@ && exit 1 )
+ $(foreach vendor_sku,$(PRIVATE_VENDOR_SKUS), \
+ ( $< --check-one --dirmap /vendor:$(TARGET_OUT_VENDOR) \
+ --property ro.boot.product.vendor.sku=$(filter-out EMPTY_VENDOR_SKU_PLACEHOLDER,$(vendor_sku)) \
+ > $@ 2>&1 ) || ( cat $@ && exit 1 ); )
check_vintf_vendor_log :=
endif # check_vintf_vendor_deps
check_vintf_vendor_deps :=
@@ -3810,17 +3823,23 @@ endif # PRODUCT_SHIPPING_API_LEVEL
$(check_vintf_compatible_log): PRIVATE_CHECK_VINTF_ARGS := $(check_vintf_compatible_args)
$(check_vintf_compatible_log): PRIVATE_CHECK_VINTF_DEPS := $(check_vintf_compatible_deps)
+$(check_vintf_compatible_log): PRIVATE_ODM_SKUS := \
+ $(if $(ODM_MANIFEST_FILES),EMPTY_ODM_SKU_PLACEHOLDER) \
+ $(ODM_MANIFEST_SKUS)
+$(check_vintf_compatible_log): PRIVATE_VENDOR_SKUS := \
+ $(if $(DEVICE_MANIFEST_FILE),EMPTY_VENDOR_SKU_PLACEHOLDER) \
+ $(DEVICE_MANIFEST_SKUS)
$(check_vintf_compatible_log): $(HOST_OUT_EXECUTABLES)/checkvintf $(check_vintf_compatible_deps)
@echo -n -e 'Deps: \n ' > $@
@sed 's/ /\n /g' <<< "$(PRIVATE_CHECK_VINTF_DEPS)" >> $@
@echo -n -e 'Args: \n ' >> $@
@cat <<< "$(PRIVATE_CHECK_VINTF_ARGS)" >> $@
- @echo -n -e 'For empty SKU:' >> $@
- @( $< --check-compat $(PRIVATE_CHECK_VINTF_ARGS) >> $@ 2>&1 ) || ( cat $@ && exit 1 )
- $(foreach sku,$(ODM_MANIFEST_SKUS), \
- echo "For SKU = $(sku):" >> $@; \
+ $(foreach odm_sku,$(PRIVATE_ODM_SKUS), $(foreach vendor_sku,$(PRIVATE_VENDOR_SKUS), \
+ echo "For ODM SKU = $(odm_sku), vendor SKU = $(vendor_sku)" >> $@; \
( $< --check-compat $(PRIVATE_CHECK_VINTF_ARGS) \
- --property ro.boot.product.hardware.sku=$(sku) >> $@ 2>&1 ) || ( cat $@ && exit 1 ); )
+ --property ro.boot.product.hardware.sku=$(filter-out EMPTY_ODM_SKU_PLACEHOLDER,$(odm_sku)) \
+ --property ro.boot.product.vendor.sku=$(filter-out EMPTY_VENDOR_SKU_PLACEHOLDER,$(vendor_sku)) \
+ >> $@ 2>&1 ) || (cat $@ && exit 1); ))
check_vintf_compatible_log :=
check_vintf_compatible_args :=
@@ -4219,6 +4238,15 @@ endif
ifdef ODM_MANIFEST_SKUS
$(hide) echo "vintf_odm_manifest_skus=$(ODM_MANIFEST_SKUS)" >> $@
endif
+ifdef ODM_MANIFEST_FILES
+ $(hide) echo "vintf_include_empty_odm_sku=true" >> $@
+endif
+ifdef DEVICE_MANIFEST_SKUS
+ $(hide) echo "vintf_vendor_manifest_skus=$(DEVICE_MANIFEST_SKUS)" >> $@
+endif
+ifdef DEVICE_MANIFEST_FILE
+ $(hide) echo "vintf_include_empty_vendor_sku=true" >> $@
+endif
.PHONY: misc_info
misc_info: $(INSTALLED_MISC_INFO_TARGET)
diff --git a/target/board/Android.mk b/target/board/Android.mk
index 0c326b9288..ffc9baf54a 100644
--- a/target/board/Android.mk
+++ b/target/board/Android.mk
@@ -52,13 +52,13 @@ LOCAL_PREBUILT_MODULE_FILE := $(GEN)
include $(BUILD_PREBUILT)
endif
-# DEVICE_MANIFEST_SKUS: a list of SKUS where DEVICE_MANIFEST_<sku>_FILE is defined.
+# DEVICE_MANIFEST_SKUS: a list of SKUS where DEVICE_MANIFEST_<sku>_FILES is defined.
ifdef DEVICE_MANIFEST_SKUS
# Install /vendor/etc/vintf/manifest_$(sku).xml
# $(1): sku
define _add_device_sku_manifest
-my_fragment_files_var := DEVICE_MANIFEST_$$(call to-upper,$(1))_FILE
+my_fragment_files_var := DEVICE_MANIFEST_$$(call to-upper,$(1))_FILES
ifndef $$(my_fragment_files_var)
$$(error $(1) is in DEVICE_MANIFEST_SKUS but $$(my_fragment_files_var) is not defined)
endif
diff --git a/tools/releasetools/check_target_files_vintf.py b/tools/releasetools/check_target_files_vintf.py
index f41df373d7..24c6dcb9f4 100755
--- a/tools/releasetools/check_target_files_vintf.py
+++ b/tools/releasetools/check_target_files_vintf.py
@@ -67,13 +67,17 @@ def GetDirmap(input_tmp):
def GetArgsForSkus(info_dict):
- skus = info_dict.get('vintf_odm_manifest_skus', '').strip().split()
- if not skus:
- logger.info("ODM_MANIFEST_SKUS is not defined. Check once without SKUs.")
- skus = ['']
- return [['--property', 'ro.boot.product.hardware.sku=' + sku]
- for sku in skus]
+ odm_skus = info_dict.get('vintf_odm_manifest_skus', '').strip().split()
+ if info_dict.get('vintf_include_empty_odm_sku', '') == "true":
+ odm_skus += ['']
+ vendor_skus = info_dict.get('vintf_vendor_manifest_skus', '').strip().split()
+ if info_dict.get('vintf_include_empty_vendor_sku', '') == "true":
+ vendor_skus += ['']
+
+ return [['--property', 'ro.boot.product.hardware.sku=' + odm_sku,
+ '--property', 'ro.boot.product.vendor.sku=' + vendor_sku]
+ for odm_sku in odm_skus for vendor_sku in vendor_skus]
def GetArgsForShippingApiLevel(info_dict):
shipping_api_level = info_dict['vendor.build.prop'].get(
@@ -89,7 +93,7 @@ def GetArgsForKernel(input_tmp):
config_path = os.path.join(input_tmp, 'META/kernel_configs.txt')
if not os.path.isfile(version_path) or not os.path.isfile(config_path):
- logger.info('Skipping kernel config checks because ' +
+ logger.info('Skipping kernel config checks because '
'PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS is not set')
return []