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