This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathBoardConfig.mk
executable file
·381 lines (341 loc) · 9.06 KB
/
BoardConfig.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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
# include proprietary libraries and binaries
-include vendor/ark/benefit_m7/BoardConfigVendor.mk
# use these headers
TARGET_SPECIFIC_HEADER_PATH := device/ark/benefit_m7/include
# Link against libxlog
TARGET_LDPRELOAD += libxlog.so
# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := mt6735m
TARGET_NO_BOOTLOADER := true
# Architecture
TARGET_BOARD_PLATFORM := mt6735m
TARGET_ARCH := arm64
TARGET_NO_BOOTLOADER := true
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_VARIANT := generic
TARGET_BOARD_SUFFIX := _64
#32 bit
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
ARCH_ARM_HAVE_NEON := true
ARCH_ARM_HAVE_VFP := true
ARCH_ARM_HAVE_TLS_REGISTER := true
TARGET_CPU_SMP := true
TARGET_USES_64_BIT_BINDER := true
TARGET_IS_64_BIT := true
TARGET_CPU_CORTEX_A53 := true
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_NO_FACTORYIMAGE := true
TARGET_CPU_ABI_LIST_64_BIT := $(TARGET_CPU_ABI)
TARGET_CPU_ABI_LIST_32_BIT := $(TARGET_2ND_CPU_ABI),$(TARGET_2ND_CPU_ABI2)
TARGET_CPU_ABI_LIST := $(TARGET_CPU_ABI_LIST_64_BIT),$(TARGET_CPU_ABI_LIST_32_BIT)
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_USERIMAGES_USE_EXT4 := true
TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/class/android_usb/android0/f_mass_storage/lun/file
BOARD_KERNEL_CMDLINE := bootopt=64S3,32N2,64N2 androidboot.selinux=permissive
BOARD_KERNEL_BASE := 0x40078000
#extracted from stock recovery
BOARD_KERNEL_PAGESIZE := 2048
BOARD_RAMDISK_OFFSET := 0x03f88000
#extracted from /proc/partinfo
BOARD_BOOTIMAGE_PARTITION_SIZE := 16777216
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 16777216
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648
BOARD_USERDATAIMAGE_PARTITION_SIZE := 1107296256
BOARD_CACHEIMAGE_PARTITION_SIZE := 444596224
#pagesize * 64
BOARD_FLASH_BLOCK_SIZE := 131072
BOARD_MKBOOTIMG_ARGS := --kernel_offset 0x00008000 --ramdisk_offset 0x03f88000 --tags_offset 0x0df88000
# experimental
TARGET_REQUIRES_SYNCHRONOUS_SETSURFACE := true
# build kernel from source
#TARGET_KERNEL_SOURCE := kernel/ark/benefit_m7
#TARGET_KERNEL_ARCH := arm64
#TARGET_KERNEL_HEADER_ARCH := arm64
#TARGET_KERNEL_CONFIG := p8000_defconfig
#TARGET_KERNEL_CROSS_COMPILE_PREFIX := aarch64-linux-android-
#MTK_APPENDED_DTB_SUPPORT := yes
#BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
# Stock_kernel
TARGET_PREBUILT_KERNEL := device/ark/benefit_m7/kernel
# prebuild kernel as fallback
#TARGET_PREBUILT_KERNEL := device/ark/benefit_m7/prebuilt/kernel
# Build an EXT4 ROM image
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_NO_FACTORYIMAGE := true
# system.prop
TARGET_SYSTEM_PROP := device/ark/benefit_m7/system.prop
# CyanogenMod Hardware Hooks
BOARD_HARDWARE_CLASS := device/ark/benefit_m7/cmhw/
# WiFi
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
# RIL
BOARD_CONNECTIVITY_VENDOR := MediaTek
BOARD_USES_LEGACY_MTK_AV_BLOB := true
# Bluetooth
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_MTK := true
BOARD_BLUETOOTH_DOES_NOT_USE_RFKILL := true
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/ark/benefit_m7/bluetooth
# GPS
BOARD_GPS_LIBRARIES :=true
BOARD_CONNECTIVITY_MODULE := conn_soc
BOARD_MEDIATEK_USES_GPS := true
# Camera
USE_CAMERA_STUB := true
# Audio
TARGET_CPU_MEMCPY_OPT_DISABLE := true
BOARD_USES_MTK_AUDIO := true
# FM Radio
MTK_FM_SUPPORT := yes
MTK_FM_RX_SUPPORT := yes
# Mediatek flags
BOARD_HAS_MTK_HARDWARE := true
MTK_HARDWARE := true
COMMON_GLOBAL_CFLAGS += -DMTK_HARDWARE -DADD_LEGACY_ACQUIRE_BUFFER_SYMBOL
COMMON_GLOBAL_CPPFLAGS += -DMTK_HARDWARE
# Fingerprint Sensor
VANZO_FEATURE_ADD_SILEADINC_FP := yes
VANZO_FEATURE_FACTORYMODE_USE_ENGLISH := yes
# EGL settings
USE_OPENGL_RENDERER := true
BOARD_EGL_CFG := device/ark/benefit_m7/egl.cfg
BOARD_EGL_WORKAROUND_BUG_10194508 := true
# SELinux
BOARD_SEPOLICY_DIRS := \
device/ark/benefit_m7/sepolicy
BOARD_SEPOLICY_UNION := \
app.te \
device.te \
domain.te \
file.te \
file_contexts \
fs_use \
installd.te \
net.te \
netd.te \
te_macros \
vold.te \
untrusted_app.te \
platform_app.te \
system_app.te \
zygote.te \
aal.te \
akmd09911.te \
akmd8963.te \
akmd8975.te \
ami304d.te \
ist8303.te \
mc6470d.te \
qmcX983d.te \
st480.te \
af7133e.te \
mmc3524xd.te \
atcid.te \
atci_service.te \
audiocmdservice_atci.te \
batterywarning.te \
bmm050d.te \
bmm056d.te \
bmx056d.te \
boot_logo_updater.te \
br_app_data_service.te \
BGW.te \
ccci_fsd.te \
ccci_mdinit.te \
statusd.te \
flashlessd.te \
ccci_rpcd.te \
eemcs_fsd.te \
eemcs_mdinit.te \
dhcp6c.te \
dm_agent_binder.te \
dualmdlogger.te \
dumpstate.te \
em_svr.te \
enableswap.te \
disableswap.te \
factory.te \
fota1.te \
fuelgauged.te \
geomagneticd.te \
GoogleOtaBinder.te \
gsm0710muxdmd2.te \
gsm0710muxd.te \
guiext-server.te \
ipod.te \
matv.te \
mc6420d.te \
mdlogger.te \
mdnsd.te \
memsicd3416x.te \
bmc156d.te \
memsicd.te \
memsicp.te \
meta_tst.te \
mmc_ffu.te \
mmp.te \
mnld.te \
mobile_log_d.te \
mpud6050.te \
msensord.te \
mtk_6620_launcher.te \
mtk_agpsd.te \
mtkbt.te \
muxreport.te \
netdiag.te \
nvram_agent_binder.te \
nvram_backup_binder.te \
nvram_daemon.te \
orientationd.te \
permission_check.te \
poad.te \
pppd_dt.te \
pppd_via.te \
pq.te \
recovery.te \
resmon.te \
mtkrild.te \
mtkrildmd2.te \
viarild.te \
s62xd.te \
sn.te \
epdg_wod.te \
ipsec.te \
terservice.te \
thermald.te \
thermal_manager.te \
thermal.te \
tiny_mkswap.te \
tiny_swapon.te \
vdc.te \
volte_imcb.te \
volte_ua.te \
volte_stack.te \
wmt_loader.te \
icusbd.te \
xlog.te \
mobicore.te \
install_recovery.te \
program_binary.te \
genfs_contexts
BOARD_SEPOLICY_UNION += \
adbd.te \
bluetooth.te \
bootanim.te \
clatd.te \
drmserver.te \
dhcp.te \
dnsmasq.te \
gpsd.te \
hci_attach.te \
healthd.te \
hostapd.te \
inputflinger.te \
init.te \
init_shell.te \
isolated_app.te \
keystore.te \
kernel.te \
lmkd.te \
logd.te \
mediaserver.te \
mtp.te \
nfc.te \
racoon.te \
radio.te \
rild.te \
runas.te \
sdcardd.te \
servicemanager.te \
shared_relro.te \
shell.te \
system_app.te \
system_server.te \
surfaceflinger.te \
tee.te \
ueventd.te \
uncrypt.te \
watchdogd.te \
wpa_supplicant.te \
wpa.te \
property.te \
property_contexts \
service.te \
dmlog.te \
MtkCodecService.te \
ppl_agent.te \
pvrsrvctl.te \
wifi2agps.te \
dex2oat.te \
emdlogger.te \
autokd.te \
ppp.te \
launchpppoe.te \
sbchk.te \
service_contexts \
ril-3gddaemon.te \
usbdongled.te \
zpppd_gprs.te \
md_ctrl.te \
cmddumper.te \
tunman.te
PRODUCT_PREBUILT_WEBVIEWCHROMIUM := yes
# Block based ota
# see http://review.cyanogenmod.org/#/c/78849/1/core/Makefile
BLOCK_BASED_OTA := false
# recovery
#TARGET_RECOVERY_INITRC := device/ark/benefit_m7/recovery/init.mt6753.rc
TARGET_RECOVERY_FSTAB := device/ark/benefit_m7/recovery/root/fstab.mt6753
TARGET_RECOVERY_LCD_BACKLIGHT_PATH := \"/sys/devices/platform/leds-mt65xx/leds/lcd-backlight/brightness\"
# use power button for selections in recovery
BOARD_HAS_NO_SELECT_BUTTON := true
# ________________________________________________TWRP_________________________________________________
# RECOVERY_VARIANT := twrp
TW_THEME := portrait_hdpi
# brightness settings (needs verification)
TW_BRIGHTNESS_PATH := /sys/devices/platform/leds-mt65xx/leds/lcd-backlight/brightness/
TW_MAX_BRIGHTNESS := 255
# may be useful if we get graphical glitches
RECOVERY_GRAPHICS_USE_LINELENGTH := true
# in case of wrong color this needs modification
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
# if sdcard0 is a /data/media emulated one
RECOVERY_SDCARD_ON_DATA := true
# ntfs support? (needs much space..)
TW_INCLUDE_NTFS_3G := true
# we may need that if sdcard0 dont work
TW_FLASH_FROM_STORAGE := true
TW_EXTERNAL_STORAGE_PATH := "/external_sd"
TW_EXTERNAL_STORAGE_MOUNT_POINT := "external_sd"
TW_DEFAULT_EXTERNAL_STORAGE := true
# name backup folders 'p8000' and not after MTK's fake hardware ID '1234567...'
TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID := true
# we have it and it's enforcing!
TWHAVE_SELINUX := true
#only add if kernel supports
#TW_INCLUDE_FUSE_EXFAT := true
#F2FS support (only activate if kernel supports)
#TARGET_USERIMAGES_USE_F2FS:=true
# encryption
TW_INCLUDE_CRYPTO := true
# Antiforensic wipe
BOARD_SUPPRESS_SECURE_ERASE := true
# CPU temp
TW_CUSTOM_CPU_TEMP_PATH := /sys/devices/virtual/thermal/thermal_zone1/temp