-
Notifications
You must be signed in to change notification settings - Fork 19
/
BoardConfig.mk
executable file
·332 lines (295 loc) · 7.11 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
# mt6795 platform boardconfig
LOCAL_PATH := device/xiaomi/hermes
-include vendor/xiaomi/hermes/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
# 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
BOARD_CONNECTIVITY_VENDOR := MediaTek
BOARD_USES_MTK_AUDIO := true
# kernel
TARGET_USES_64_BIT_BINDER := true
TARGET_IS_64_BIT := true
BOARD_KERNEL_CMDLINE := bootopt=64S3,32N2,64N2 androidboot.selinux=permissive
BOARD_KERNEL_BASE := 0x40078000
BOARD_KERNEL_PAGESIZE := 2048
BOARD_MKBOOTIMG_ARGS := --base 0x40078000 --pagesize 2048 --kernel_offset 0x00008000 --ramdisk_offset 0x03f88000 --second_offset 0x00e88000 --tags_offset 0x0df88000 --board Bule
TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel
BOARD_CUSTOM_BOOTIMG := true
# MKImage
TARGET_MKIMAGE := $(LOCAL_PATH)/mkimage
TARGET_USE_BUILT_BOOTIMAGE := true
TARGET_KMODULES := true
# Disable memcpy opt (for audio libraries)
TARGET_CPU_MEMCPY_OPT_DISABLE := 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
# 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
# Bluetooth
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_MTK := true
BOARD_BLUETOOTH_DOES_NOT_USE_RFKILL := true
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_PATH)/bluetooth
# 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
BOARD_HAS_NO_SELECT_BUTTON := true
BOARD_RECOVERY_SWIPE := true
BOARD_SUPPRESS_EMMC_WIPE := true
BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_15x24.h\"
TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/ramdisk/recovery.fstab
TARGET_RECOVERY_PIXEL_FORMAT := "RGBA_8888"
TARGET_USERIMAGES_USE_EXT4 := true
# SELinux
BOARD_SEPOLICY_DIRS := \
device/xiaomi/hermes/sepolicy
#SELinux: MTK added
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 \
ist8303.te \
st480.te \
af7133e.te \
mc6470d.te \
qmcX983d.te \
atcid.te \
atci_service.te \
audiocmdservice_atci.te \
batterywarning.te \
bmm050d.te \
bmm056d.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 \
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 \
memsicd.te \
meta_tst.te \
mmc_ffu.te \
mmp.te \
mnld.te \
mobile_log_d.te \
mpud6050.te \
msensord.te \
mmc3524xd.te \
mtk_6620_launcher.te \
mtk_agpsd.te \
mtkbt.te \
muxreport.te \
netdiag.te \
nvram_agent_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 \
vtservice.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