forked from moto-common/android_device_motorola_common
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.mk
More file actions
143 lines (117 loc) · 5.28 KB
/
common.mk
File metadata and controls
143 lines (117 loc) · 5.28 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
# 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/motorola/common
# A/B OTA dexopt update_engine hookup
AB_OTA_POSTINSTALL_CONFIG ?= \
RUN_POSTINSTALL_system=true \
POSTINSTALL_PATH_system=system/bin/otapreopt_script \
FILESYSTEM_TYPE_system=ext4 \
POSTINSTALL_OPTIONAL_system=true
# Arch
TARGET_ARCH := arm64
# Audio Configuration
PRODUCT_COPY_FILES += \
frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.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
# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := build/make/target/board/mainline_arm64/bluetooth
# Build scripts
MOTOROLA_CLEAR_VARS := $(COMMON_PATH)/motorola_clear_vars.mk
MOTOROLA_BUILD_SYMLINKS := $(COMMON_PATH)/motorola_build_symlinks.mk
# Camera
TARGET_USES_64BIT_CAMERA ?= true
# Dexpreopt
PRODUCT_DEXPREOPT_SPEED_APPS += SystemUI
# Dynamic Partitions
ifeq ($(TARGET_USES_DYNAMIC_PARTITIONS),true)
PRODUCT_USE_DYNAMIC_PARTITIONS := true
endif
# Filesystem: Create tftp symlinks
PRODUCT_PACKAGES += \
tftp_symlinks
## Create firmware mount point folders in /vendor:
PRODUCT_PACKAGES += \
firmware_folders
## Create libhidl symlink
PRODUCT_PACKAGES += \
libhidl_symlink
## Create protobuf symlinks
PRODUCT_PACKAGES += \
protobuf_symlinks
# FSTab Handling
## Define suffix for fstab
ifeq ($(PRODUCT_USES_QCOM_HARDWARE),true) # QCOM uses qcom
FSTAB_SUFFIX := qcom
else ifeq ($(PRODUCT_USES_MTK_HARDWARE),true) # MTK uses board platform
FSTAB_SUFFIX := $(TARGET_BOARD_PLAFORM)
endif
## Select fstab path based on vendor_boot's existence.
## Always copy fstab to vendor.
ifeq ($(call has-partition,vendor_boot),false)
PRODUCT_COPY_FILES += \
$(PLATFORM_COMMON_PATH)/rootdir/$(call select-fstab):$(TARGET_COPY_OUT_RAMDISK)/fstab.$(FSTAB_SUFFIX)
else
PRODUCT_COPY_FILES += \
$(PLATFORM_COMMON_PATH)/rootdir/$(call select-fstab):$(TARGET_COPY_OUT_VENDOR_RAMDISK)/first_stage_ramdisk/fstab.$(FSTAB_SUFFIX)
endif
PRODUCT_COPY_FILES += \
$(PLATFORM_COMMON_PATH)/rootdir/$(call select-fstab):$(TARGET_COPY_OUT_VENDOR)/etc/fstab.$(FSTAB_SUFFIX)
# Kernel
PRODUCT_VENDOR_KERNEL_HEADERS := $(PLATFORM_COMMON_PATH)-kernel/kernel-headers
# Media 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
# NFC
ifneq (,$(filter $(TARGET_USES_SN1XX_NFC) $(TARGET_USES_PN5XX_PN8X_NFC) $(TARGET_USES_ST_NFC) $(TARGET_USES_SEC_NFC), true))
DEVICE_CHARACTERISTICS += nfc
endif
# QCOM
ifeq ($(PRODUCT_USES_QCOM_HARDWARE),true)
include $(COMMON_PATH)/hardware/qcom/product.mk
endif
# Recovery
TARGET_RECOVERY_FSTAB := $(PLATFORM_COMMON_PATH)/rootdir/$(call select-fstab)
# Rootdir
$(call copy-files-recursive,$(COMMON_PATH)/rootdir/vendor,$(TARGET_COPY_OUT_VENDOR))
$(call copy-files-recursive,$(DEVICE_PATH)/vendor,$(TARGET_COPY_OUT_VENDOR))
$(call copy-files-recursive,$(PLATFORM_COMMON_PATH)/rootdir/vendor,$(TARGET_COPY_OUT_VENDOR))
# SKUs
$(call add-device-sku,n,nfc)
# Soong
PRODUCT_SOONG_NAMESPACES += \
$(COMMON_PATH) \
$(PLATFORM_COMMON_PATH) \
vendor/qcom/opensource/audio/$(qcom_platform) \
vendor/qcom/opensource/data-ipa-cfg-mgr-legacy-um \
vendor/qcom/opensource/dataservices \
vendor/qcom/opensource/display/$(qcom_platform) \
vendor/qcom/opensource/display-commonsys-intf \
vendor/qcom/opensource/gps-legacy
## Enable pixel soong namespace for Pixel USB and Power HAL
PRODUCT_SOONG_NAMESPACES += \
hardware/google/interfaces \
hardware/google/pixel
# APEX
$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
$(call inherit-product, device/motorola/common/common-init.mk)
$(call inherit-product, device/motorola/common/common-packages.mk)
$(call inherit-product, device/motorola/common/common-perm.mk)
$(call inherit-product, device/motorola/common/common-prop.mk)
$(call inherit-product, device/motorola/common/common-treble.mk)
$(call inherit-product, vendor/motorola/common/common-vendor.mk)