This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.mk
270 lines (233 loc) · 6.75 KB
/
common.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
# Copyright 2021 Paranoid Android
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
QCOM_COMMON_PATH := device/qcom/common
ifeq ($(TARGET_BOARD_PLATFORM),)
$(error "TARGET_BOARD_PLATFORM is not defined yet, please define in your device makefile so it's accessible to QCOM common.")
endif
# List of QCOM targets.
MSMSTEPPE := sm6150
TRINKET := trinket
QCOM_BOARD_PLATFORMS += \
$(MSMSTEPPE) \
$(TRINKET) \
apq8084 \
apq8098_latv \
atoll \
bengal \
holi \
kona \
lahaina \
lito \
mpq8092 \
msm8226 \
msm8610 \
msm8909 \
msm8909_512 \
msm8916 \
msm8916_32 \
msm8916_32_512 \
msm8916_64 \
msm8937 \
msm8952 \
msm8953 \
msm8974 \
msm8992 \
msm8994 \
msm8996 \
msm8998 \
msmnile \
msmnile_au \
msm_bronze \
parrot \
qcs605 \
sdm660 \
sdm710 \
sdm845 \
taro
# List of targets that use video hardware.
MSM_VIDC_TARGET_LIST := \
$(MSMSTEPPE) \
$(TRINKET) \
apq8084 \
apq8098_latv \
atoll \
kona \
lito \
msm8226 \
msm8610 \
msm8909 \
msm8916 \
msm8937 \
msm8952 \
msm8953 \
msm8974 \
msm8992 \
msm8994 \
msm8996 \
msm8998 \
msmnile \
qcs605 \
sdm660 \
sdm710 \
sdm845
# List of targets that use master side content protection.
MASTER_SIDE_CP_TARGET_LIST := \
$(MSMSTEPPE) \
$(TRINKET) \
apq8098_latv \
atoll \
bengal \
kona \
lito \
msm8996 \
msm8998 \
msmnile \
qcs605 \
sdm660 \
sdm710 \
sdm845
# Include QCOM board utilities.
include $(QCOM_COMMON_PATH)/utils.mk
# Kernel Families
5_10_FAMILY := \
parrot \
taro
5_4_FAMILY := \
holi \
lahaina
4_19_FAMILY := \
bengal \
kona \
lito
4_14_FAMILY := \
$(MSMSTEPPE) \
$(TRINKET) \
atoll \
msmnile \
msmnile_au
4_9_FAMILY := \
msm8953 \
qcs605 \
sdm710 \
sdm845
4_4_FAMILY := \
msm8998 \
sdm660
3_18_FAMILY := \
msm8937 \
msm8996
ifeq ($(call is-board-platform-in-list,$(5_10_FAMILY)),true)
TARGET_KERNEL_VERSION ?= 5.10
else ifeq ($(call is-board-platform-in-list,$(5_4_FAMILY)),true)
TARGET_KERNEL_VERSION ?= 5.4
TARGET_HALS_VARIANT ?= sm8350
else ifeq ($(call is-board-platform-in-list,$(4_9_FAMILY)),true)
TARGET_KERNEL_VERSION ?= 4.9
TARGET_HALS_VARIANT ?= sdm845
else ifeq ($(call is-board-platform-in-list,$(4_4_FAMILY)),true)
TARGET_KERNEL_VERSION ?= 4.4
TARGET_HALS_VARIANT ?= msm8998
else ifeq ($(call is-board-platform-in-list,$(3_18_FAMILY)),true)
TARGET_KERNEL_VERSION ?= 3.18
TARGET_HALS_VARIANT ?= msm8996
endif
# Override Hals
ifeq ($(TARGET_USE_SM8150_HALS),true)
TARGET_KERNEL_VERSION ?= 4.14
TARGET_HALS_VARIANT ?= sm8150-common
else ifeq ($(TARGET_USE_SM8250_HALS),true)
TARGET_KERNEL_VERSION ?= 4.19
TARGET_HALS_VARIANT ?= sm8250-common
endif
TARGET_HALS_PATH ?= hardware/qcom-caf/$(TARGET_HALS_VARIANT)
ifeq ($(call is-board-platform-in-list,$(QCOM_BOARD_PLATFORMS)),true)
TARGET_FWK_SUPPORTS_FULL_VALUEADDS ?= true
ifeq ($(TARGET_FWK_SUPPORTS_FULL_VALUEADDS),true)
# Compatibility matrix
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += \
$(QCOM_COMMON_PATH)/vendor_framework_compatibility_matrix.xml
PRODUCT_VENDOR_PROPERTIES += ro.vendor.qti.va_aosp.support=1
PRODUCT_ODM_PROPERTIES += ro.vendor.qti.va_odm.support=1
endif
# Components
include $(QCOM_COMMON_PATH)/components.mk
# Filesystem
TARGET_FS_CONFIG_GEN += $(QCOM_COMMON_PATH)/config.fs
# Power
ifneq ($(TARGET_PROVIDES_POWERHAL),true)
$(call inherit-product-if-exists, vendor/qcom/opensource/power/power-vendor-product.mk)
endif
# Public Libraries
PRODUCT_COPY_FILES += \
$(QCOM_COMMON_PATH)/system/public.libraries.system_ext-qti.txt:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/public.libraries-qti.txt
# SECCOMP Extensions
PRODUCT_COPY_FILES += \
$(QCOM_COMMON_PATH)/vendor/seccomp/codec2.software.ext.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/codec2.software.ext.policy \
$(QCOM_COMMON_PATH)/vendor/seccomp/codec2.vendor.ext.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/codec2.vendor.ext.policy \
$(QCOM_COMMON_PATH)/vendor/seccomp/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
$(QCOM_COMMON_PATH)/vendor/seccomp/mediaextractor-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaextractor.policy
# Permissions
PRODUCT_COPY_FILES += \
$(QCOM_COMMON_PATH)/permissions/privapp-permissions-qti.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-qti.xml \
$(QCOM_COMMON_PATH)/permissions/privapp-permissions-hotword.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-hotword.xml \
$(QCOM_COMMON_PATH)/permissions/qti_whitelist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/qti_whitelist.xml
# HIDL
PRODUCT_PACKAGES += \
[email protected]_system \
[email protected]_system \
libhidltransport.vendor \
libhwbinder.vendor
# Neural Network
PRODUCT_PACKAGES += \
libprotobuf-cpp-full-rtti
# Pre-optimization
PRODUCT_DEXPREOPT_SPEED_APPS += \
SystemUI
# Compile SystemUI on device with `speed`.
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.systemuicompilerfilter=speed
# QTI framework detect
PRODUCT_PACKAGES += \
libvndfwk_detect_jni.qti \
libqti_vndfwk_detect \
libvndfwk_detect_jni.qti.vendor \
libqti_vndfwk_detect.vendor \
libqti_vndfwk_detect_system \
libqti_vndfwk_detect_vendor \
libvndfwk_detect_jni.qti_system \
libvndfwk_detect_jni.qti.vendor \
# QSSI properties
PRODUCT_SYSTEM_EXT_PROPERTIES += \
arm64.memtag.process.system_server=off \
dalvik.vm.dex2oat64.enabled=true \
ro.launcher.blur.appLaunch=0 \
# Disable RescueParty due to high risk of data loss
PRODUCT_PRODUCT_PROPERTIES += \
persist.sys.disable_rescue=true
# Vendor Service Manager
PRODUCT_PACKAGES += \
vndservicemanager
# Common android HIDL vendor variant
PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
endif # QCOM_BOARD_PLATFORMS