From 1399b12aaa602ccd4cb97c366c4ea3fe05f5a3be Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Thu, 8 Feb 2018 14:57:45 +0000 Subject: Add a 64 bit only product for hikey. Also restructure some of the current make files: - make a hikey-common.mk instead of importing hikey.mk and overriding - don't set ro.zygote etc directly, import the helper makefiles instead This new product avoids building all the 32 bit native executables and libraries that gets built for the 'hikey' product. Sample benefits: - makes the build faster - saves ram and cpu, because there is no 32 bit zygote created - frees up space on the system partition Test: lunch hikey && m -j Test: lunch hikey32 && m -j Test: lunch hikey64_only && m -j Bug: 72810053 Change-Id: I0d40b1c1c4e763b14258df7034921e0a3dc12208 --- AndroidProducts.mk | 1 + BoardConfigCommon.mk | 2 -- device-common.mk | 4 ---- hikey-common.mk | 32 ++++++++++++++++++++++++++++++++ hikey.mk | 37 ++----------------------------------- hikey32.mk | 9 ++------- hikey32/BoardConfig.mk | 5 ----- hikey64/BoardConfig.mk | 15 +++++++++++++++ hikey64/board-info.txt | 2 ++ hikey64_only.mk | 6 ++++++ hikey960.mk | 1 + vendorsetup.sh | 1 + 12 files changed, 62 insertions(+), 53 deletions(-) create mode 100644 hikey-common.mk create mode 100644 hikey64/BoardConfig.mk create mode 100644 hikey64/board-info.txt create mode 100644 hikey64_only.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk index f10d1cf3..1b16eec2 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -12,4 +12,5 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/hikey.mk \ $(LOCAL_DIR)/hikey32.mk \ +$(LOCAL_DIR)/hikey64_only.mk \ $(LOCAL_DIR)/hikey960.mk diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index b1487ce2..eb64ac65 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -10,8 +10,6 @@ TARGET_2ND_CPU_ABI := armeabi-v7a TARGET_2ND_CPU_ABI2 := armeabi TARGET_USES_64_BIT_BINDER := true -TARGET_SUPPORTS_32_BIT_APPS := true -TARGET_SUPPORTS_64_BIT_APPS := true WITH_DEXPREOPT ?= true USE_OPENGL_RENDERER := true diff --git a/device-common.mk b/device-common.mk index 4aefdbff..a03a80dd 100644 --- a/device-common.mk +++ b/device-common.mk @@ -49,10 +49,6 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ android.hardware.drm@1.0-impl \ -# Set zygote config -PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote64_32 -PRODUCT_COPY_FILES += system/core/rootdir/init.zygote64_32.rc:root/init.zygote64_32.rc - PRODUCT_PACKAGES += libGLES_android # Graphics HAL diff --git a/hikey-common.mk b/hikey-common.mk new file mode 100644 index 00000000..2212f6c4 --- /dev/null +++ b/hikey-common.mk @@ -0,0 +1,32 @@ + +ifndef TARGET_KERNEL_USE +TARGET_KERNEL_USE=4.9 +endif + +ifndef TARGET_COMPRESSED_KERNEL +TARGET_COMPRESSED_KERNEL=false +endif + +ifeq ($(TARGET_COMPRESSED_KERNEL), false) +TARGET_PREBUILT_KERNEL := device/linaro/hikey-kernel/Image-dtb-$(TARGET_KERNEL_USE) +else +TARGET_PREBUILT_KERNEL := device/linaro/hikey-kernel/Image.gz-dtb-$(TARGET_KERNEL_USE) +endif + +TARGET_PREBUILT_DTB := device/linaro/hikey-kernel/hi6220-hikey.dtb-$(TARGET_KERNEL_USE) + +ifeq ($(TARGET_KERNEL_USE), 3.18) + TARGET_FSTAB := fstab.hikey-$(TARGET_KERNEL_USE) + HIKEY_USE_LEGACY_TI_BLUETOOTH := true +else + ifeq ($(TARGET_KERNEL_USE), 4.4) + HIKEY_USE_LEGACY_TI_BLUETOOTH := true + else + HIKEY_USE_LEGACY_TI_BLUETOOTH := false + endif + TARGET_FSTAB := fstab.hikey +endif + +$(call inherit-product, device/linaro/hikey/hikey/device-hikey.mk) +$(call inherit-product, device/linaro/hikey/device-common.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk) diff --git a/hikey.mk b/hikey.mk index ca6f2d18..0b32845c 100644 --- a/hikey.mk +++ b/hikey.mk @@ -1,39 +1,6 @@ -ifndef TARGET_KERNEL_USE -TARGET_KERNEL_USE=4.9 -endif +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) +$(call inherit-product, device/linaro/hikey/hikey-common.mk) -ifndef TARGET_COMPRESSED_KERNEL -TARGET_COMPRESSED_KERNEL=false -endif - -ifeq ($(TARGET_COMPRESSED_KERNEL), false) -TARGET_PREBUILT_KERNEL := device/linaro/hikey-kernel/Image-dtb-$(TARGET_KERNEL_USE) -else -TARGET_PREBUILT_KERNEL := device/linaro/hikey-kernel/Image.gz-dtb-$(TARGET_KERNEL_USE) -endif - -TARGET_PREBUILT_DTB := device/linaro/hikey-kernel/hi6220-hikey.dtb-$(TARGET_KERNEL_USE) - -ifeq ($(TARGET_KERNEL_USE), 3.18) - TARGET_FSTAB := fstab.hikey-$(TARGET_KERNEL_USE) - HIKEY_USE_LEGACY_TI_BLUETOOTH := true -else - ifeq ($(TARGET_KERNEL_USE), 4.4) - HIKEY_USE_LEGACY_TI_BLUETOOTH := true - else - HIKEY_USE_LEGACY_TI_BLUETOOTH := false - endif - TARGET_FSTAB := fstab.hikey -endif - -# -# Inherit the full_base and device configurations -$(call inherit-product, device/linaro/hikey/hikey/device-hikey.mk) -$(call inherit-product, device/linaro/hikey/device-common.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk) - -# -# Overrides PRODUCT_NAME := hikey PRODUCT_DEVICE := hikey PRODUCT_BRAND := Android diff --git a/hikey32.mk b/hikey32.mk index a08ee8c5..2ae48a6e 100644 --- a/hikey32.mk +++ b/hikey32.mk @@ -1,10 +1,5 @@ -# Set zygote32 config before one in hikey.mk -PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote32 -PRODUCT_COPY_FILES += system/core/rootdir/init.zygote32.rc:root/init.zygote32.rc +$(call inherit-product, device/linaro/hikey/hikey-common.mk) -$(call inherit-product, device/linaro/hikey/hikey.mk) - -# -# Overrides PRODUCT_NAME := hikey32 PRODUCT_DEVICE := hikey32 +PRODUCT_BRAND := Android diff --git a/hikey32/BoardConfig.mk b/hikey32/BoardConfig.mk index 9d1fd4f7..d7e41800 100644 --- a/hikey32/BoardConfig.mk +++ b/hikey32/BoardConfig.mk @@ -11,8 +11,3 @@ TARGET_2ND_ARCH_VARIANT := TARGET_2ND_CPU_ABI := TARGET_2ND_CPU_ABI2 := TARGET_2ND_CPU_VARIANT := - -TARGET_SUPPORTS_64_BIT_APPS := false - - - diff --git a/hikey64/BoardConfig.mk b/hikey64/BoardConfig.mk new file mode 100644 index 00000000..c690185f --- /dev/null +++ b/hikey64/BoardConfig.mk @@ -0,0 +1,15 @@ +include device/linaro/hikey/hikey/BoardConfig.mk + +AUDIOSERVER_MULTILIB := 64 + +TARGET_ARCH := arm64 +TARGET_ARCH_VARIANT := armv8-a +TARGET_CPU_ABI := arm64-v8a +TARGET_CPU_ABI2 := +TARGET_CPU_VARIANT := cortex-a53 + +TARGET_2ND_ARCH := +TARGET_2ND_ARCH_VARIANT := +TARGET_2ND_CPU_ABI := +TARGET_2ND_CPU_ABI2 := +TARGET_2ND_CPU_VARIANT := diff --git a/hikey64/board-info.txt b/hikey64/board-info.txt new file mode 100644 index 00000000..a167e4d6 --- /dev/null +++ b/hikey64/board-info.txt @@ -0,0 +1,2 @@ +require board=hikey +require version-bootloader=0.7 diff --git a/hikey64_only.mk b/hikey64_only.mk new file mode 100644 index 00000000..c2b4320a --- /dev/null +++ b/hikey64_only.mk @@ -0,0 +1,6 @@ +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) +$(call inherit-product, device/linaro/hikey/hikey-common.mk) + +PRODUCT_NAME := hikey64_only +PRODUCT_DEVICE := hikey64 +PRODUCT_BRAND := Android diff --git a/hikey960.mk b/hikey960.mk index 521321b9..06124476 100644 --- a/hikey960.mk +++ b/hikey960.mk @@ -12,6 +12,7 @@ endif # # Inherit the full_base and device configurations +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) $(call inherit-product, device/linaro/hikey/hikey960/device-hikey960.mk) $(call inherit-product, device/linaro/hikey/device-common.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk) diff --git a/vendorsetup.sh b/vendorsetup.sh index 6797c3ad..cef0a194 100755 --- a/vendorsetup.sh +++ b/vendorsetup.sh @@ -21,4 +21,5 @@ # function: add_lunch_combo generic-eng add_lunch_combo hikey-userdebug +add_lunch_combo hikey64_only-userdebug add_lunch_combo hikey960-userdebug -- cgit v1.2.3