-
Notifications
You must be signed in to change notification settings - Fork 145
Expand file tree
/
Copy pathcommon.mk
More file actions
229 lines (188 loc) · 9.02 KB
/
common.mk
File metadata and controls
229 lines (188 loc) · 9.02 KB
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
# Copyright (C) 2014 The Android Open Source Project
#
# 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.
# Common path
COMMON_PATH := device/sony/common
ifneq ($(filter 5.10, $(SOMC_KERNEL_VERSION)),)
display_platform := sm8450
ipa_platform := data-ipacfg-mgr
else
display_platform := sm8550
ipa_platform := data-ipacfg-mgr
endif
ifeq ($(TARGET_USES_AUDIOREACH),true)
audio_platform := primary-hal-ar
else
audio_platform := primary-hal
endif
# Enable building packages from device namspaces.
# Might be temporary! See:
# https://android.googlesource.com/platform/build/soong/+/master/README.md#name-resolution
PRODUCT_SOONG_NAMESPACES += \
$(COMMON_PATH) \
$(PLATFORM_COMMON_PATH) \
vendor/qcom/opensource/core-utils \
vendor/qcom/opensource/audio-hal/$(audio_platform) \
vendor/qcom/opensource/display/$(display_platform) \
vendor/qcom/opensource/display-commonsys-intf/$(display_platform) \
vendor/qcom/opensource/$(ipa_platform)
# Wi-Fi HAL
ifeq ($(BOARD_WLAN_CHIP),wcn6740)
PRODUCT_SOONG_NAMESPACES += \
hardware/qcom/wlan/wcn6740
else
PRODUCT_SOONG_NAMESPACES += \
hardware/qcom/wlan/legacy
endif
# Build scripts
SONY_CLEAR_VARS := $(COMMON_PATH)/sony_clear_vars.mk
SONY_BUILD_SYMLINKS := $(COMMON_PATH)/sony_build_symlinks.mk
DEVICE_PACKAGE_OVERLAYS += $(COMMON_PATH)/overlay
PRODUCT_ENFORCE_RRO_TARGETS := *
# Fingerprint overlay
ifneq ($(TARGET_DEVICE_NO_FPC), true)
PRODUCT_PACKAGES += \
FingerprintResCommon
endif
# Telephony overlay
ifeq ($(PRODUCT_DEVICE_DS),true)
PRODUCT_PACKAGES += \
RilResCommon-DS
else
PRODUCT_PACKAGES += \
RilResCommon-SS
endif
# Wifi overlay
PRODUCT_PACKAGES += \
WifiResCommon
PRODUCT_DEXPREOPT_SPEED_APPS += SystemUI
# Google GSI public keys for /avb
# Needed for official GSIs while maintaining AVB and vbmeta.
$(call inherit-product, device/sony/common/common-gsi.mk)
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
# Developer GSI images
# https://developer.android.com/topic/generic-system-image/releases
$(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk)
endif
# Force using the following regardless of shipping API level:
# PRODUCT_TREBLE_LINKER_NAMESPACES
# PRODUCT_SEPOLICY_SPLIT
# PRODUCT_ENFORCE_VINTF_MANIFEST
# PRODUCT_NOTICE_SPLIT
PRODUCT_FULL_TREBLE_OVERRIDE := true
# VNDK
# Force using VNDK regardless of shipping API level
PRODUCT_USE_VNDK_OVERRIDE := true
# Include vndk/vndk-sp/ll-ndk modules
PRODUCT_PACKAGES += \
vndk_package
# Force building a recovery image: Needed for OTA packaging to work since Q
PRODUCT_BUILD_RECOVERY_IMAGE := true
KERNEL_PATH := kernel/sony/msm-$(SOMC_KERNEL_VERSION)
# Sanitized prebuilt kernel headers
-include $(KERNEL_PATH)/common-headers/KernelHeaders.mk
# Configure qti-headers auxiliary module via soong so that the correct headers
# under kernel/sony/msm-X.Y/kernel-headers are chosen
$(call soong_config_set,qti_kernel_headers,version,$(SOMC_KERNEL_VERSION))
# Build 64bit audio service
$(call soong_config_set,android_hardware_audio,run_64bit,true)
# Explicitly enable UFFD GC
OVERRIDE_ENABLE_UFFD_GC := true
# Codecs Configuration
PRODUCT_COPY_FILES += \
frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml
# Common etc
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/system/etc/nfcee_access.xml:system/etc/nfcee_access.xml
# GPS Configuration
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/vendor/etc/gps.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gps.conf
# QMI Configuration
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/vendor/etc/qmi_fw.conf:$(TARGET_COPY_OUT_VENDOR)/etc/qmi_fw.conf
# QMI
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/vendor/etc/data/dsi_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/data/dsi_config.xml \
$(COMMON_PATH)/rootdir/vendor/etc/data/netmgr_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/data/netmgr_config.xml \
$(COMMON_PATH)/rootdir/vendor/etc/data/qmi_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/data/qmi_config.xml
# QSEECOM TZ Storage
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/vendor/etc/gpfspath_oem_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gpfspath_oem_config.xml
# Sec Configuration
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/vendor/etc/sec_config:$(TARGET_COPY_OUT_VENDOR)/etc/sec_config
# Seccomp policy
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/vendor/etc/seccomp_policy/qcrilnr@2.0.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/qcrilnr@2.0.policy \
$(COMMON_PATH)/rootdir/vendor/etc/seccomp_policy/modemManager.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/modemManager.policy \
$(COMMON_PATH)/rootdir/vendor/etc/seccomp_policy/qesdk.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/qesdk.policy \
$(COMMON_PATH)/rootdir/vendor/etc/seccomp_policy/sensors-qesdk.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/sensors-qesdk.policy \
$(COMMON_PATH)/rootdir/vendor/etc/seccomp_policy/vendor.qti.hardware.dsp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/vendor.qti.hardware.dsp.policy \
$(COMMON_PATH)/rootdir/vendor/etc/seccomp_policy/imsrtp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/imsrtp.policy \
$(COMMON_PATH)/rootdir/vendor/etc/seccomp_policy/mediacodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
$(COMMON_PATH)/rootdir/vendor/etc/seccomp_policy/codec2.vendor.base-arm64.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/codec2.vendor.base-arm64.policy
# Sensors
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/vendor/etc/sensors/hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/hals.conf \
$(COMMON_PATH)/rootdir/vendor/etc/sensors/sns_reg_config:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/sns_reg_config
# Audio Configuration
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/vendor/etc/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \
frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml
# Additional native libraries
# See https://source.android.com/devices/tech/config/namespaces_libraries
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/vendor/etc/public.libraries.txt:$(TARGET_COPY_OUT_VENDOR)/etc/public.libraries.txt
# ramdump cleaner
PRODUCT_PACKAGES_DEBUG += \
rdclean.sh
# Depend on symlink creation in /vendor:
PRODUCT_PACKAGES += \
adreno_symlinks \
camera_symlinks \
qca_cld3_symlinks \
rfsa_symlinks \
tftp_symlinks
# Create firmware mount point folders in /vendor:
PRODUCT_PACKAGES += \
firmware_folders
ifeq ($(MODEM_CONFIG_LEGACY_PLATFORM),true)
MODEM_CONFIG := $(shell find $(COMMON_PATH)/rootdir/vendor/etc/modem-config-legacy -type f -printf '%p:$(TARGET_COPY_OUT_VENDOR)/etc/modem-config/%P\n')
else
MODEM_CONFIG := $(shell find $(COMMON_PATH)/rootdir/vendor/etc/modem-config -type f -printf '%p:$(TARGET_COPY_OUT_VENDOR)/etc/modem-config/%P\n')
endif
PRODUCT_COPY_FILES += $(MODEM_CONFIG)
# Bluetooth
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/vendor/etc/sysconfig/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml
-include device/sony/customization/customization.mk
USE_SODP_APNS ?= true
ifeq ($(USE_SODP_APNS),true)
# Community APN list
PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/vendor/etc/apns-conf.xml:system/etc/apns-conf.xml
endif #USE_SODP_APNS
$(call inherit-product, device/sony/common/common-init.mk)
$(call inherit-product, device/sony/common/common-odm.mk)
$(call inherit-product, device/sony/common/common-odm-camx.mk)
$(call inherit-product, device/sony/common/common-packages.mk)
$(call inherit-product, device/sony/common/common-perm.mk)
$(call inherit-product, device/sony/common/common-prop.mk)
$(call inherit-product, device/sony/common/common-sanitizer.mk)
$(call inherit-product, device/sony/common/common-treble.mk)
$(call inherit-product, device/sony/common/common-binds.mk)