-
Notifications
You must be signed in to change notification settings - Fork 0
/
BoardConfig.mk
322 lines (288 loc) · 7.36 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
LOCAL_PATH := device/S-TELL/M477
# Platform
TARGET_BOARD_PLATFORM := mt6580
TARGET_NO_BOOTLOADER := true
# Architecture
TARGET_ARCH := arm
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_CPU_SMP := true
TARGET_CPU_VARIANT := cortex-a7
ARCH_ARM_HAVE_NEON := true
ARCH_ARM_HAVE_VFP := true
ARCH_ARM_HAVE_TLS_REGISTER := true
TARGET_LDPRELOAD := libxlog.so
BOARD_HAS_NO_SELECT_BUTTON := true
# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := mt6580
# 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
# build kernel from source
TARGET_KERNEL_SOURCE := device/S-TELL/M477/kernel
TARGET_KERNEL_ARCH := arm
TARGET_KERNEL_HEADER_ARCH := arm
BOARD_KERNEL_BASE := 0x80000000
BOARD_KERNEL_PAGESIZE := 2048
BOARD_KERNEL_CMDLINE += \
bootopt=64S3,32S1,32S1 \
androidboot.selinux=permissive
TARGET_PREBUILT_KERNEL := device/S-TELL/M477/kernel
TARGET_PREBUILT_RECOVERY_KERNEL := device/S-TELL/M477/kernel
# Partitions
# make_ext4fs requires numbers in dec format
BOARD_BOOTIMAGE_PARTITION_SIZE := 16777216
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 16777216
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1556925644
BOARD_USERDATAIMAGE_PARTITION_SIZE := 5583457484
BOARD_FLASH_BLOCK_SIZE := 131072
TARGET_USERIMAGES_USE_EXT4:=true
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := false
# Flags
TARGET_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp
TARGET_GLOBAL_CPPFLAGS += -mfpu=neon -mfloat-abi=softfp
TARGET_KMODULES := true
COMMON_GLOBAL_CFLAGS += -DDISABLE_HW_ID_MATCH_CHECK
TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK := true
BOARD_MKBOOTIMG_ARGS := --kernel_offset 0x00008000 --ramdisk_offset 0x04000000 --tags_offset 0x0e000000 --board 1441186574
BOARD_CUSTOM_BOOTIMG := true
TARGET_RECOVERY_FSTAB := device/S-TELL/M477/rootdir/root/fstab.mt6580
TARGET_OTA_ASSERT_DEVICE := M477,S-TELL_M477,"S-TELL M477"
# Hack for build
$(shell mkdir -p $(OUT)/obj/KERNEL_OBJ/usr)
# TWRP
DEVICE_RESOLUTION := 480x854
TARGET_SCREEN_HEIGHT := 854
TARGET_SCREEN_WIDTH := 480
RECOVERY_GRAPHICS_USE_LINELENGTH := true
TW_NO_REBOOT_BOOTLOADER := true
TW_BRIGHTNESS_PATH := /sys/devices/platform/leds-mt65xx/leds/lcd-backlight/brightness
TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/mt_usb/musb-hdrc.0.auto/gadget/lun%d/file
TW_MAX_BRIGHTNESS := 255
TW_INTERNAL_STORAGE_PATH := "/emmc"
TW_INTERNAL_STORAGE_MOUNT_POINT := "emmc"
TW_EXTERNAL_STORAGE_PATH := "/external_sd"
TW_EXTERNAL_STORAGE_MOUNT_POINT := "external_sd"
TW_CRYPTO_FS_TYPE := "ext4"
TW_CRYPTO_REAL_BLKDEV := "/dev/block/mmcblk0p7"
TW_CRYPTO_MNT_POINT := "/data"
TW_CRYPTO_FS_OPTIONS := "nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered"
TW_EXCLUDE_SUPERSU := true
TW_INCLUDE_FB2PNG := true
# Deodex
WITH_DEXPREOPT := false
DISABLE_DEXPREOPT := 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/S-TELL/M477/bluetooth
# EGL settings
BOARD_EGL_CFG := device/S-TELL/M477/rootdir/system/lib/egl/egl.cfg
USE_OPENGL_RENDERER := true
BOARD_EGL_WORKAROUND_BUG_10194508 := true
# Disable memcpy opt (for audio libraries)
TARGET_CPU_MEMCPY_OPT_DISABLE := true
# SELINUX
BOARD_SEPOLICY_DIRS := \
device/S-TELL/M477/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 \
aee_core_forwarder.te \
akmd09911.te \
akmd8963.te \
akmd8975.te \
ami304d.te \
auditd.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 \
debuggerd.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
TARGET_USE_CUSTOM_LUN_FILE_PATH := "/sys/devices/virtual/android_usb/android0/f_mass_storage/lun%d/file"
# RIL
# BOARD_RIL_CLASS := ../../../device/S-TELL/M477/ril/
BOARD_CONNECTIVITY_VENDOR := MediaTek
BOARD_CONNECTIVITY_MODULE := conn_soc
# 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
# GPS
TARGET_SPECIFIC_HEADER_PATH := device/S-TELL/M477/include