-
Notifications
You must be signed in to change notification settings - Fork 0
/
qssi.mk
290 lines (218 loc) · 8.78 KB
/
qssi.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
#For QSSI, we build only the system image. Here we explicitly set the images
#we build so there is no confusion.
TARGET_BOARD_PLATFORM := qssi
TARGET_BOOTLOADER_BOARD_NAME := qssi
# Skip VINTF checks for kernel configs since we do not have kernel source
PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false
#Enable product partition Native I/F. It is automatically set to current if
#the shipping API level for the target is greater than 29
PRODUCT_PRODUCT_VNDK_VERSION := current
RELAX_USES_LIBRARY_CHECK := true
NEED_AIDL_NDK_PLATFORM_BACKEND := true
#Enable product partition Java I/F. It is automatically set to true if
#the shipping API level for the target is greater than 29
PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE := true
PRODUCT_BUILD_SYSTEM_IMAGE := true
PRODUCT_BUILD_SYSTEM_OTHER_IMAGE := false
PRODUCT_BUILD_VENDOR_IMAGE := false
PRODUCT_BUILD_SYSTEM_EXT_IMAGE := false
PRODUCT_BUILD_ODM_IMAGE := false
PRODUCT_BUILD_CACHE_IMAGE := false
PRODUCT_BUILD_USERDATA_IMAGE := false
# Enable debugfs restrictions
PRODUCT_SET_DEBUGFS_RESTRICTIONS := true
#Also, there is no need to build an OTA package as this will be done later
#when we combine this system build with the non-system images.
TARGET_SKIP_OTA_PACKAGE := true
# Enable AVB 2.0
BOARD_AVB_ENABLE := true
#### Dynamic Partition Handling
####
# Retain the earlier default behavior i.e. ota config (dynamic partition was disabled if not set explicitly), so set
# SHIPPING_API_LEVEL to 28 if it was not set earlier (this is generally set earlier via build.sh per-target)
SHIPPING_API_LEVEL := 33
$(call inherit-product-if-exists, vendor/qcom/defs/product-defs/system/cne_url*.mk)
#### Turning BOARD_DYNAMIC_PARTITION_ENABLE flag to TRUE will enable dynamic partition/super image creation.
# Enable Dynamic partitions only for Q new launch devices and beyond.
ifeq (true,$(call math_gt_or_eq,$(SHIPPING_API_LEVEL),29))
BOARD_DYNAMIC_PARTITION_ENABLE ?= true
PRODUCT_SHIPPING_API_LEVEL := $(SHIPPING_API_LEVEL)
else ifeq ($(SHIPPING_API_LEVEL),28)
BOARD_DYNAMIC_PARTITION_ENABLE ?= false
$(call inherit-product, build/make/target/product/product_launched_with_p.mk)
endif
ifneq ($(strip $(BOARD_DYNAMIC_PARTITION_ENABLE)),true)
# Enable chain partition for system, to facilitate system-only OTA in Treble.
BOARD_AVB_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_SYSTEM_ALGORITHM := SHA256_RSA2048
BOARD_AVB_SYSTEM_ROLLBACK_INDEX := 0
BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
PRODUCT_BUILD_RAMDISK_IMAGE := false
PRODUCT_BUILD_PRODUCT_IMAGE := false
else
PRODUCT_USE_DYNAMIC_PARTITIONS := true
# Disable building the SUPER partition in this build. SUPER should be built
# after QSSI has been merged with the SoC build.
PRODUCT_BUILD_SYSTEM_EXT_IMAGE := true
PRODUCT_BUILD_PRODUCT_IMAGE := true
PRODUCT_BUILD_SUPER_PARTITION := false
PRODUCT_BUILD_RAMDISK_IMAGE := true
BOARD_AVB_VBMETA_SYSTEM := system system_ext product
BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2
endif
#### Dynamic Partition Handling
PRODUCT_SOONG_NAMESPACES += \
hardware/google/av \
hardware/google/interfaces
VENDOR_QTI_PLATFORM := qssi
VENDOR_QTI_DEVICE := qssi
#QSSI configuration
#Single system image project structure
TARGET_USES_QSSI := true
TARGET_USES_NEW_ION := true
ENABLE_AB ?= true
TARGET_DEFINES_DALVIK_HEAP := true
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, device/qcom/qssi/common64.mk)
#Inherit all except heap growth limit from phone-xhdpi-2048-dalvik-heap.mk
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.heapstartsize=8m \
dalvik.vm.heapsize=512m \
dalvik.vm.heaptargetutilization=0.75 \
dalvik.vm.heapminfree=512k \
dalvik.vm.heapmaxfree=8m
PRODUCT_NAME := $(VENDOR_QTI_DEVICE)
PRODUCT_DEVICE := $(VENDOR_QTI_DEVICE)
PRODUCT_BRAND := qti
PRODUCT_MODEL := qssi system image for arm64
PRODUCT_EXTRA_VNDK_VERSIONS := 30 31 32
#Initial bringup flags
TARGET_USES_AOSP := false
TARGET_USES_AOSP_FOR_AUDIO := false
TARGET_USES_QCOM_BSP := false
# RRO configuration
TARGET_USES_RRO := true
TARGET_USES_NQ_NFC := true
# default is nosdcard, S/W button enabled in resource
PRODUCT_CHARACTERISTICS := nosdcard
BOARD_FRP_PARTITION_NAME := frp
#Android EGL implementation
PRODUCT_PACKAGES += libGLES_android
PRODUCT_PACKAGES += fsck.exfat
PRODUCT_PACKAGES += mkfs.exfat
PRODUCT_BOOT_JARS += tcmiface
PRODUCT_BOOT_JARS += telephony-ext
PRODUCT_PACKAGES += telephony-ext
TARGET_ENABLE_QC_AV_ENHANCEMENTS := false
TARGET_SYSTEM_PROP += device/qcom/qssi/system.prop
TARGET_DISABLE_DASH := true
TARGET_DISABLE_QTI_VPP := true
ifneq ($(TARGET_DISABLE_DASH), true)
PRODUCT_BOOT_JARS += qcmediaplayer
endif
#Project is missing on sdm845, comment it for now
#ifneq ($(strip $(QCPATH)),)
# PRODUCT_BOOT_JARS += libprotobuf-java_mls
#endif
PRODUCT_PACKAGES += [email protected]
# Audio configuration file
AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true
USE_LIB_PROCESS_GROUP := true
PRODUCT_PACKAGES += fs_config_files
ifeq ($(ENABLE_AB), true)
#A/B related packages
PRODUCT_PACKAGES += update_engine \
update_engine_client \
update_verifier \
bootctrl.msmnile \
PRODUCT_HOST_PACKAGES += \
brillo_update_payload
#Boot control HAL test app
PRODUCT_PACKAGES_DEBUG += bootctl
endif
#Healthd packages
PRODUCT_PACKAGES += \
libhealthd.msm
DEVICE_FRAMEWORK_MANIFEST_FILE := device/qcom/qssi/framework_manifest.xml
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := vendor/qcom/opensource/core-utils/vendor_framework_compatibility_matrix.xml
#audio related module
PRODUCT_PACKAGES += libvolumelistener
# Display/Graphics
PRODUCT_PACKAGES += \
# Camera configuration file. Shared by passthrough/binderized camera HAL
PRODUCT_PACKAGES += [email protected]
PRODUCT_PACKAGES += [email protected]
PRODUCT_PACKAGES += [email protected]
# Enable binderized camera HAL
PRODUCT_PACKAGES += [email protected]_64
# Context hub HAL
PRODUCT_PACKAGES += \
# system prop for enabling QFS (QTI Fingerprint Solution)
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.qfp=true
PRODUCT_SYSTEM_PROPERTIES += \
persist.device_config.runtime_native_boot.iorap_perfetto_enable=true
# USB default HAL
PRODUCT_PACKAGES += \
#PASR HAL and APP
PRODUCT_PACKAGES += \
pasrservice
# Kernel modules install path
KERNEL_MODULES_INSTALL := dlkm
KERNEL_MODULES_OUT := out/target/product/$(PRODUCT_NAME)/$(KERNEL_MODULES_INSTALL)/lib/modules
ifneq ($(strip $(TARGET_BUILD_VARIANT)),user)
PRODUCT_COPY_FILES += \
device/qcom/qssi/init.qcom.testscripts.sh:$(TARGET_COPY_OUT_PRODUCT)/etc/init.qcom.testscripts.sh
endif
PRODUCT_COPY_FILES += \
device/qcom/qssi/public.libraries.product-qti.txt:$(TARGET_COPY_OUT_PRODUCT)/etc/public.libraries-qti.txt
# copy system_ext specific whitelisted libraries to system_ext/etc
PRODUCT_COPY_FILES += \
device/qcom/qssi/public.libraries.system_ext-qti.txt:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/public.libraries-qti.txt
#Enable full treble flag
PRODUCT_FULL_TREBLE_OVERRIDE := true
PRODUCT_VENDOR_MOVE_ENABLED := true
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true
ifneq ($(strip $(TARGET_USES_RRO)),true)
DEVICE_PACKAGE_OVERLAYS += device/qcom/qssi/overlay
endif
#Enable vndk-sp Libraries
PRODUCT_PACKAGES += vndk_package
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE:=true
TARGET_MOUNT_POINTS_SYMLINKS := false
TARGET_USES_MKE2FS := true
PRODUCT_PROPERTY_OVERRIDES += \
ro.crypto.volume.filenames_mode = "aes-256-cts" \
ro.crypto.allow_encrypt_override = true
TARGET_USES_QCOM_DISPLAY_BSP := true
ifeq ($(TARGET_USES_NEW_ION),true)
AUDIO_FEATURE_ENABLED_DLKM := true
else
AUDIO_FEATURE_ENABLED_DLKM := false
endif
# Enable virtual A/B compression
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/android_t_baseline.mk)
PRODUCT_VIRTUAL_AB_COMPRESSION_METHOD := gz
# Include mainline components and QSSI whitelist
ifeq (true,$(call math_gt_or_eq,$(SHIPPING_API_LEVEL),29))
$(call inherit-product, device/qcom/qssi/qssi_whitelist.mk)
PRODUCT_ARTIFACT_PATH_REQUIREMENT_IGNORE_PATHS := /system/system_ext/
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
endif
# QTI Components
TARGET_COMMON_QTI_COMPONENTS := all