-
Notifications
You must be signed in to change notification settings - Fork 25
/
platform.mk
211 lines (176 loc) · 7.43 KB
/
platform.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
# 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.
# Platform path
PLATFORM_COMMON_PATH := device/sony/tone
SOMC_PLATFORM := tone
SOMC_KERNEL_VERSION := 4.9
PRODUCT_PLATFORM_SOD := true
TARGET_BOARD_PLATFORM := msm8996
SONY_ROOT := $(PLATFORM_COMMON_PATH)/rootdir
# Wi-Fi definitions for Broadcom solution but using brcmfmac instead of bcmdhd kernel driver
BOARD_WLAN_DEVICE := qcwcn
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn
# BT definitions for Broadcom solution
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(PLATFORM_COMMON_PATH)/bluetooth
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_BCM := true
BOARD_CUSTOM_BT_CONFIG := $(PLATFORM_COMMON_PATH)/bluetooth/vnd_generic.txt
# TAD
TARGET_USES_TAD_V2 := true
# RIL
TARGET_PER_MGR_ENABLED := true
# Display
TARGET_USES_GRALLOC1 := true
# Overlay
DEVICE_PACKAGE_OVERLAYS += \
$(PLATFORM_COMMON_PATH)/overlay
# Device Specific Permissions
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \
frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \
frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \
frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml
# Audio
PRODUCT_COPY_FILES += \
$(SONY_ROOT)/vendor/etc/audio_tuning_mixer_tasha.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer_tasha.txt \
$(SONY_ROOT)/vendor/etc/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
$(SONY_ROOT)/vendor/etc/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
$(SONY_ROOT)/vendor/etc/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \
$(SONY_ROOT)/vendor/etc/common_primary_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/common_primary_audio_policy_configuration.xml
# Media
PRODUCT_COPY_FILES += \
$(SONY_ROOT)/vendor/etc/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
$(SONY_ROOT)/vendor/etc/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
$(SONY_ROOT)/vendor/etc/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml
# WiFi config overlay
PRODUCT_COPY_FILES += \
$(SONY_ROOT)/vendor/etc/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
$(SONY_ROOT)/vendor/etc/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf
# NFC Configuration
PRODUCT_COPY_FILES += \
$(SONY_ROOT)/vendor/etc/libnfc-nci.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-nci.conf
# Touch IDC
PRODUCT_COPY_FILES += \
$(SONY_ROOT)/vendor/usr/idc/clearpad.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/clearpad.idc
# Keylayout
PRODUCT_COPY_FILES += \
$(SONY_ROOT)/vendor/usr/keylayout/gpio-keys.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/gpio-keys.kl
# MSM IRQ Balancer configuration file
PRODUCT_COPY_FILES += \
$(SONY_ROOT)/vendor/etc/msm_irqbalance.conf:$(TARGET_COPY_OUT_VENDOR)/etc/msm_irqbalance.conf
# RQBalance-PowerHAL configuration
PRODUCT_COPY_FILES += \
$(SONY_ROOT)/vendor/etc/rqbalance_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/rqbalance_config.xml
# Sensors
PRODUCT_COPY_FILES += \
$(SONY_ROOT)/vendor/etc/sensors/sensors_settings:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/sensors_settings
# Platform specific init
PRODUCT_PACKAGES += \
init.tone \
init.tone.pwr \
ueventd
# Audio
PRODUCT_PACKAGES += \
sound_trigger.primary.msm8996 \
audio.primary.msm8996
# GFX
PRODUCT_PACKAGES += \
copybit.msm8996 \
gralloc.msm8996 \
hwcomposer.msm8996 \
memtrack.msm8996
# BCM Bluetooth
PRODUCT_PACKAGES += \
android.hardware.bluetooth@1.0-impl \
android.hardware.bluetooth@1.0-service \
libbt-vendor
# GPS
PRODUCT_PACKAGES += \
gps.msm8996
# CAMERA
PRODUCT_PACKAGES += \
camera.msm8996
# Fluence
PRODUCT_PROPERTY_OVERRIDES += \
ro.qc.sdk.audio.fluencetype=fluence
# aDSP sensors
## max rate
PRODUCT_PROPERTY_OVERRIDES += \
ro.qti.sensors.max_accel_rate=false \
ro.qti.sensors.max_gyro_rate=false \
ro.qti.sensors.max_mag_rate=false \
ro.qti.sensors.max_geomag_rotv=50
## sensor type
PRODUCT_PROPERTY_OVERRIDES += \
ro.qti.sdk.sensors.gestures=false \
ro.qti.sensors.pedometer=false \
ro.qti.sensors.step_detector=true \
ro.qti.sensors.step_counter=true \
ro.qti.sensors.pam=false \
ro.qti.sensors.scrn_ortn=false \
ro.qti.sensors.smd=true \
ro.qti.sensors.game_rv=true \
ro.qti.sensors.georv=true \
ro.qti.sensors.cmc=false \
ro.qti.sensors.bte=false \
ro.qti.sensors.fns=false \
ro.qti.sensors.qmd=false \
ro.qti.sensors.amd=false \
ro.qti.sensors.rmd=false \
ro.qti.sensors.vmd=false \
ro.qti.sensors.gtap=false \
ro.qti.sensors.tap=false \
ro.qti.sensors.facing=false \
ro.qti.sensors.tilt=false \
ro.qti.sensors.tilt_detector=true \
ro.qti.sensors.dpc=false \
ro.qti.sensors.qheart=false \
ro.qti.sensors.wu=true \
ro.qti.sensors.proximity=true \
ro.qti.sensors.gravity=true \
ro.qti.sensors.laccel=true \
ro.qti.sensors.orientation=true \
ro.qti.sensors.rotvec=true \
ro.qti.sensors.fast_amd=false \
ro.qti.sensors.wrist_tilt=false \
ro.qti.sensors.pug=false \
ro.qti.sensors.iod=false \
ro.qti.sensors.als_scale=1 \
ro.qfusion_use_report_period=false
# SurfaceFlinger
# Keep in sync with NUM_FRAMEBUFFER_SURFACE_BUFFERS
PRODUCT_PROPERTY_OVERRIDES += \
ro.surface_flinger.max_frame_buffer_acquired_buffers=3
# Display HACK: Use GPU composition only
## TEMP: Skip loading libsdmextension.so in display hal
PRODUCT_PROPERTY_OVERRIDES += \
vendor.display.primary_mixer_stages=1 \
vendor.display.skip_extension_intf=1
# USB controller setup
PRODUCT_PROPERTY_OVERRIDES += \
sys.usb.controller=6a00000.dwc3 \
sys.usb.rndis.func.name=rndis_bam
# WiFi MAC address path
PRODUCT_PROPERTY_OVERRIDES += \
ro.vendor.wifi.addr_path=/sys/devices/platform/soc/soc:bcmdhd_wlan/macaddr
# setup dm-verity configs.
PRODUCT_SYSTEM_VERITY_PARTITION := /dev/block/platform/soc/7464900.sdhci/by-name/system
$(call inherit-product, build/target/product/verity.mk)
$(call inherit-product, device/sony/common/common.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/config/config-bcm.mk)