1#
2# Copyright (C) 2021 The Android Open-Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17# Restrict the visibility of Android.bp files to improve build analysis time
18$(call inherit-product-if-exists, vendor/google/products/sources_pixel.mk)
19
20# Keeps flexibility for kasan and ufs builds
21TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_CHEETAH_DIR)
22TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_CHEETAH_DIR)/kernel-headers
23
24$(call inherit-product-if-exists, vendor/google_devices/pantah/prebuilts/device-vendor-cloudripper.mk)
25$(call inherit-product-if-exists, vendor/google_devices/gs201/prebuilts/device-vendor.mk)
26$(call inherit-product-if-exists, vendor/google_devices/gs201/proprietary/device-vendor.mk)
27$(call inherit-product-if-exists, vendor/google_devices/pantah/proprietary/cloudripper/device-vendor-cloudripper.mk)
28
29include device/google/gs201/device-shipping-common.mk
30include device/google/pantah/audio/cloudripper/audio-tables.mk
31include hardware/google/pixel/vibrator/cs40l26/device.mk
32include device/google/gs-common/bcmbt/bluetooth.mk
33include device/google/gs-common/gps/brcm/cbd_gps.mk
34include device/google/gs-common/touch/syna/syna0.mk
35
36# go/lyric-soong-variables
37$(call soong_config_set,lyric,camera_hardware,cloudripper)
38$(call soong_config_set,lyric,tuning_product,cloudripper)
39$(call soong_config_set,google3a_config,target_device,cloudripper)
40
41# Init files
42PRODUCT_COPY_FILES += \
43	device/google/pantah/conf/init.cloudripper.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.cloudripper.rc
44
45# Recovery files
46PRODUCT_COPY_FILES += \
47        device/google/pantah/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.cloudripper.rc
48
49# insmod files
50PRODUCT_COPY_FILES += \
51	device/google/pantah/init.insmod.cloudripper.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.cloudripper.cfg
52
53# Camera
54PRODUCT_COPY_FILES += \
55	device/google/pantah/media_profiles_cloudripper.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml
56
57# NFC
58PRODUCT_COPY_FILES += \
59	frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
60	frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
61	frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
62	frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \
63	frameworks/native/data/etc/android.hardware.nfc.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.uicc.xml \
64	frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \
65    device/google/pantah/nfc/libnfc-hal-st.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st.conf \
66    device/google/pantah/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf
67
68PRODUCT_PACKAGES += \
69	$(RELEASE_PACKAGE_NFC_STACK) \
70	Tag \
71	android.hardware.nfc-service.st
72
73# SecureElement
74PRODUCT_PACKAGES += \
75	android.hardware.secure_element@1.2-service-gto \
76	android.hardware.secure_element@1.2-service-gto-ese2
77
78PRODUCT_COPY_FILES += \
79	frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \
80	frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \
81	device/google/pantah/nfc/libse-gto-hal.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal.conf \
82	device/google/pantah/nfc/libse-gto-hal2.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal2.conf
83
84DEVICE_MANIFEST_FILE += \
85	device/google/pantah/nfc/manifest_se.xml
86
87# Thermal Config
88PRODUCT_COPY_FILES += \
89	device/google/pantah/thermal_info_config_cloudripper.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \
90	device/google/pantah/thermal_info_config_proto.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_proto.json
91
92# Power HAL config
93PRODUCT_COPY_FILES += \
94	device/google/pantah/powerhint-cloudripper.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json
95
96# Bluetooth HAL
97PRODUCT_COPY_FILES += \
98	device/google/pantah/bluetooth/bt_vendor_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth/bt_vendor_overlay.conf
99
100PRODUCT_PROPERTY_OVERRIDES += \
101    ro.bluetooth.a2dp_offload.supported=true \
102    persist.bluetooth.a2dp_offload.disabled=false \
103    persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac-opus
104PRODUCT_PRODUCT_PROPERTIES += \
105    persist.bluetooth.firmware.selection=BCM.hcd
106
107# default BDADDR for EVB only
108PRODUCT_PROPERTY_OVERRIDES += \
109	ro.vendor.bluetooth.evb_bdaddr="22:22:22:33:44:55"
110
111# Spatial Audio
112PRODUCT_PACKAGES += \
113	libspatialaudio \
114	librondo
115
116# Keymaster HAL
117#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service
118
119# Gatekeeper HAL
120#LOCAL_GATEKEEPER_PRODUCT_PACKAGE ?= android.hardware.gatekeeper@1.0-service.software
121
122
123# Gatekeeper
124# PRODUCT_PACKAGES += \
125# 	android.hardware.gatekeeper@1.0-service.software
126
127# Keymint replaces Keymaster
128# PRODUCT_PACKAGES += \
129# 	android.hardware.security.keymint-service
130
131# Keymaster
132#PRODUCT_PACKAGES += \
133#	android.hardware.keymaster@4.0-impl \
134#	android.hardware.keymaster@4.0-service
135
136#PRODUCT_PACKAGES += android.hardware.keymaster@4.0-service.remote
137#PRODUCT_PACKAGES += android.hardware.keymaster@4.1-service.remote
138#LOCAL_KEYMASTER_PRODUCT_PACKAGE := android.hardware.keymaster@4.1-service
139#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service
140
141# PRODUCT_PROPERTY_OVERRIDES += \
142# 	ro.hardware.keystore_desede=true \
143# 	ro.hardware.keystore=software \
144# 	ro.hardware.gatekeeper=software
145
146# PowerStats HAL
147PRODUCT_SOONG_NAMESPACES += \
148    device/google/pantah/powerstats/cloudripper
149
150# WiFi Overlay
151PRODUCT_PACKAGES += \
152	WifiOverlay2022_C10 \
153	PixelWifiOverlay2022_C10
154
155PRODUCT_SOONG_NAMESPACES += device/google/pantah/cheetah/
156
157# Trusty liboemcrypto.so
158PRODUCT_SOONG_NAMESPACES += vendor/google_devices/pantah/prebuilts
159
160# Location
161ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
162        PRODUCT_COPY_FILES += \
163                device/google/pantah/location/gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml \
164                device/google/pantah/location/lhd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
165                device/google/pantah/location/scd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf
166else
167        PRODUCT_COPY_FILES += \
168                device/google/pantah/location/gps_user.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml \
169                device/google/pantah/location/lhd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
170                device/google/pantah/location/scd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf
171
172endif
173
174##Audio Vendor property
175PRODUCT_PROPERTY_OVERRIDES += \
176	persist.vendor.audio.cca.enabled=false
177
178# Set zram size
179PRODUCT_VENDOR_PROPERTIES += \
180	vendor.zram.size=3g
181
182# Device features
183PRODUCT_COPY_FILES += \
184    frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
185
186# Vibrator HAL
187$(call soong_config_set,haptics,kernel_ver,v$(subst .,_,$(TARGET_LINUX_KERNEL_VERSION)))
188