-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdevice.mk
175 lines (140 loc) · 4.85 KB
/
device.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
#
# Copyright (C) 2018-2021 ArrowOS
#
# SPDX-License-Identifier: Apache-2.0
#
CHOPIN_PREBUILT := device/xiaomi/chopin-prebuilt
# Enable updating of APEXes
$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
# Installs gsi keys into ramdisk, to boot a GSI with verified boot.
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_keys.mk)
# Virtual A/B
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
# Enable Dalvik
$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
# Get non-open-source specific aspects
$(call inherit-product, vendor/xiaomi/chopin/chopin-vendor.mk)
#Suppot to compile recovery without msm headers
TARGET_HAS_GENERIC_KERNEL_HEADERS := true
# AAPT
# Device uses high-density artwork where available
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
# API
PRODUCT_SHIPPING_API_LEVEL := 30
# A/B
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_system=true \
POSTINSTALL_PATH_system=system/bin/otapreopt_script \
FILESYSTEM_TYPE_system=ext4 \
POSTINSTALL_OPTIONAL_system=true
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_vendor=true \
POSTINSTALL_PATH_vendor=bin/checkpoint_gc \
FILESYSTEM_TYPE_vendor=ext4 \
POSTINSTALL_OPTIONAL_vendor=true
# Audio
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/audio/audio_policy_configuration.xml::$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/a2dp_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/a2dp_in_audio_policy_configuration.xml \
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/bluetooth_audio_policy_configuration.xml
# Boot animation
TARGET_SCREEN_HEIGHT := 2400
TARGET_SCREEN_WIDTH := 1080
# Boot control HAL
PRODUCT_PACKAGES += \
PRODUCT_PACKAGES_DEBUG += \
bootctrl
# Common init scripts
PRODUCT_PACKAGES += \
init.recovery.mt6891.rc \
init.recovery.mt6893.rc \
init.recovery.usb.rc \
init.chopin.rc
# fastbootd
PRODUCT_PACKAGES += \
fastbootd
# F2FS utilities
PRODUCT_PACKAGES += \
sg_write_buffer \
f2fs_io \
check_f2fs
# MT-PL-Utils
PRODUCT_PACKAGES += \
mtk_plpath_utils \
mtk_plpath_utils.recovery
# fstab
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/fstab.mt6893:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.mt6893 \
$(LOCAL_PATH)/rootdir/etc/fstab.mt6891:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.mt6891 \
$(LOCAL_PATH)/rootdir/etc/fstab.mt6893:$(TARGET_COPY_OUT_RAMDISK)/fstab.mt6893 \
$(LOCAL_PATH)/rootdir/etc/fstab.mt6891:$(TARGET_COPY_OUT_RAMDISK)/fstab.mt6891 \
$(LOCAL_PATH)/rootdir/etc/fstab.mt6893:recovery/root/first_stage_ramdisk/fstab.mt6891 \
$(LOCAL_PATH)/rootdir/etc/fstab.mt6891:recovery/root/first_stage_ramdisk/fstab.mt6893
# HIDL
PRODUCT_PACKAGES += \
libhidltransport
# IMS
PRODUCT_BOOT_JARS += \
ImsServiceBase \
mediatek-common \
mediatek-framework \
mediatek-ims-base \
mediatek-ims-common \
mediatek-telecom-common \
mediatek-telephony-base \
mediatek-telephony-common
PRODUCT_PACKAGES += \
ImsServiceBase \
libshim_vtservice
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/permissions/privapp-permissions-mediatek.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-mediatek.xml
# Lights
PRODUCT_PACKAGES += \
android.hardware.lights-service.chopin
# Kernel
PRODUCT_COPY_FILES += \
$(CHOPIN_PREBUILT)/kernel/dtb.img:dtb.img
# NFC
PRODUCT_PACKAGES += \
NfcNci \
Tag \
SecureElement \
com.android.nfc_extras
# Overlays
PRODUCT_PACKAGES += \
FrameworkResOverlayChopin \
WifiResOverlayChopin \
SystemUIOverlayChopin \
TelephonyOverlayChopin
# Overlays - override vendor ones
PRODUCT_PACKAGES += \
FrameworksResCommon \
FrameworksResTarget \
DevicesOverlay \
DevicesAndroidOverlay
# Partitions
PRODUCT_USE_DYNAMIC_PARTITIONS := true
PRODUCT_BUILD_SUPER_PARTITION := false
# Properties
include $(LOCAL_PATH)/properties/default.mk
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH)
# Update engine
PRODUCT_PACKAGES += \
checkpoint_gc \
otapreopt_script \
update_engine \
update_engine_sideload \
update_verifier
PRODUCT_PACKAGES_DEBUG += \
update_engine_client
# VNDK
PRODUCT_TARGET_VNDK_VERSION := 30