diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index 5038d378..1141a237 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -32,7 +32,9 @@ TARGET_CPU_ABI := arm64-v8a TARGET_CPU_VARIANT := cortex-a55 TARGET_CPU_VARIANT_RUNTIME := cortex-a55 -ifeq (,$(filter %tangor tangor% %_64,$(TARGET_PRODUCT))) +DEVICE_IS_64BIT_ONLY ?= $(if $(filter %_64,$(TARGET_PRODUCT)), true, false) + +ifneq ($(DEVICE_IS_64BIT_ONLY),true) TARGET_2ND_ARCH := arm TARGET_2ND_ARCH_VARIANT := armv8-a TARGET_2ND_CPU_ABI := armeabi-v7a diff --git a/aosp_common.mk b/aosp_common.mk index 57d67225..8788251a 100644 --- a/aosp_common.mk +++ b/aosp_common.mk @@ -17,10 +17,12 @@ # # All components inherited here go to system image # -ifeq (,$(filter %tangor tangor% %_64,$(TARGET_PRODUCT))) -$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) -else +DEVICE_IS_64BIT_ONLY ?= $(if $(filter %_64,$(TARGET_PRODUCT)), true, false) + +ifeq ($(DEVICE_IS_64BIT_ONLY),true) $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) +else +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) endif $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) diff --git a/device.mk b/device.mk index 9c121a98..701b265c 100644 --- a/device.mk +++ b/device.mk @@ -17,8 +17,9 @@ include device/google/gs-common/device.mk TARGET_BOARD_PLATFORM := gs101 +DEVICE_IS_64BIT_ONLY ?= $(if $(filter %_64,$(TARGET_PRODUCT)), true, false) -ifneq (,$(filter %tangor tangor% %_64,$(TARGET_PRODUCT))) +ifeq ($(DEVICE_IS_64BIT_ONLY),true) LOCAL_64ONLY := _64 endif @@ -903,10 +904,10 @@ ifneq ($(BOARD_WITHOUT_RADIO),true) $(call inherit-product-if-exists, vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/common/device-vendor.mk) endif -ifeq (,$(filter %tangor tangor% %_64,$(TARGET_PRODUCT))) -$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) -else +ifeq ($(DEVICE_IS_64BIT_ONLY),true) $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) +else +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) endif #$(call inherit-product, hardware/google_devices/exynos5/exynos5.mk) #$(call inherit-product-if-exists, hardware/google_devices/gs101/gs101.mk)