-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.mk
129 lines (103 loc) · 3.85 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
#
# Copyright (C) 2022 Project ICE
#
# 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.
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
include $(LOCAL_PATH)/qcom_boards.mk
ifeq ($(call is-board-platform-in-list,$(QCOM_BOARD_PLATFORMS)),true)
TARGET_COMPILE_WITH_MSM_KERNEL := true
TARGET_HAS_QC_KERNEL_SOURCE := true
BOARD_USES_ADRENO := true
BOARD_USES_QCNE := true
# Allow building audio encoders
TARGET_USES_QCOM_MM_AUDIO := true
# Skip boot jars check
SKIP_BOOT_JARS_CHECK := true
# Compatibility matrix
ifeq ($(TARGET_FWK_SUPPORTS_FULL_VALUEADDS),true)
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += \
vendor/qcom/opensource/core-utils/vendor_framework_compatibility_matrix.xml
endif
# SECCOMP Extension
BOARD_SECCOMP_POLICY += device/qcom/common/seccomp
PRODUCT_COPY_FILES += \
device/qcom/common/seccomp/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
device/qcom/common/seccomp/mediaextractor-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaextractor.policy
# Mark GRALLOC_USAGE_PRIVATE_WFD as valid gralloc bits
TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0
TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS += | (1 << 21)
# Advanced DPM
ifeq ($(TARGET_WANTS_EXTENDED_DPM_PLATFORM),true)
PRODUCT_BOOT_JARS += tcmclient
PRODUCT_BOOT_JARS += com.qti.dpmframework
PRODUCT_BOOT_JARS += dpmapi
PRODUCT_BOOT_JARS += com.qti.location.sdk
endif
# 845 series and newer
ifneq (,$(filter audio, $(TARGET_COMMON_QTI_COMPONENTS)))
include $(LOCAL_PATH)/audio/qti-audio.mk
endif
ifneq (,$(filter bt, $(TARGET_COMMON_QTI_COMPONENTS)))
include $(LOCAL_PATH)/bt/qti-bt.mk
endif
ifneq (,$(filter display, $(TARGET_COMMON_QTI_COMPONENTS)))
include $(LOCAL_PATH)/display/qti-display.mk
endif
ifneq (,$(filter 5.10 5.15, $(TARGET_KERNEL_VERSION)))
include $(LOCAL_PATH)/dlkm/qti-dlkm.mk
endif
ifneq (,$(filter gps, $(TARGET_COMMON_QTI_COMPONENTS)))
include $(LOCAL_PATH)/gps/qti-gps.mk
endif
ifneq (,$(filter perf, $(TARGET_COMMON_QTI_COMPONENTS)))
ifeq (,$(filter 5.10 5.15, $(TARGET_KERNEL_VERSION)))
include $(LOCAL_PATH)/perf/qti-perf.mk
endif
endif
ifneq (,$(filter telephony, $(TARGET_COMMON_QTI_COMPONENTS)))
include $(LOCAL_PATH)/telephony/qti-telephony.mk
endif
ifneq (,$(filter usb, $(TARGET_COMMON_QTI_COMPONENTS)))
include $(LOCAL_PATH)/usb/qti-usb.mk
endif
# Nxp NFC
ifeq ($(TARGET_USES_NQ_NFC),true)
PRODUCT_PACKAGES += \
nfc_nci.nqx.default.hw
endif
# Power
ifneq ($(TARGET_PROVIDES_POWERHAL),true)
$(call inherit-product-if-exists, vendor/qcom/opensource/power/power-vendor-product.mk)
endif
# QCOM HW crypto
ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
TARGET_CRYPTFS_HW_PATH ?= vendor/qcom/opensource/commonsys/cryptfs_hw
endif
# Soong namespace
SOONG_CONFIG_NAMESPACES += qssi_vs_vendor
SOONG_CONFIG_qssi_vs_vendor += qssi_or_vendor
SOONG_CONFIG_qssi_vs_vendor_qssi_or_vendor := qssi
SOONG_CONFIG_NAMESPACES += aosp_vs_qva
SOONG_CONFIG_aosp_vs_qva += aosp_or_qva
ifeq ($(TARGET_FWK_SUPPORTS_FULL_VALUEADDS),true)
SOONG_CONFIG_aosp_vs_qva_aosp_or_qva := qva
else
SOONG_CONFIG_aosp_vs_qva_aosp_or_qva := aosp
endif
SOONG_CONFIG_NAMESPACES += bredr_vs_btadva
SOONG_CONFIG_bredr_vs_btadva += bredr_or_btadva
SOONG_CONFIG_bredr_vs_btadva_bredr_or_btadva := bredr
endif # QCOM_BOARD_PLATFORMS