Refactor conditional to use DEVICE_IS_64BIT_ONLY

Bug: 218458605
Bug: 223622655
Signed-off-by: Gina Ko <yichunko@google.com>
Change-Id: Ia74ef39ab8433d036925a30217f49da8f6fd863b
This commit is contained in:
Gina Ko 2022-02-25 17:05:22 -08:00
parent 30c3ddacc7
commit 18bd11a39e
3 changed files with 13 additions and 8 deletions

View file

@ -32,7 +32,9 @@ TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_VARIANT := cortex-a55 TARGET_CPU_VARIANT := cortex-a55
TARGET_CPU_VARIANT_RUNTIME := 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 := arm
TARGET_2ND_ARCH_VARIANT := armv8-a TARGET_2ND_ARCH_VARIANT := armv8-a
TARGET_2ND_CPU_ABI := armeabi-v7a TARGET_2ND_CPU_ABI := armeabi-v7a

View file

@ -17,10 +17,12 @@
# #
# All components inherited here go to system image # All components inherited here go to system image
# #
ifeq (,$(filter %tangor tangor% %_64,$(TARGET_PRODUCT))) DEVICE_IS_64BIT_ONLY ?= $(if $(filter %_64,$(TARGET_PRODUCT)), true, false)
$(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) $(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 endif
$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk)

View file

@ -17,8 +17,9 @@
include device/google/gs-common/device.mk include device/google/gs-common/device.mk
TARGET_BOARD_PLATFORM := gs101 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 LOCAL_64ONLY := _64
endif 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) $(call inherit-product-if-exists, vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/common/device-vendor.mk)
endif endif
ifeq (,$(filter %tangor tangor% %_64,$(TARGET_PRODUCT))) ifeq ($(DEVICE_IS_64BIT_ONLY),true)
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
else
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) $(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 endif
#$(call inherit-product, hardware/google_devices/exynos5/exynos5.mk) #$(call inherit-product, hardware/google_devices/exynos5/exynos5.mk)
#$(call inherit-product-if-exists, hardware/google_devices/gs101/gs101.mk) #$(call inherit-product-if-exists, hardware/google_devices/gs101/gs101.mk)