db845c: add 64-bit-only build flag TARGET_64BIT_ONLY

TARGET_64BIT_ONLY will be set to false by default, so the default behaviour
isn't changed. To build the userspace as 64bit-only, set it to true.

Change-Id: Id7386a76927a15737d652481033a836ab715f632
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
diff --git a/db845c.mk b/db845c.mk
index 72b2c26..9621a9d 100644
--- a/db845c.mk
+++ b/db845c.mk
@@ -1,5 +1,12 @@
+# Target defaults to 64- and 32-bit
+TARGET_64BIT_ONLY ?= false
+
 $(call inherit-product, device/linaro/dragonboard/full.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+ifeq ($(TARGET_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/full_base.mk)
 $(call inherit-product, device/linaro/dragonboard/shared/graphics/drm_hwcomposer/device.mk)
 $(call inherit-product, device/linaro/dragonboard/shared/graphics/mesa/device.mk)
diff --git a/db845c/BoardConfig.mk b/db845c/BoardConfig.mk
index 881dbc7..580fece 100644
--- a/db845c/BoardConfig.mk
+++ b/db845c/BoardConfig.mk
@@ -6,12 +6,14 @@
 TARGET_CPU_VARIANT := kryo385
 TARGET_CPU_ABI := arm64-v8a
 
-# Secondary Arch
-TARGET_2ND_ARCH := arm
-TARGET_2ND_ARCH_VARIANT := armv8-2a
-TARGET_2ND_CPU_VARIANT := kryo385
-TARGET_2ND_CPU_ABI := armeabi-v7a
-TARGET_2ND_CPU_ABI2 := armeabi
+ifeq ($(TARGET_64BIT_ONLY), false)
+  # Secondary Arch
+  TARGET_2ND_ARCH := arm
+  TARGET_2ND_ARCH_VARIANT := armv8-2a
+  TARGET_2ND_CPU_VARIANT := kryo385
+  TARGET_2ND_CPU_ABI := armeabi-v7a
+  TARGET_2ND_CPU_ABI2 := armeabi
+endif
 
 # Board Information
 TARGET_BOOTLOADER_BOARD_NAME := db845c