1# 2# Copyright (C) 2015 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# There are three modes for TLK components, controlled by SECURE_OS_BUILD: 18# 19# "SECURE_OS_BUILD = tlk" will build everything from source. 20# "SECURE_OS_BUILD = client_only" will build TLK client components from 21# source but use a prebuilt version of the secure OS. 22# "SECURE_OS_BUILD = false" will will use prebuilts for TLK and client 23# components. 24 25# By default build TLK from source if it is available, otherwise use 26# prebuilts. To force using the prebuilt while having the source, set: 27# SECURE_OS_BUILD=false 28ifeq ($(wildcard vendor/nvidia/dragon-tlk/tlk),vendor/nvidia/dragon-tlk/tlk) 29 SECURE_OS_BUILD ?= tlk 30endif 31 32ifeq ($(TARGET_PREBUILT_KERNEL),) 33LOCAL_KERNEL := device/google/dragon-kernel/Image.fit 34else 35LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL) 36endif 37 38ifeq ($(TARGET_PRODUCT), ryu_kasan) 39LOCAL_FSTAB := $(LOCAL_PATH)/fstab.dragon.nocrypt 40else 41LOCAL_FSTAB := $(LOCAL_PATH)/fstab.dragon 42endif 43 44TARGET_RECOVERY_FSTAB = $(LOCAL_FSTAB) 45 46PRODUCT_COPY_FILES := \ 47 $(LOCAL_KERNEL):kernel \ 48 $(LOCAL_PATH)/dump_bq25892.sh:system/bin/dump_bq25892.sh \ 49 $(LOCAL_PATH)/touchfwup.sh:system/bin/touchfwup.sh \ 50 $(LOCAL_PATH)/init.dragon.rc:root/init.dragon.rc \ 51 $(LOCAL_PATH)/init.dragon.usb.rc:root/init.dragon.usb.rc \ 52 $(LOCAL_PATH)/init.recovery.dragon.rc:root/init.recovery.dragon.rc \ 53 $(LOCAL_PATH)/init_regions.sh:system/bin/init_regions.sh \ 54 $(LOCAL_PATH)/tune-thermal-gov.sh:system/bin/tune-thermal-gov.sh \ 55 $(LOCAL_FSTAB):root/fstab.dragon \ 56 $(LOCAL_PATH)/ueventd.dragon.rc:root/ueventd.dragon.rc \ 57 $(LOCAL_PATH)/speakerdsp.ini:system/etc/cras/speakerdsp.ini \ 58 $(LOCAL_PATH)/bcmdhd.cal:system/etc/wifi/bcmdhd.cal \ 59 $(LOCAL_PATH)/com.nvidia.nvsi.xml:system/etc/permissions/com.nvidia.nvsi.xml 60 61PRODUCT_PACKAGES += \ 62 android.hardware.wifi@1.0-service \ 63 libwpa_client \ 64 hostapd \ 65 wificond \ 66 wifilogd \ 67 wpa_supplicant \ 68 wpa_supplicant.conf \ 69 fs_config_files \ 70 crash_dispatcher \ 71 crash_collector \ 72 CrashReportProvider \ 73 fwtool 74 75ifeq ($(TARGET_BUILD_VARIANT),eng) 76PRODUCT_PACKAGES += \ 77 tinyplay \ 78 tinycap \ 79 tinymix 80endif 81 82PRODUCT_COPY_FILES += \ 83 frameworks/native/data/etc/tablet_core_hardware.xml:system/etc/permissions/tablet_core_hardware.xml \ 84 frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ 85 frameworks/native/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml \ 86 frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ 87 frameworks/native/data/etc/android.hardware.camera.full.xml:system/etc/permissions/android.hardware.camera.full.xml \ 88 frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ 89 frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \ 90 frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:system/etc/permissions/android.hardware.wifi.passpoint.xml \ 91 frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \ 92 frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \ 93 frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \ 94 frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \ 95 frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \ 96 frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \ 97 frameworks/native/data/etc/android.hardware.opengles.aep.xml:system/etc/permissions/android.hardware.opengles.aep.xml \ 98 frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \ 99 frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \ 100 frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \ 101 frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ 102 frameworks/native/data/etc/android.software.midi.xml:system/etc/permissions/android.software.midi.xml \ 103 frameworks/native/data/etc/android.software.verified_boot.xml:system/etc/permissions/android.software.verified_boot.xml \ 104 frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:system/etc/permissions/android.hardware.vulkan.level.xml \ 105 frameworks/native/data/etc/android.hardware.vulkan.version-1_0_3.xml:system/etc/permissions/android.hardware.vulkan.version.xml 106 107PRODUCT_COPY_FILES += \ 108 frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:system/etc/a2dp_audio_policy_configuration.xml \ 109 frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:system/etc/usb_audio_policy_configuration.xml \ 110 frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \ 111 frameworks/av/services/audiopolicy/config/default_volume_tables.xml:system/etc/default_volume_tables.xml \ 112 $(LOCAL_PATH)/audio_policy_configuration.xml:system/etc/audio_policy_configuration.xml \ 113 $(LOCAL_PATH)/audio_policy_volumes_drc.xml:system/etc/audio_policy_volumes_drc.xml \ 114 $(LOCAL_PATH)/mixer_paths_0.xml:system/etc/mixer_paths_0.xml 115 116PRODUCT_COPY_FILES += \ 117 frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \ 118 frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \ 119 $(LOCAL_PATH)/media_codecs.xml:system/etc/media_codecs.xml \ 120 $(LOCAL_PATH)/media_codecs_performance.xml:system/etc/media_codecs_performance.xml \ 121 $(LOCAL_PATH)/media_profiles.xml:system/etc/media_profiles.xml 122 123PRODUCT_COPY_FILES += \ 124 $(LOCAL_PATH)/bluetooth/BCM4350C0_003.001.012.0364.0754.hcd:$(TARGET_COPY_OUT_VENDOR)/firmware/bcm4350c0.hcd \ 125 $(LOCAL_PATH)/bluetooth/bt_vendor.conf:$(TARGET_COPY_OUT_SYSTEM)/etc/bluetooth/bt_vendor.conf 126 127# Bluetooth HAL 128PRODUCT_PACKAGES += \ 129 libbt-vendor \ 130 android.hardware.bluetooth@1.0-impl-dragon 131 132# Copy dsp firmware to the vendor parition so it is available when hotwording 133# starts 134PRODUCT_COPY_FILES += \ 135 $(LOCAL_PATH)/rt5677_elf_vad:vendor/firmware/rt5677_elf_vad 136 137PRODUCT_COPY_FILES += \ 138 $(LOCAL_PATH)/enctune.conf:system/etc/enctune.conf 139 140PRODUCT_COPY_FILES += \ 141 device/google/dragon/audio_effects.conf:system/etc/audio_effects.conf 142 143PRODUCT_AAPT_CONFIG := normal large xlarge hdpi xhdpi xxhdpi 144PRODUCT_AAPT_PREF_CONFIG := xhdpi 145 146PRODUCT_CHARACTERISTICS := tablet,nosdcard 147 148DEVICE_PACKAGE_OVERLAYS := \ 149 $(LOCAL_PATH)/overlay 150 151PRODUCT_TAGS += dalvik.gc.type-precise 152 153PRODUCT_PACKAGES += \ 154 librs_jni \ 155 com.android.future.usb.accessory 156 157PRODUCT_PACKAGES += \ 158 power.dragon \ 159 sensors.dragon \ 160 android.hardware.sensors@1.0-impl \ 161 android.hardware.power@1.0-impl 162 163# Health HAL 164PRODUCT_PACKAGES += \ 165 android.hardware.health@1.0-impl 166 167# Light HAL 168PRODUCT_PACKAGES += \ 169 lights.dragon \ 170 android.hardware.light@2.0-impl 171 172# Keymaster HAL 173PRODUCT_PACKAGES += \ 174 android.hardware.keymaster@3.0-impl 175 176# Gatekeeper HAL 177PRODUCT_PACKAGES += \ 178 android.hardware.gatekeeper@1.0-impl 179 180# Dumpstate HAL 181PRODUCT_PACKAGES += \ 182 android.hardware.dumpstate@1.0-service.dragon 183 184# Gralloc HAL 185PRODUCT_PACKAGES += \ 186 android.hardware.graphics.mapper@2.0-impl \ 187 android.hardware.graphics.allocator@2.0-impl \ 188 android.hardware.graphics.allocator@2.0-service 189 190#TODO(dgreid) is this right? 191PRODUCT_PROPERTY_OVERRIDES := \ 192 wifi.interface=wlan0 \ 193 ro.hwui.texture_cache_size=86 \ 194 ro.hwui.layer_cache_size=56 \ 195 ro.hwui.r_buffer_cache_size=8 \ 196 ro.hwui.path_cache_size=40 \ 197 ro.hwui.gradient_cache_size=1 \ 198 ro.hwui.drop_shadow_cache_size=6 \ 199 ro.hwui.texture_cache_flushrate=0.4 \ 200 ro.hwui.text_small_cache_width=1024 \ 201 ro.hwui.text_small_cache_height=1024 \ 202 ro.hwui.text_large_cache_width=2048 \ 203 ro.hwui.text_large_cache_height=1024 \ 204 ro.hwui.disable_scissor_opt=true 205 206# The default locale should be determined from VPD, not from build.prop. 207PRODUCT_SYSTEM_PROPERTY_BLACKLIST := \ 208 ro.product.locale 209 210# OEM Unlock reporting 211PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ 212 ro.oem_unlock_supported=1 213 214# setup dalvik vm configs. 215$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk) 216 217# set default USB configuration 218PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ 219 ro.adb.secure=1 \ 220 ro.sf.lcd_density=320 \ 221 ro.opengles.version=196610 222 223# for audio 224#TODO(dgreid) do we need libnvvisualizer? 225PRODUCT_PACKAGES += \ 226 audio.primary.dragon \ 227 sound_trigger.primary.dragon \ 228 audio.a2dp.default \ 229 audio.usb.default \ 230 audio.r_submix.default 231 232PRODUCT_PACKAGES += \ 233 android.hardware.audio@2.0-impl \ 234 android.hardware.audio.effect@2.0-impl \ 235 android.hardware.soundtrigger@2.0-impl 236 237PRODUCT_PACKAGES += \ 238 android.hardware.drm@1.0-impl 239 240PRODUCT_PACKAGES += \ 241 android.hardware.graphics.composer@2.1-impl 242 243PRODUCT_PROPERTY_OVERRIDES += \ 244 ro.audio.monitorRotation=true \ 245 ro.frp.pst=/dev/block/platform/700b0600.sdhci/by-name/PST 246 247# Default OMX service to non-Treble 248PRODUCT_PROPERTY_OVERRIDES += \ 249 persist.media.treble_omx=false 250 251# ro.product.first_api_level indicates the first api level the device has commercially launched on. 252PRODUCT_PROPERTY_OVERRIDES += \ 253 ro.product.first_api_level=23 254 255# for keyboard key mappings 256PRODUCT_PACKAGES += \ 257 DragonKeyboard 258 259# Vibrator HAL 260PRODUCT_PACKAGES += \ 261 android.hardware.vibrator@1.0-impl 262 263# Allows healthd to boot directly from charger mode rather than initiating a reboot. 264PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ 265 ro.enable_boot_charger_mode=1 266 267# TODO(dgreid) - Add back verity dependencies like flounder has. 268 269$(call inherit-product, build/target/product/vboot.mk) 270$(call inherit-product, build/target/product/verity.mk) 271# including verity.mk automatically enabled boot signer which conflicts with 272# vboot 273PRODUCT_SUPPORTS_BOOT_SIGNER := false 274PRODUCT_SUPPORTS_VERITY_FEC := false 275PRODUCT_SYSTEM_VERITY_PARTITION := /dev/block/platform/700b0600.sdhci/by-name/APP 276PRODUCT_VENDOR_VERITY_PARTITION := /dev/block/platform/700b0600.sdhci/by-name/VNR 277 278# The following group is necessary to support building the NVIDIA vendor 279# HALs and prebuilts. 280BOARD_SUPPORT_NVOICE := true 281BOARD_SUPPORT_NVAUDIOFX :=true 282BOARD_USES_LIBDRM := true 283NVRM_GPU_SUPPORT_NOUVEAU := 1 284NV_GPU_USE_SYNC_FD := 1 285USE_DRM_HWCOMPOSER := 1 286 287PRODUCT_PROPERTY_OVERRIDES += \ 288 ro.hardware.vulkan=tegra 289 290$(call inherit-product-if-exists, hardware/nvidia/tegra132/tegra132.mk) 291$(call inherit-product-if-exists, vendor/google_devices/dragon/device-vendor.mk) 292$(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/config/config-bcm.mk) 293 294ENABLE_LIBDRM := true 295BOARD_GPU_DRIVERS := tegra 296USE_XML_AUDIO_POLICY_CONF := 1 297PRODUCT_PACKAGES += \ 298 f54test \ 299 hwcomposer.drm \ 300 libdrm \ 301 rmi4update \ 302 rmihidtool 303 304# Vendor seccomp policy files for media components: 305PRODUCT_COPY_FILES += \ 306 device/google/dragon/seccomp_policy/mediacodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy 307 308$(call inherit-product-if-exists, vendor/nvidia/dragon/dragon-vendor.mk) 309