From e49ee7095fd8e6c2e45a404856ff584938fd7fac Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Fri, 29 Sep 2017 15:32:22 -0700 Subject: [PATCH] Enforce TARGET_USES_MKE2FS := true for new devices Bug: 62434479 Test: verify failure on 27 device w/o TARGET_USES_MKE2FS Test: verify success on 27 device w/ TARGET_USES_MKE2FS Test: `build/test/build_test.sh -only-config` on oc-mr1-dev and master Change-Id: Ib7e8dad404a1eaf70f47ee1d46528be4aabd6e80 --- core/config.mk | 8 ++++++++ target/product/product_launched_with_o_mr1.mk | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 target/product/product_launched_with_o_mr1.mk diff --git a/core/config.mk b/core/config.mk index 94277de78b..cc2b2af12b 100644 --- a/core/config.mk +++ b/core/config.mk @@ -727,6 +727,14 @@ else ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),26),) PRODUCT_FULL_TREBLE := true endif +ifdef PRODUCT_SHIPPING_API_LEVEL + ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),27),) + ifneq ($(TARGET_USES_MKE2FS),true) + $(error When PRODUCT_SHIPPING_API_LEVEL >= 27, TARGET_USES_MKE2FS must be true) + endif + endif +endif + # The default key if not set as LOCAL_CERTIFICATE ifdef PRODUCT_DEFAULT_DEV_CERTIFICATE DEFAULT_SYSTEM_DEV_CERTIFICATE := $(PRODUCT_DEFAULT_DEV_CERTIFICATE) diff --git a/target/product/product_launched_with_o_mr1.mk b/target/product/product_launched_with_o_mr1.mk new file mode 100644 index 0000000000..25620aa14c --- /dev/null +++ b/target/product/product_launched_with_o_mr1.mk @@ -0,0 +1,2 @@ +#PRODUCT_SHIPPING_API_LEVEL indicates the first api level, device has been commercially launced on. +PRODUCT_SHIPPING_API_LEVEL := 27