-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBoardConfigCommon.mk
206 lines (174 loc) · 5.16 KB
/
BoardConfigCommon.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# mt6795 platform boardconfig
LOCAL_PATH := device/xiaomi/mt6795-common
-include vendor/xiaomi/mt6795-common/BoardConfigVendor.mk
TARGET_SPECIFIC_HEADER_PATH := $(LOCAL_PATH)/include
USE_CAMERA_STUB := true
TARGET_PROVIDES_INIT_RC := true
# inherit from the proprietary version
# Platform
ARCH_ARM_HAVE_TLS_REGISTER := true
TARGET_BOARD_PLATFORM := mt6795
TARGET_NO_BOOTLOADER := true
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_NO_FACTORYIMAGE := true
TARGET_LDPRELOAD += libxlog.so:libmtkabi.so
# CPU
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := generic
TARGET_CPU_SMP := true
TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := cortex-a53
TARGET_BOARD_SUFFIX := _64
TARGET_USES_64_BIT_BINDER := true
TARGET_CPU_CORTEX_A53 := true
TARGET_BOOTLOADER_BOARD_NAME := mt6795
# MTK Hardware
BOARD_HAS_MTK_HARDWARE := true
MTK_HARDWARE := true
BOARD_USES_LEGACY_MTK_AV_BLOB := true
COMMON_GLOBAL_CFLAGS += -DMTK_HARDWARE -DADD_LEGACY_ACQUIRE_BUFFER_SYMBOL
COMMON_GLOBAL_CPPFLAGS += -DMTK_HARDWARE
# RIL
# moved to forked frameworks_opt_telephony repo
#BOARD_RIL_CLASS := ../../../$(DEVICE_FOLDER)/ril/
MTK_CIP_SUPPORT := yes
MTK_DT_SUPPORT := no
MTK_VT3G324M_SUPPORT := no
MTK_UMTS_TDD128_MODE := no
MTK_SHARE_MODEM_CURRENT := 1
MTK_SHARE_MODEM_SUPPORT := 2
MTK_MD_SHUT_DOWN_NT := yes
MTK_FD_SUPPORT := yes
MTK_IPV6_SUPPORT := yes
MTK_LTE_SUPPORT := yes
MTK_LTE_DC_SUPPORT := no
MTK_SVLTE_SUPPORT := no
MTK_EAP_SIM_AKA := yes
MTK_IRAT_SUPPORT := no
MTK_DTAG_DUAL_APN_SUPPORT := no
MTK_MD1_SUPPORT := 5
MTK_MD2_SUPPORT := 4
MTK_MD3_SUPPORT := 2
MTK_MD5_SUPPORT := 5
MTK_ENABLE_MD1 = yes
MTK_ENABLE_MD2 = no
MTK_ENABLE_MD3 = no
MTK_ENABLE_MD5 = no
MTK_TC1_FEATURE := no
MTK_SIM_RECOVERY := yes
MTK_SIM_HOT_SWAP_COMMON_SLOT := no
MTK_WORLD_PHONE := yes
MTK_VOLTE_SUPPORT := yes
MTK_VILTE_SUPPORT := yes
MTK_WIFI_CALLING_RIL_SUPPORT := yes
COMMON_GLOBAL_CFLAGS += \
-DMTK_CIP_SUPPORT=1 \
-DMTK_SHARE_MODEM_CURRENT=1 \
-DMTK_SHARE_MODEM_SUPPORT=2 \
-DMTK_MD_SHUTDOWN_NT=1 \
-DMTK_FD_SUPPORT=1 \
-DMTK_IPV6_SUPPORT=1 \
-DMTK_LTE_SUPPORT=1 \
-DMTK_EAP_SIM_AKA=1 \
-DMTK_MD1_SUPPORT=5 \
-DMTK_MD2_SUPPORT=4 \
-DMTK_MD3_SUPPORT=2 \
-DMTK_MD5_SUPPORT=5 \
-DMTK_ENABLE_MD1=1 \
-DMTK_SIM_RECOVERY=1 \
-DMTK_WORLD_PHONE=1 \
-DMTK_VOLTE_SUPPORT=1 \
-DMTK_VILTE_SUPPORT=1 \
-DMTK_WIFI_CALLING_RIL_SUPPORT=1 \
COMMON_GLOBAL_CPPFLAGS += \
-DMTK_CIP_SUPPORT=1 \
-DMTK_SHARE_MODEM_CURRENT=1 \
-DMTK_SHARE_MODEM_SUPPORT=2 \
-DMTK_MD_SHUTDOWN_NT=1 \
-DMTK_FD_SUPPORT=1 \
-DMTK_IPV6_SUPPORT=1 \
-DMTK_LTE_SUPPORT=1 \
-DMTK_EAP_SIM_AKA=1 \
-DMTK_MD1_SUPPORT=5 \
-DMTK_MD2_SUPPORT=4 \
-DMTK_MD3_SUPPORT=2 \
-DMTK_MD5_SUPPORT=5 \
-DMTK_ENABLE_MD1=1 \
-DMTK_SIM_RECOVERY=1 \
-DMTK_WORLD_PHONE=1 \
-DMTK_VOLTE_SUPPORT=1 \
-DMTK_VILTE_SUPPORT=1 \
-DMTK_WIFI_CALLING_RIL_SUPPORT=1 \
BOARD_CONNECTIVITY_VENDOR := MediaTek
BOARD_USES_MTK_AUDIO := true
TARGET_KMODULES := true
# Disable memcpy opt (for audio libraries)
TARGET_CPU_MEMCPY_OPT_DISABLE := true
# Flags
TARGET_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp
TARGET_GLOBAL_CPPFLAGS += -mfpu=neon -mfloat-abi=softfp
COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD
COMMON_GLOBAL_CFLAGS += -DDISABLE_HW_ID_MATCH_CHECK
TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK := true
# LightHAL
TARGET_PROVIDES_LIBLIGHT := true
# Enable Minikin text layout engine (will be the default soon)
USE_MINIKIN := true
# Charger
BOARD_CHARGER_SHOW_PERCENTAGE := true
# Fonts
EXTENDED_FONT_FOOTPRINT := true
TARGET_SYSTEM_PROP := $(LOCAL_PATH)/system.prop
# PREBUILT_Chromium
#PRODUCT_PREBUILT_WEBVIEWCHROMIUM := yes
# GPS
BOARD_GPS_LIBRARIES :=true
BOARD_CONNECTIVITY_MODULE := MT6630
BOARD_MEDIATEK_USES_GPS := true
# FM
MTK_FM_SUPPORT :=true
MTK_FM_RX_SUPPORT :=true
# Consumerir
MTK_IRTX_SUPPORT :=true
# MTK_WLAN_SUPPORT
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_mt66xx
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_mt66xx
WIFI_DRIVER_FW_PATH_PARAM := "/dev/wmtWifi"
WIFI_DRIVER_FW_PATH_STA := STA
WIFI_DRIVER_FW_PATH_AP := AP
WIFI_DRIVER_FW_PATH_P2P := P2P
# make_ext4fs requires numbers in dec format
TARGET_USERIMAGES_USE_EXT4 := true
BOARD_BOOTIMAGE_PARTITION_SIZE := 20971520
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 20971520
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736
BOARD_USERDATAIMAGE_PARTITION_SIZE := 13474725888
BOARD_FLASH_BLOCK_SIZE := 131072
BOARD_HAS_LARGE_FILESYSTEM := true
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/class/android_usb/android0/f_mass_storage/lun/file
# MKImage
TARGET_MKIMAGE := $(LOCAL_PATH)/mkimage
TARGET_USE_BUILT_BOOTIMAGE := true
# Display
USE_OPENGL_RENDERER := true
BOARD_EGL_CFG := $(LOCAL_PATH)/configs/egl.cfg
TARGET_SCREEN_HEIGHT := 1920
TARGET_SCREEN_WIDTH := 1080
BOARD_EGL_WORKAROUND_BUG_10194508 := true
# SELinux
BOARD_SEPOLICY_DIRS += \
device/xiaomi/mt6795-common/sepolicy
# NOTE: remove this once Marshmallow kernel is available
POLICYVERS := 29
# Hack for building without kernel sources
$(shell mkdir -p $(OUT)/obj/KERNEL_OBJ/usr)