From 0c3eb63eb3ff52830d3b4b27bdfa629fcba5b629 Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Thu, 26 Jul 2018 11:40:12 -0700 Subject: [PATCH] Add PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS. When it is true, all kernel requirements are enforced during OTA. Otherwise: - Kernel minor revision is not enforced. - Kernel configs are not enforced. Bug: 111840577 Test: `m dist` and inspect system_matrix.xml in OTA zip Change-Id: I965ee5ef59ff48b600ebfab858ecf0909397fe6b --- core/config.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/config.mk b/core/config.mk index d49d7d5f5..7709bcf59 100644 --- a/core/config.mk +++ b/core/config.mk @@ -910,6 +910,20 @@ PLATFORM_SEPOLICY_COMPAT_VERSIONS := \ PLATFORM_SEPOLICY_VERSION \ TOT_SEPOLICY_VERSION \ +# If true, kernel configuration requirements are present in OTA package (and will be enforced +# during OTA). Otherwise, kernel configuration requirements are enforced in VTS. +# Devices that checks the running kernel (instead of the kernel in OTA package) should not +# set this variable to prevent OTA failures. +ifndef PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS + PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := + ifdef PRODUCT_SHIPPING_API_LEVEL + ifeq (true,$(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),29)) + PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := true + endif + endif +endif +.KATI_READONLY := PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS + ifndef USE_LOGICAL_PARTITIONS USE_LOGICAL_PARTITIONS := $(PRODUCT_USE_LOGICAL_PARTITIONS) endif