This repository has been archived by the owner on Aug 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
OplusKernelEnvConfig.mk
executable file
·112 lines (102 loc) · 3.57 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
# 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>
### ------------------------------------------------------------------------------
##################################################################################
-include oplus_native_features.mk
OPLUS_CONNECTIVITY_NATIVE_FEATURE_SET :=
ifeq ($(OPLUS_FEATURE_WIFI_MTUDETECT), yes)
OPLUS_CONNECTIVITY_NATIVE_FEATURE_SET += OPLUS_FEATURE_WIFI_MTUDETECT
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)) \
) \
)
ALLOWED_MCROS := \
OPLUS_FEATURE_HANS_FREEZE \
OPLUS_FEATURE_AOD \
OPLUS_FEATURE_HEALTHINFO \
OPLUS_FEATURE_TASK_CPUSTATS \
OPLUS_FEATURE_FG_IO_OPT \
OPLUS_FEATURE_SCHED_ASSIST \
OPLUS_FEATURE_SDCARD_INFO \
OPLUS_FEATURE_FINGERPRINT \
OPLUS_FEATURE_STORAGE_TOOL \
OPLUS_FEATURE_MULTI_FREEAREA \
OPLUS_FEATURE_MULTI_KSWAPD \
OPLUS_FEATURE_NFC_CONSOFT \
OPLUS_FEATURE_ONSCREENFINGERPRINT \
OPLUS_FEATURE_PHOENIX \
OPLUS_FEATURE_AGINGTEST \
OPLUS_FEATURE_PROCESS_RECLAIM \
OPLUS_FEATURE_SENSOR \
OPLUS_FEATURE_SENSOR_ALGORITHM \
OPLUS_FEATURE_SENSOR_SMEM \
OPLUS_FEATURE_SENSOR_WISELIGHT \
OPLUS_FEATURE_IOMONITOR \
OPLUS_FEATURE_SPEAKER_MUTE \
OPLUS_FEATURE_MM_FEEDBACK \
OPLUS_FEATURE_CHG_BASIC \
OPLUS_FEATURE_VIRTUAL_RESERVE_MEMORY \
OPLUS_FEATURE_MEMLEAK_DETECT \
OPLUS_FEATURE_WIFI_MTUDETECT \
OPLUS_FEATURE_WIFI_RUSUPGRADE \
OPLUS_FEATURE_WIFI_SLA \
OPLUS_FEATURE_DATA_EVAL \
OPLUS_FEATURE_ZRAM_OPT \
OPLUS_BUG_COMPATIBILITY \
OPLUS_FEATURE_MIDAS \
OPLUS_BUG_STABILITY \
OPLUS_ARCH_INJECT \
OPLUS_ARCH_EXTENDS \
OPLUS_FEATURE_LOWMEM_DBG \
OPLUS_FEATURE_PERFORMANCE \
OPLUS_FEATURE_MTK_ION_SEPARATE_LOCK \
OPLUS_FEATURE_ALARMINFO_STANDBY \
OPLUS_FEATURE_POWERINFO_FTM \
OPLUS_FEATURE_SCHEDUTIL_USE_TL \
OPLUS_FEATURE_CORE_CTL \
OPLUS_FEATURE_CAMERA_COMMON \
OPLUS_FEATURE_WIFI_OPLUSWFD
$(foreach myfeature,$(ALLOWED_MCROS),\
$(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_PREFER_SILVER),yes)
export CONFIG_OPLUS_PREFER_SILVER=y
KBUILD_CFLAGS += -DCONFIG_OPLUS_PREFER_SILVER
KBUILD_CPPFLAGS += -DCONFIG_OPLUS_PREFER_SILVER
CFLAGS_KERNEL += -DCONFIG_OPLUS_PREFER_SILVER
CFLAGS_MODULE += -DCONFIG_OPLUS_PREFER_SILVER
endif
#[email protected], 2020/09/23, add for multibits backlight
ifeq ($(OPLUS_FEATURE_MULTIBITS_BL),yes)
KBUILD_CFLAGS += -DOPLUS_FEATURE_MULTIBITS_BL
KBUILD_CPPFLAGS += -DOPLUS_FEATURE_MULTIBITS_BL
CFLAGS_KERNEL += -DOPLUS_FEATURE_MULTIBITS_BL
CFLAGS_MODULE += -DOPLUS_FEATURE_MULTIBITS_BL
endif
ifeq ($(OPLUS_FEATURE_DFPS3_SUPPORT),yes)
KBUILD_CFLAGS += -DOPLUS_FEATURE_DFPS3_SUPPORT
KBUILD_CPPFLAGS += -DOPLUS_FEATURE_DFPS3_SUPPORT
CFLAGS_KERNEL += -DOPLUS_FEATURE_DFPS3_SUPPORT
CFLAGS_MODULE += -DOPLUS_FEATURE_DFPS3_SUPPORT
endif