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 17TARGET_LINUX_KERNEL_VERSION := $(RELEASE_KERNEL_LYNX_VERSION) 18# Keeps flexibility for kasan and ufs builds 19TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_LYNX_DIR) 20TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_LYNX_DIR)/kernel-headers 21 22$(call inherit-product-if-exists, vendor/google_devices/lynx/prebuilts/device-vendor-lynx.mk) 23$(call inherit-product-if-exists, vendor/google_devices/gs201/prebuilts/device-vendor.mk) 24$(call inherit-product-if-exists, vendor/google_devices/gs201/proprietary/device-vendor.mk) 25$(call inherit-product-if-exists, vendor/google_devices/lynx/proprietary/lynx/device-vendor-lynx.mk) 26$(call inherit-product-if-exists, vendor/google_devices/lynx/proprietary/device-vendor.mk) 27$(call inherit-product-if-exists, vendor/google_devices/lynx/proprietary/WallpapersLynx.mk) 28 29DEVICE_PACKAGE_OVERLAYS += device/google/lynx/lynx/overlay 30 31include device/google/lynx/audio/lynx/audio-tables.mk 32include device/google/gs201/device-shipping-common.mk 33include hardware/google/pixel/vibrator/cs40l26/device.mk 34include device/google/gs-common/touch/gti/gti.mk 35include device/google/gs-common/wlan/dump.mk 36 37# go/lyric-soong-variables 38$(call soong_config_set,lyric,camera_hardware,lynx) 39$(call soong_config_set,lyric,tuning_product,lynx) 40$(call soong_config_set,google3a_config,target_device,lynx) 41 42# Init files 43PRODUCT_COPY_FILES += \ 44 device/google/lynx/conf/init.lynx.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.lynx.rc 45 46# Recovery files 47PRODUCT_COPY_FILES += \ 48 device/google/lynx/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.lynx.rc 49 50# insmod files 51PRODUCT_COPY_FILES += \ 52 device/google/lynx/init.insmod.lynx.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.lynx.cfg 53 54# Camera 55PRODUCT_COPY_FILES += \ 56 device/google/lynx/media_profiles_lynx.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml 57 58# Media Performance Class 13 59PRODUCT_PROPERTY_OVERRIDES += ro.odm.build.media_performance_class=33 60 61# Display Config 62PRODUCT_COPY_FILES += \ 63 device/google/lynx/lynx/display_colordata_dev_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_dev_cal0.pb \ 64 device/google/lynx/lynx/display_golden_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_golden_cal0.pb 65 66# Display 67PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.lbe.supported=1 68PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms=1000 69PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.ignore_hdr_camera_layers=true 70 71#config of primary display frames to reach LHBM peak brightness 72PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.primarydisplay.lhbm.frames_to_reach_peak_brightness=2 73 74# NFC 75PRODUCT_COPY_FILES += \ 76 frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \ 77 frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \ 78 frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \ 79 frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \ 80 frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \ 81 device/google/lynx/nfc/libnfc-hal-st.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st.conf \ 82 device/google/lynx/nfc/libnfc-nci-lynx.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf 83 84PRODUCT_PACKAGES += \ 85 $(RELEASE_PACKAGE_NFC_STACK) \ 86 Tag \ 87 android.hardware.nfc-service.st \ 88 NfcOverlayLynx 89 90# SecureElement 91PRODUCT_PACKAGES += \ 92 android.hardware.secure_element@1.2-service-gto \ 93 android.hardware.secure_element@1.2-service-gto-ese2 94 95PRODUCT_COPY_FILES += \ 96 frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \ 97 frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \ 98 device/google/lynx/nfc/libse-gto-hal.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal.conf \ 99 device/google/lynx/nfc/libse-gto-hal2.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal2.conf 100 101DEVICE_MANIFEST_FILE += \ 102 device/google/lynx/nfc/manifest_se.xml 103 104# Thermal Config 105PRODUCT_COPY_FILES += \ 106 device/google/lynx/thermal_info_config_lynx.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ 107 device/google/lynx/thermal_info_config_charge_lynx.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge.json 108 109# Power HAL config 110PRODUCT_COPY_FILES += \ 111 device/google/lynx/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json 112 113# PowerStats HAL 114PRODUCT_SOONG_NAMESPACES += \ 115 device/google/lynx/powerstats \ 116 device/google/lynx 117 118# Bluetooth HAL and Pixel extension 119include device/google/lynx/bluetooth/qti_default.mk 120 121# Keymaster HAL 122#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service 123 124# Gatekeeper HAL 125#LOCAL_GATEKEEPER_PRODUCT_PACKAGE ?= android.hardware.gatekeeper@1.0-service.software 126 127 128# Gatekeeper 129# PRODUCT_PACKAGES += \ 130# android.hardware.gatekeeper@1.0-service.software 131 132# Keymint replaces Keymaster 133# PRODUCT_PACKAGES += \ 134# android.hardware.security.keymint-service 135 136# Keymaster 137#PRODUCT_PACKAGES += \ 138# android.hardware.keymaster@4.0-impl \ 139# android.hardware.keymaster@4.0-service 140 141#PRODUCT_PACKAGES += android.hardware.keymaster@4.0-service.remote 142#PRODUCT_PACKAGES += android.hardware.keymaster@4.1-service.remote 143#LOCAL_KEYMASTER_PRODUCT_PACKAGE := android.hardware.keymaster@4.1-service 144#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service 145 146# PRODUCT_PROPERTY_OVERRIDES += \ 147# ro.hardware.keystore_desede=true \ 148# ro.hardware.keystore=software \ 149# ro.hardware.gatekeeper=software 150 151# Fingerprint HAL 152GOODIX_CONFIG_BUILD_VERSION := g7_trusty 153$(call inherit-product-if-exists, vendor/goodix/udfps/configuration/udfps_common.mk) 154ifeq ($(filter factory%, $(TARGET_PRODUCT)),) 155$(call inherit-product-if-exists, vendor/goodix/udfps/configuration/udfps_shipping.mk) 156else 157$(call inherit-product-if-exists, vendor/goodix/udfps/configuration/udfps_factory.mk) 158endif 159 160# Vibrator HAL 161$(call soong_config_set,haptics,kernel_ver,v$(subst .,_,$(TARGET_LINUX_KERNEL_VERSION))) 162ADAPTIVE_HAPTICS_FEATURE := adaptive_haptics_v1 163PRODUCT_VENDOR_PROPERTIES += \ 164 ro.vendor.vibrator.hal.supported_primitives=243 \ 165 ro.vendor.vibrator.hal.f0.comp.enabled=1 \ 166 ro.vendor.vibrator.hal.redc.comp.enabled=0 \ 167 persist.vendor.vibrator.hal.context.enable=false \ 168 persist.vendor.vibrator.hal.context.scale=40 \ 169 persist.vendor.vibrator.hal.context.fade=true \ 170 persist.vendor.vibrator.hal.context.cooldowntime=1600 \ 171 persist.vendor.vibrator.hal.context.settlingtime=5000 172 173# Trusty liboemcrypto.so 174PRODUCT_SOONG_NAMESPACES += vendor/google_devices/lynx/prebuilts 175 176# GPS xml 177ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 178 PRODUCT_COPY_FILES += \ 179 device/google/lynx/location/gps.xml.l10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml \ 180 device/google/lynx/location/lhd.conf.l10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ 181 device/google/lynx/location/scd.conf.l10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf 182else 183 PRODUCT_COPY_FILES += \ 184 device/google/lynx/location/gps_user.xml.l10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml \ 185 device/google/lynx/location/lhd_user.conf.l10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \ 186 device/google/lynx/location/scd_user.conf.l10:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf 187endif 188 189# Wifi HAL 190PRODUCT_SOONG_NAMESPACES += hardware/qcom/wlan/wcn6740 191 192# DCK properties based on target 193PRODUCT_PROPERTY_OVERRIDES += \ 194 ro.gms.dck.eligible_wcc=2 \ 195 ro.gms.dck.se_capability=1 196 197# WIFI COEX 198PRODUCT_COPY_FILES += \ 199 device/google/lynx/wifi/coex_table.xml:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/coex_table.xml 200 201# WiFi Overlay 202PRODUCT_PACKAGES += \ 203 WifiOverlay2023Mid 204 205# Wifi Aware Interface 206PRODUCT_PROPERTY_OVERRIDES += \ 207 wifi.aware.interface=wifi-aware0 208 209# Set zram size 210PRODUCT_VENDOR_PROPERTIES += \ 211 vendor.zram.size=3g 212 213# Increment the SVN for any official public releases 214ifdef RELEASE_SVN_LYNX 215TARGET_SVN ?= $(RELEASE_SVN_LYNX) 216else 217# Set this for older releases that don't use build flag 218TARGET_SVN ?= 45 219endif 220 221PRODUCT_VENDOR_PROPERTIES += \ 222 ro.vendor.build.svn=$(TARGET_SVN) 223 224# Set support hide display cutout feature 225PRODUCT_PRODUCT_PROPERTIES += \ 226 ro.support_hide_display_cutout=true 227 228# Set support One-handed mode 229PRODUCT_PRODUCT_PROPERTIES += \ 230 ro.support_one_handed_mode=true 231 232# Fingerprint als feed forward 233PRODUCT_VENDOR_PROPERTIES += \ 234 persist.vendor.udfps.als_feed_forward_supported=true \ 235 persist.vendor.udfps.lhbm_controlled_in_hal_supported=true 236 237# Hide cutout overlays 238PRODUCT_PACKAGES += \ 239 NoCutoutOverlay \ 240 AvoidAppsInCutoutOverlay 241 242# MIPI Coex Configs 243PRODUCT_COPY_FILES += \ 244 device/google/lynx/lynx/radio/lynx_display_primary_mipi_coex_table.csv:$(TARGET_COPY_OUT_VENDOR)/etc/modem/display_primary_mipi_coex_table.csv 245 246# Camera 247PRODUCT_PROPERTY_OVERRIDES += \ 248 persist.vendor.camera.extended_launch_boost=1 \ 249 persist.vendor.camera.optimized_tnr_freq=1 \ 250 persist.vendor.camera.raise_buf_allocation_priority=1 \ 251 persist.vendor.camera.start_cpu_throttling_at_moderate_thermal=1 252 253# Enable camera 1080P 60FPS binning mode 254PRODUCT_VENDOR_PROPERTIES += \ 255 persist.vendor.camera.1080P_60fps_binning=true 256 257# Increase thread priority for nodes stop 258PRODUCT_VENDOR_PROPERTIES += \ 259 persist.vendor.camera.increase_thread_priority_nodes_stop=true 260 261# OIS with system imu 262PRODUCT_VENDOR_PROPERTIES += \ 263 persist.vendor.camera.ois_with_system_imu=true 264 265# Enable camera exif model/make reporting 266PRODUCT_VENDOR_PROPERTIES += \ 267 persist.vendor.camera.exif_reveal_make_model=true 268 269# Enable front camera always binning for 720P or smaller resolution 270PRODUCT_VENDOR_PROPERTIES += \ 271 persist.vendor.camera.front_720P_always_binning=true 272 273# Device features 274PRODUCT_COPY_FILES += \ 275 frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml 276 277# The default value of this variable is false and should only be set to true when 278# the device allows users to enable the seamless transfer feature. 279PRODUCT_PRODUCT_PROPERTIES += \ 280 euicc.seamless_transfer_enabled_in_non_qs=true 281 282##Audio Vendor property 283PRODUCT_PROPERTY_OVERRIDES += \ 284 persist.vendor.audio.cca.enabled=false 285 286# userdebug specific 287ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 288 PRODUCT_COPY_FILES += \ 289 device/google/gs201/init.hardware.wlc.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.wlc.rc 290endif 291 292# SKU specific RROs 293PRODUCT_PACKAGES += \ 294 SettingsOverlayG82U8 \ 295 SettingsOverlayG0DZQ \ 296 SettingsOverlayGHL1X \ 297 SettingsOverlayGWKK3 298 299# Enable DeviceAsWebcam support 300PRODUCT_VENDOR_PROPERTIES += \ 301 ro.usb.uvc.enabled=true 302 303# Quick Start device-specific settings 304PRODUCT_PRODUCT_PROPERTIES += \ 305 ro.quick_start.oem_id=00e0 \ 306 ro.quick_start.device_id=lynx 307