Skip to content

Commit

Permalink
Change device name and small edits
Browse files Browse the repository at this point in the history
  • Loading branch information
cryscript committed Nov 10, 2016
1 parent 5a8c169 commit e20953e
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 50 deletions.
40 changes: 31 additions & 9 deletions Android.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
# Copyright (C) 2016 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -22,20 +25,37 @@

LOCAL_PATH := $(call my-dir)

ifeq ($(TARGET_DEVICE),z2)

include device/zuk/z2/symlinks.mk
ifeq ($(TARGET_DEVICE),z2_plus)

include $(call all-makefiles-under,$(LOCAL_PATH))

include $(CLEAR_VARS)

# END WiFi symlinks
$(shell mkdir -p $(TARGET_OUT_ETC)/firmware/wlan/qca_cld; \
ln -sf /system/etc/wifi/WCNSS_qcom_cfg.ini \
$(TARGET_OUT_ETC)/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini; \
ln -sf /persist/wlan_mac.bin \
$(TARGET_OUT_ETC)/firmware/wlan/qca_cld/wlan_mac.bin)
LOCAL_MODULE := wifi_symlinks
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := FAKE
LOCAL_MODULE_SUFFIX := -timestamp

include $(BUILD_SYSTEM)/base_rules.mk

$(LOCAL_BUILT_MODULE): ACTUAL_INI_FILE := /system/etc/wifi/WCNSS_qcom_cfg.ini
$(LOCAL_BUILT_MODULE): WCNSS_INI_SYMLINK := $(TARGET_OUT)/etc/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini

$(LOCAL_BUILT_MODULE): ACTUAL_MAC_FILE := /persist/wlan_mac.bin
$(LOCAL_BUILT_MODULE): WCNSS_MAC_SYMLINK := $(TARGET_OUT)/etc/firmware/wlan/qca_cld/wlan_mac.bin


$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/Android.mk
$(LOCAL_BUILT_MODULE):
$(hide) echo "Making symlinks for wifi"
$(hide) mkdir -p $(dir $@)
$(hide) mkdir -p $(dir $(WCNSS_INI_SYMLINK))
$(hide) rm -rf $@
$(hide) rm -rf $(WCNSS_INI_SYMLINK)
$(hide) ln -sf $(ACTUAL_INI_FILE) $(WCNSS_INI_SYMLINK)
$(hide) rm -rf $(WCNSS_MAC_SYMLINK)
$(hide) ln -sf $(ACTUAL_MAC_FILE) $(WCNSS_MAC_SYMLINK)
$(hide) touch $@

include $(call all-makefiles-under,$(LOCAL_PATH))

Expand All @@ -50,4 +70,6 @@ $(IMS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)

ALL_DEFAULT_INSTALLED_MODULES += $(IMS_SYMLINKS)

include device/zuk/z2_plus/tftp.mk

endif
36 changes: 21 additions & 15 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (C) 2016 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -18,17 +20,18 @@
# definition file).
#

# Boldly go.
USE_CLANG_PLATFORM_BUILD := true

TARGET_OTA_ASSERT_DEVICE := z2,Z2,z2plus,z2_plus

PLATFORM_PATH := device/zuk/z2
PLATFORM_PATH := device/zuk/z2_plus

TARGET_SPECIFIC_HEADER_PATH := $(PLATFORM_PATH)/include

BOARD_VENDOR := zuk

# Use Snapdragon LLVM, if available
TARGET_USE_SDCLANG := true

# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := msm8996
TARGET_NO_BOOTLOADER := true
Expand Down Expand Up @@ -77,10 +80,10 @@ BLOCK_BASED_OTA := true
BOARD_ANT_WIRELESS_DEVICE := "qualcomm-uart"

# Audio
#AUDIO_FEATURE_ENABLED_AAC_ADTS_OFFLOAD := true
USE_CUSTOM_AUDIO_POLICY := 1
BOARD_USES_ALSA_AUDIO := true
AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true
AUDIO_FEATURE_ENABLED_ACDB_LICENSE := true
#AUDIO_FEATURE_ENABLED_APE_OFFLOAD := true
AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
AUDIO_FEATURE_ENABLED_AUDIOSPHERE := true
AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := true
Expand All @@ -90,17 +93,11 @@ AUDIO_FEATURE_ENABLED_FLAC_OFFLOAD := true
AUDIO_FEATURE_ENABLED_FLUENCE := true
AUDIO_FEATURE_ENABLED_HFP := true
AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
AUDIO_FEATURE_ENABLED_NT_PAUSE_TIMEOUT := true
AUDIO_FEATURE_ENABLED_PCM_OFFLOAD := true
AUDIO_FEATURE_ENABLED_PCM_OFFLOAD_24 := true
AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
#AUDIO_FEATURE_ENABLED_VORBIS_OFFLOAD := true
#AUDIO_FEATURE_ENABLED_WMA_OFFLOAD := true
AUDIO_USE_LL_AS_PRIMARY_OUTPUT := true
BOARD_SUPPORTS_SOUND_TRIGGER := false
BOARD_USES_ALSA_AUDIO := true
USE_CUSTOM_AUDIO_POLICY := 1
AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true

# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(PLATFORM_PATH)/bluetooth
Expand Down Expand Up @@ -149,13 +146,22 @@ VSYNC_EVENT_PHASE_OFFSET_NS := 2000000
SF_VSYNC_EVENT_PHASE_OFFSET_NS := 6000000
#TARGET_USES_HWC2 := true


# Enable dexpreopt to speed boot time
ifeq ($(HOST_OS),linux)
ifeq ($(call match-word-in-list,$(TARGET_BUILD_VARIANT),user),true)
ifeq ($(WITH_DEXPREOPT),)
WITH_DEXPREOPT := true
endif
endif
endif

# GPS
TARGET_NO_RPC := true
USE_DEVICE_SPECIFIC_GPS := true

# Init
TARGET_INIT_VENDOR_LIB := libinit_z2_plus
TARGET_RECOVERY_DEVICE_MODULES := libinit_z2_plus
TARGET_PLATFORM_DEVICE_BASE := /devices/soc/

# Keystore
Expand Down Expand Up @@ -215,4 +221,4 @@ WIFI_DRIVER_MODULE_NAME := "wlan"
WPA_SUPPLICANT_VERSION := VER_0_8_X

# inherit from the proprietary version
-include vendor/zuk/z2/BoardConfigVendor.mk
-include vendor/zuk/z2_plus/BoardConfigVendor.mk
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Device configuration for ZUK Z2.
Device configuration for ZUK Z2;
Based on Davide D M, with commits from oneplus 3;
Edited by Fedor917.
16 changes: 9 additions & 7 deletions cm.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (C) 2016 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -15,21 +17,21 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)

# Inherit from oneplus3 device
$(call inherit-product, device/zuk/z2/device.mk)
$(call inherit-product, device/zuk/z2_plus/device.mk)

# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)

PRODUCT_NAME := cm_z2
PRODUCT_DEVICE := z2
PRODUCT_NAME := cm_z2_plus
PRODUCT_DEVICE := z2_plus
PRODUCT_MANUFACTURER := ZUK
PRODUCT_BRAND := ZUK
PRODUCT_MODEL := Z2
PRODUCT_MODEL := Z2 Plus

PRODUCT_GMS_CLIENTID_BASE := android-zuk

TARGET_VENDOR_PRODUCT_NAME := z2
TARGET_VENDOR_DEVICE_NAME := z2
PRODUCT_BUILD_PROP_OVERRIDES += TARGET_DEVICE=z2 PRODUCT_NAME=z2
TARGET_VENDOR_PRODUCT_NAME := z2_plus
TARGET_VENDOR_DEVICE_NAME := z2_plus
PRODUCT_BUILD_PROP_OVERRIDES += TARGET_DEVICE=z2_plus PRODUCT_NAME=z2_plus

TARGET_VENDOR := zuk
40 changes: 24 additions & 16 deletions device.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (C) 2016 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -18,7 +20,7 @@
# definition file).
#

$(call inherit-product-if-exists, vendor/zuk/z2/z2-vendor.mk)
$(call inherit-product-if-exists, vendor/zuk/z2_plus/z2_plus-vendor.mk)

# Overlays
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
Expand Down Expand Up @@ -72,25 +74,24 @@ TARGET_SCREEN_WIDTH := 1080

PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.heapstartsize=8m \
dalvik.vm.heapgrowthlimit=288m \
dalvik.vm.heapsize=768m \
dalvik.vm.heapgrowthlimit=256m \
dalvik.vm.heapsize=512m \
dalvik.vm.heaptargetutilization=0.75 \
dalvik.vm.heapminfree=512k \
dalvik.vm.heapmaxfree=8m

PRODUCT_PROPERTY_OVERRIDES += \
ro.hwui.texture_cache_size=72 \
ro.hwui.layer_cache_size=48 \
ro.hwui.path_cache_size=32 \
ro.hwui.texture_cache_size=96 \
ro.hwui.layer_cache_size=64 \
ro.hwui.r_buffer_cache_size=12 \
ro.hwui.path_cache_size=39 \
ro.hwui.gradient_cache_size=1 \
ro.hwui.drop_shadow_cache_size=6 \
ro.hwui.r_buffer_cache_size=8 \
ro.hwui.r_buffer_cache_size=8 \
ro.hwui.drop_shadow_cache_size=7 \
ro.hwui.texture_cache_flushrate=0.4 \
ro.hwui.text_small_cache_width=1024 \
ro.hwui.text_small_cache_height=1024 \
ro.hwui.text_large_cache_width=2048 \
ro.hwui.text_large_cache_height=1024
ro.hwui.text_small_cache_width=2048 \
ro.hwui.text_small_cache_height=2048 \
ro.hwui.text_large_cache_width=3072 \
ro.hwui.text_large_cache_height=2048

# Haters gonna hate..
PRODUCT_CHARACTERISTICS := nosdcard
Expand Down Expand Up @@ -146,26 +147,32 @@ PRODUCT_PACKAGES += \

# Doze mode
PRODUCT_PACKAGES += \
CmDoze
ZukDoze

# Fingerprint sensor
PRODUCT_PACKAGES += \
fingerprintd
fingerprintd \
ZukPocketMode

# For android_filesystem_config.h
PRODUCT_PACKAGES += \
fs_config_files

# Gello
PRODUCT_PACKAGES += \
Gello

# GPS
PRODUCT_PACKAGES += \
gps.msm8996 \
libcurl

PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/gps/etc/flp.conf:system/etc/flp.conf \
$(LOCAL_PATH)/gps/etc/gps.conf:system/etc/gps.conf \
$(LOCAL_PATH)/gps/etc/izat.conf:system/etc/izat.conf \
$(LOCAL_PATH)/gps/etc/sap.conf:system/etc/sap.conf \
$(LOCAL_PATH)/gps/etc/lowi.conf:system/etc/lowi.conf \
$(LOCAL_PATH)/gps/etc/sap.conf:system/etc/sap.conf \
$(LOCAL_PATH)/gps/etc/xtwifi.conf:system/etc/xtwifi.conf

# Graphics
Expand Down Expand Up @@ -264,6 +271,7 @@ PRODUCT_PACKAGES += \
libQWiFiSoftApCfg \
libwpa_client \
hostapd \
dhcpcd.conf \
wpa_supplicant \
wpa_supplicant.conf

Expand Down
2 changes: 1 addition & 1 deletion extract-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

export DEVICE=z2
export DEVICE=z2_plus
export VENDOR=zuk

function extract() {
Expand Down
2 changes: 1 addition & 1 deletion setup-makefiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
set -e

# Required!
DEVICE=z2
DEVICE=z2_plus
VENDOR=zuk

# Load extractutils and do some sanity checks
Expand Down

0 comments on commit e20953e

Please sign in to comment.