-
Notifications
You must be signed in to change notification settings - Fork 5
/
OplusKernelEnvConfig.mk
249 lines (216 loc) · 7.62 KB
/
OplusKernelEnvConfig.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
# Copyright (C), 2008-2030, OPPO Mobile Comm Corp., Ltd
### All rights reserved.
###
### File: - OplusKernelEnvConfig.mk
### Description:
### you can get the oplus feature variables set in android side in this file
### this file will add global macro for common oplus added feature
### BSP team can do customzation by referring the feature variables
### Version: 1.0
### Date: 2020-03-18
### Author: Liang.Sun
###
### ------------------------------- Revision History: ----------------------------
### <author> <date> <version> <desc>
### ------------------------------------------------------------------------------
### [email protected] 2020-03-18 1.0 Create this moudle
##################################################################################
include ./oplus_native_features.mk
###ifdef OPLUS_ARCH_INJECT
OPLUS_CONNECTIVITY_NATIVE_FEATURE_SET :=
ifeq ($(OPLUS_FEATURE_WIFI_MTUDETECT), yes)
OPLUS_CONNECTIVITY_NATIVE_FEATURE_SET += OPLUS_FEATURE_WIFI_MTUDETECT
endif
ifeq ($(OPLUS_FEATURE_WIFI_LIMMITBGSPEED), yes)
OPLUS_CONNECTIVITY_NATIVE_FEATURE_SET += OPLUS_FEATURE_WIFI_LIMMITBGSPEED
endif
$(foreach myfeature,$(OPLUS_CONNECTIVITY_NATIVE_FEATURE_SET),\
$( \
$(eval KBUILD_CFLAGS += -D$(myfeature)) \
$(eval KBUILD_CPPFLAGS += -D$(myfeature)) \
$(eval CFLAGS_KERNEL += -D$(myfeature)) \
$(eval CFLAGS_MODULE += -D$(myfeature)) \
) \
)
###endif OPLUS_ARCH_INJECT
ALLOWED_MCROS := OPLUS_FEATURE_FG_IO_OPT \
OPLUS_FEATURE_SPECIALOPT \
OPLUS_FEATURE_STORAGE_TOOL \
OPLUS_FEATURE_UFS_DRIVER \
OPLUS_FEATURE_UFS_SHOW_LATENCY \
OPLUS_FEATURE_UFSPLUS \
OPLUS_FEATURE_EMMC_SDCARD_OPTIMIZE \
OPLUS_FEATURE_EMMC_DRIVER \
OPLUS_FEATURE_HEALTHINFO \
OPLUS_FEATURE_IOMONITOR \
OPLUS_FEATURE_TASK_CPUSTATS \
OPLUS_FEATURE_HANS_FREEZE \
OPLUS_FEATURE_UIFIRST \
OPLUS_FEATURE_TP_BSPFWUPDATE \
OPLUS_FEATURE_LOWMEM_DBG \
OPLUS_FEATURE_QCOM_PMICWD \
OPLUS_FEATURE_CHG_BASIC \
OPLUS_FEATURE_NWPOWER \
OPLUS_FEATURE_WIFI_BDF \
OPLUS_FEATURE_CONNFCSOFT \
OPLUS_FEATURE_AGINGTEST \
OPLUS_FEATURE_SENSOR_SMEM \
OPLUS_FEATURE_SSR \
OPLUS_FEATURE_TP_BASIC \
OPLUS_FEATURE_EDTASK_IMPROVE \
OPLUS_FEATURE_WIFI_LIMMITBGSPEED \
OPLUS_FEATURE_WIFI_SLA \
OPLUS_FEATURE_DATA_EVAL \
OPLUS_FEATURE_DHCP \
OPLUS_FEATURE_PHOENIX \
OPLUS_FEATURE_DUMPDEVICE \
OPLUS_FEATURE_SAUPWK \
OPLUS_FEATURE_MEMORY_ISOLATE \
OPLUS_FEATURE_MULTI_KSWAPD \
OPLUS_FEATURE_WIFI_MTUDETECT \
OPLUS_FEATURE_XTOWNER_INPUT \
OPLUS_FEATURE_SELINUX_CONTROL_LOG \
OPLUS_FEATURE_PW_4096 \
OPLUS_FEATURE_PXLW_IRIS5 \
OPLUS_FEATURE_MULTI_FREEAREA \
OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY \
OPLUS_FEATURE_GPU_MINIDUMP \
OPLUS_FEATURE_PROCESS_RECLAIM \
OPLUS_FEATURE_ZRAM_OPT \
OPLUS_FEATURE_AUDIO_FTM \
OPLUS_FEATURE_SPEAKER_MUTE \
OPLUS_FEATURE_MM_FEEDBACK \
CONFIG_OPLUS_FEATURE_MM_FEEDBACK \
OPLUS_FEATURE_MI2S_SLAVE \
OPLUS_FEATURE_KTV \
OPLUS_FEATURE_MUTE_DETECT \
OPLUS_FEATURE_MEMLEAK_DETECT \
OPLUS_FEATURE_EXFAT_SUPPORT \
OPLUS_FEATURE_SDCARDFS_SUPPORT \
OPLUS_FEATURE_CAMERA_OIS \
OPLUS_FEATURE_SAU \
OPLUS_BUG_COMPATIBILITY \
OPLUS_BUG_STABILITY \
OPLUS_BUG_DEBUG \
OPLUS_ARCH_INJECT \
OPLUS_ARCH_EXTENDS \
VENDOR_EDIT \
COLOROS_EDIT \
OPLUS_FEATURE_POWERINFO_STANDBY \
OPLUS_FEATURE_POWERINFO_STANDBY_DEBUG \
OPLUS_FEATURE_POWERINFO_RPMH \
OPLUS_FEATURE_POWERINFO_FTM \
OPLUS_FEATURE_CAMERA_COMMON \
OPLUS_FEATURE_ADSP_RECOVERY \
OPLUS_FEATURE_MODEM_MINIDUMP \
OPLUS_FEATURE_MODEM_DATA_NWPOWER \
OPLUS_FEATURE_PERFORMANCE \
OPLUS_FEATURE_THEIA \
OPLUS_FEATURE_POWER_CPUFREQ
$(foreach myfeature,$(ALLOWED_MCROS),\
$(warning make $(myfeature) to be a macro here) \
$(eval KBUILD_CFLAGS += -D$(myfeature)) \
$(eval KBUILD_CPPFLAGS += -D$(myfeature)) \
$(eval CFLAGS_KERNEL += -D$(myfeature)) \
$(eval CFLAGS_MODULE += -D$(myfeature)) \
)
# BSP team can do customzation by referring the feature variables
ifeq ($(OPLUS_FEATURE_SECURE_GUARD),yes)
export CONFIG_OPLUS_SECURE_GUARD=y
KBUILD_CFLAGS += -DCONFIG_OPLUS_SECURE_GUARD
KBUILD_CPPFLAGS += -DCONFIG_OPLUS_SECURE_GUARD
CFLAGS_KERNEL += -DCONFIG_OPLUS_SECURE_GUARD
CFLAGS_MODULE += -DCONFIG_OPLUS_SECURE_GUARD
endif
ifeq ($(OPLUS_FEATURE_QCOM_PMICWD),yes)
export OPLUS_FEATURE_QCOM_PMICWD=yes
export CONFIG_OPLUS_FEATURE_QCOM_PMICWD=y
KBUILD_CFLAGS += -DCONFIG_OPLUS_FEATURE_QCOM_PMICWD
endif
ifeq ($(OPLUS_FEATURE_DUMPDEVICE),yes)
export CONFIG_OPLUS_FEATURE_DUMP_DEVICE_INFO=y
KBUILD_CFLAGS += -DCONFIG_OPLUS_FEATURE_DUMP_DEVICE_INFO
endif
ifeq ($(OPLUS_FEATURE_SECURE_ROOTGUARD),yes)
export CONFIG_OPLUS_ROOT_CHECK=y
KBUILD_CFLAGS += -DCONFIG_OPLUS_ROOT_CHECK
KBUILD_CPPFLAGS += -DCONFIG_OPLUS_ROOT_CHECK
CFLAGS_KERNEL += -DCONFIG_OPLUS_ROOT_CHECK
CFLAGS_MODULE += -DCONFIG_OPLUS_ROOT_CHECK
endif
ifeq ($(OPLUS_FEATURE_SECURE_MOUNTGUARD),yes)
export CONFIG_OPLUS_MOUNT_BLOCK=y
KBUILD_CFLAGS += -DCONFIG_OPLUS_MOUNT_BLOCK
endif
ifeq ($(OPLUS_FEATURE_SECURE_EXECGUARD),yes)
export CONFIG_OPLUS_EXECVE_BLOCK=y
KBUILD_CFLAGS += -DCONFIG_OPLUS_EXECVE_BLOCK
KBUILD_CFLAGS += -DCONFIG_OPLUS_EXECVE_REPORT
endif
ifeq ($(OPLUS_FEATURE_SECURE_KEVENTUPLOAD),yes)
export CONFIG_OPLUS_KEVENT_UPLOAD=y
KBUILD_CFLAGS += -DCONFIG_OPLUS_KEVENT_UPLOAD
KBUILD_CPPFLAGS += -DCONFIG_OPLUS_KEVENT_UPLOAD
CFLAGS_KERNEL += -DCONFIG_OPLUS_KEVENT_UPLOAD
CFLAGS_MODULE += -DCONFIG_OPLUS_KEVENT_UPLOAD
endif
ifeq ($(OPLUS_FEATURE_SECURE_KEYINTERFACESGUARD),yes)
KBUILD_CFLAGS += -DOPPO_DISALLOW_KEY_INTERFACES
endif
# [email protected], 2020/09/25, sepolicy for aod ramless
ifeq ($(OPLUS_FEATURE_AOD_RAMLESS),yes)
KBUILD_CFLAGS += -DOPLUS_FEATURE_AOD_RAMLESS
KBUILD_CPPFLAGS += -DOPLUS_FEATURE_AOD_RAMLESS
CFLAGS_KERNEL += -DOPLUS_FEATURE_AOD_RAMLESS
CFLAGS_MODULE += -DOPLUS_FEATURE_AOD_RAMLESS
endif
#[email protected], 2020/08/28, Add for mm feedback
ifeq ($(OPLUS_FEATURE_MM_FEEDBACK),yes)
export CONFIG_OPLUS_FEATURE_MM_FEEDBACK=y
KBUILD_CFLAGS += -DCONFIG_OPLUS_FEATURE_MM_FEEDBACK
endif
#[email protected], 2020/10/31, add for hdr10 feature
ifeq ($(OPLUS_FEATURE_HDR10),yes)
KBUILD_CFLAGS += -DOPLUS_FEATURE_HDR10
KBUILD_CPPFLAGS += -DOPLUS_FEATURE_HDR10
endif
#[email protected], 2020/10/23, add for DP MAX20328
ifeq ($(OPLUS_FEATURE_DP_MAX20328),yes)
KBUILD_CFLAGS += -DOPLUS_FEATURE_DP_MAX20328
endif
#[email protected], 2020/11/11, add for cabc feature
ifeq ($(OPLUS_FEATURE_LCD_CABC),yes)
KBUILD_CFLAGS += -DOPLUS_FEATURE_LCD_CABC
endif
#[email protected], 2020/12/10, add for 19696 TPS65132
ifeq ($(OPLUS_FEATURE_TPS65132),yes)
KBUILD_CFLAGS += -DOPLUS_FEATURE_TPS65132
endif
#[email protected], 2020/12/29, add for samsung 90fps Global HBM backlight issue
ifeq ($(OPLUS_FEATURE_90FPS_GLOBAL_HBM),yes)
KBUILD_CFLAGS += -DOPLUS_FEATURE_90FPS_GLOBAL_HBM
KBUILD_CPPFLAGS += -DOPLUS_FEATURE_90FPS_GLOBAL_HBM
endif
ifeq ($(OPLUS_FEATURE_SAUPWK),yes)
export CONFIG_OPLUS_FEATURE_SAUPWK=y
KBUILD_CFLAGS += -DCONFIG_OPLUS_FEATURE_SAUPWK
endif
ifeq ($(OPLUS_FEATURE_BRAND_SHOW_FLAG),realme)
export CONFIG_BRAND_SHOW_FLAG=realme
KBUILD_CFLAGS += -DCONFIG_BRAND_SHOW_FLAG
endif
ifeq ($(OPLUS_FEATURE_SHIPPING_API_LEVEL),28)
export CONFIG_SHIPPING_API_LEVEL=28
KBUILD_CFLAGS += -DCONFIG_SHIPPING_API_LEVEL
endif
ifeq ($(OPLUS_FEATURE_OPPO_TARGET_DEVICE),MSM_18115)
export CONFIG_OPPO_TARGET_DEVICE=18115
KBUILD_CFLAGS += -DCONFIG_OPPO_TARGET_DEVICE
else ifeq ($(OPLUS_FEATURE_OPPO_TARGET_DEVICE),MSM_18501)
export CONFIG_OPPO_TARGET_DEVICE=18501
KBUILD_CFLAGS += -DCONFIG_OPPO_TARGET_DEVICE
else ifeq ($(OPLUS_FEATURE_OPPO_TARGET_DEVICE),MSM_19081)
export CONFIG_OPPO_TARGET_DEVICE=19081
KBUILD_CFLAGS += -DCONFIG_OPPO_TARGET_DEVICE
export CONFIG_PROJECT_INFO=y
endif