diff --git a/BoardConfig.mk b/BoardConfig.mk index 3473a3d..01bd23f 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -17,6 +17,9 @@ DEVICE_PATH := device/xiaomi/land CM_PATH := vendor/cm/device/board +# Define platform before including any common things +include $(DEVICE_PATH)/PlatformConfig.mk + # Inherit common ARM64 board fragments include $(CM_PATH)/common/arm64/architecture.mk include $(CM_PATH)/common/arm64/binder.mk diff --git a/board/00-qcom-platform-msm8937.mk b/PlatformConfig.mk similarity index 100% rename from board/00-qcom-platform-msm8937.mk rename to PlatformConfig.mk diff --git a/cm.mk b/cm.mk index 03e4fb1..182537f 100644 --- a/cm.mk +++ b/cm.mk @@ -14,6 +14,9 @@ # limitations under the License. # +# Define platform before including any common things +$(call inherit-product, $(LOCAL_PATH)/PlatformConfig.mk) + # Inherit from those products. Most specific first. $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) @@ -22,10 +25,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) $(call inherit-product, vendor/cm/config/common_full_phone.mk) # Inherit from land device -$(call inherit-product, device/xiaomi/land/device.mk) - -# Must define platform before including any common things -$(call inherit-product, device/xiaomi/land/board/00-qcom-platform-msm8937.mk) +$(call inherit-product, $(LOCAL_PATH)/device.mk) PRODUCT_BRAND := Xiaomi PRODUCT_DEVICE := land