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 38LOCAL_FSTAB := $(LOCAL_PATH)/fstab.dragon 39 40TARGET_RECOVERY_FSTAB = $(LOCAL_FSTAB) 41 42PRODUCT_COPY_FILES := \ 43 $(LOCAL_KERNEL):kernel \ 44 $(LOCAL_PATH)/dump_bq25892.sh:system/bin/dump_bq25892.sh \ 45 $(LOCAL_PATH)/touchfwup.sh:system/bin/touchfwup.sh \ 46 $(LOCAL_PATH)/init.dragon.rc:root/init.dragon.rc \ 47 $(LOCAL_PATH)/init.dragon.usb.rc:root/init.dragon.usb.rc \ 48 $(LOCAL_PATH)/init.recovery.dragon.rc:root/init.recovery.dragon.rc \ 49 $(LOCAL_PATH)/init_regions.sh:system/bin/init_regions.sh \ 50 $(LOCAL_PATH)/tune-thermal-gov.sh:system/bin/tune-thermal-gov.sh \ 51 $(LOCAL_FSTAB):root/fstab.dragon \ 52 $(LOCAL_PATH)/ueventd.dragon.rc:root/ueventd.dragon.rc \ 53 $(LOCAL_PATH)/speakerdsp.ini:system/etc/cras/speakerdsp.ini \ 54 $(LOCAL_PATH)/bcmdhd.cal:system/etc/wifi/bcmdhd.cal \ 55 $(LOCAL_PATH)/com.nvidia.nvsi.xml:system/etc/permissions/com.nvidia.nvsi.xml 56 57PRODUCT_PACKAGES += \ 58 libwpa_client \ 59 hostapd \ 60 wpa_supplicant \ 61 wpa_supplicant.conf \ 62 fs_config_files \ 63 crash_dispatcher \ 64 crash_collector \ 65 CrashReportProvider \ 66 fwtool 67 68ifeq ($(TARGET_BUILD_VARIANT),eng) 69PRODUCT_PACKAGES += \ 70 tinyplay \ 71 tinycap \ 72 tinymix 73endif 74 75PRODUCT_COPY_FILES += \ 76 frameworks/native/data/etc/tablet_core_hardware.xml:system/etc/permissions/tablet_core_hardware.xml \ 77 frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ 78 frameworks/native/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml \ 79 frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ 80 frameworks/native/data/etc/android.hardware.camera.full.xml:system/etc/permissions/android.hardware.camera.full.xml \ 81 frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ 82 frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \ 83 frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \ 84 frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \ 85 frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \ 86 frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \ 87 frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \ 88 frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \ 89 frameworks/native/data/etc/android.hardware.opengles.aep.xml:system/etc/permissions/android.hardware.opengles.aep.xml \ 90 frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \ 91 frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \ 92 frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \ 93 frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ 94 frameworks/native/data/etc/android.software.midi.xml:system/etc/permissions/android.software.midi.xml \ 95 frameworks/native/data/etc/android.software.verified_boot.xml:system/etc/permissions/android.software.verified_boot.xml \ 96 frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:system/etc/permissions/android.hardware.vulkan.level.xml \ 97 frameworks/native/data/etc/android.hardware.vulkan.version-1_0_3.xml:system/etc/permissions/android.hardware.vulkan.version.xml 98 99PRODUCT_COPY_FILES += \ 100 frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:system/etc/a2dp_audio_policy_configuration.xml \ 101 frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:system/etc/usb_audio_policy_configuration.xml \ 102 frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:system/etc/r_submix_audio_policy_configuration.xml \ 103 frameworks/av/services/audiopolicy/config/default_volume_tables.xml:system/etc/default_volume_tables.xml \ 104 $(LOCAL_PATH)/audio_policy_configuration.xml:system/etc/audio_policy_configuration.xml \ 105 $(LOCAL_PATH)/audio_policy_volumes_drc.xml:system/etc/audio_policy_volumes_drc.xml \ 106 $(LOCAL_PATH)/mixer_paths_0.xml:system/etc/mixer_paths_0.xml 107 108PRODUCT_COPY_FILES += \ 109 frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \ 110 frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \ 111 $(LOCAL_PATH)/media_codecs.xml:system/etc/media_codecs.xml \ 112 $(LOCAL_PATH)/media_codecs_performance.xml:system/etc/media_codecs_performance.xml \ 113 $(LOCAL_PATH)/media_profiles.xml:system/etc/media_profiles.xml 114 115PRODUCT_COPY_FILES += \ 116 $(LOCAL_PATH)/bluetooth/BCM4350C0_003.001.012.0364.0754.hcd:$(TARGET_COPY_OUT_VENDOR)/firmware/bcm4350c0.hcd \ 117 $(LOCAL_PATH)/bluetooth/bt_vendor.conf:$(TARGET_COPY_OUT_SYSTEM)/etc/bluetooth/bt_vendor.conf 118 119# Copy dsp firmware to the vendor parition so it is available when hotwording 120# starts 121PRODUCT_COPY_FILES += \ 122 $(LOCAL_PATH)/rt5677_elf_vad:vendor/firmware/rt5677_elf_vad 123 124PRODUCT_COPY_FILES += \ 125 $(LOCAL_PATH)/enctune.conf:system/etc/enctune.conf 126 127PRODUCT_COPY_FILES += \ 128 device/google/dragon/audio_effects.conf:system/etc/audio_effects.conf 129 130PRODUCT_AAPT_CONFIG := normal large xlarge hdpi xhdpi xxhdpi 131PRODUCT_AAPT_PREF_CONFIG := xhdpi 132 133PRODUCT_CHARACTERISTICS := tablet,nosdcard 134 135DEVICE_PACKAGE_OVERLAYS := \ 136 $(LOCAL_PATH)/overlay 137 138PRODUCT_TAGS += dalvik.gc.type-precise 139 140PRODUCT_PACKAGES += \ 141 librs_jni \ 142 com.android.future.usb.accessory 143 144PRODUCT_PACKAGES += \ 145 power.dragon \ 146 lights.dragon \ 147 sensors.dragon 148 149#TODO(dgreid) is this right? 150PRODUCT_PROPERTY_OVERRIDES := \ 151 wifi.interface=wlan0 \ 152 ro.hwui.texture_cache_size=86 \ 153 ro.hwui.layer_cache_size=56 \ 154 ro.hwui.r_buffer_cache_size=8 \ 155 ro.hwui.path_cache_size=40 \ 156 ro.hwui.gradient_cache_size=1 \ 157 ro.hwui.drop_shadow_cache_size=6 \ 158 ro.hwui.texture_cache_flushrate=0.4 \ 159 ro.hwui.text_small_cache_width=1024 \ 160 ro.hwui.text_small_cache_height=1024 \ 161 ro.hwui.text_large_cache_width=2048 \ 162 ro.hwui.text_large_cache_height=1024 \ 163 ro.hwui.disable_scissor_opt=true 164 165# The default locale should be determined from VPD, not from build.prop. 166PRODUCT_SYSTEM_PROPERTY_BLACKLIST := \ 167 ro.product.locale 168 169# OEM Unlock reporting 170ADDITIONAL_DEFAULT_PROPERTIES += \ 171 ro.oem_unlock_supported=1 172 173# setup dalvik vm configs. 174$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk) 175 176# set default USB configuration 177PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ 178 persist.sys.usb.config=mtp \ 179 ro.adb.secure=1 \ 180 ro.sf.lcd_density=320 \ 181 ro.opengles.version=196609 182 183# for audio 184#TODO(dgreid) do we need libnvvisualizer? 185PRODUCT_PACKAGES += \ 186 audio.primary.dragon \ 187 sound_trigger.primary.dragon \ 188 audio.a2dp.default \ 189 audio.usb.default \ 190 audio.r_submix.default 191 192PRODUCT_PROPERTY_OVERRIDES += \ 193 ro.audio.monitorRotation=true \ 194 ro.frp.pst=/dev/block/platform/700b0600.sdhci/by-name/PST 195 196# for keyboard key mappings 197PRODUCT_PACKAGES += \ 198 DragonKeyboard 199 200# Allows healthd to boot directly from charger mode rather than initiating a reboot. 201PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ 202 ro.enable_boot_charger_mode=1 203 204# TODO(dgreid) - Add back verity dependencies like flounder has. 205 206$(call inherit-product, build/target/product/vboot.mk) 207$(call inherit-product, build/target/product/verity.mk) 208# including verity.mk automatically enabled boot signer which conflicts with 209# vboot 210PRODUCT_SUPPORTS_BOOT_SIGNER := false 211PRODUCT_SUPPORTS_VERITY_FEC := false 212PRODUCT_SYSTEM_VERITY_PARTITION := /dev/block/platform/700b0600.sdhci/by-name/APP 213PRODUCT_VENDOR_VERITY_PARTITION := /dev/block/platform/700b0600.sdhci/by-name/VNR 214 215# The following group is necessary to support building the NVIDIA vendor 216# HALs and prebuilts. 217BOARD_SUPPORT_NVOICE := true 218BOARD_SUPPORT_NVAUDIOFX :=true 219BOARD_USES_LIBDRM := true 220NVRM_GPU_SUPPORT_NOUVEAU := 1 221NV_GPU_USE_SYNC_FD := 1 222USE_DRM_HWCOMPOSER := 1 223 224PRODUCT_PROPERTY_OVERRIDES += \ 225 ro.hardware.vulkan=tegra 226 227$(call inherit-product-if-exists, hardware/nvidia/tegra132/tegra132.mk) 228$(call inherit-product-if-exists, vendor/google_devices/dragon/device-vendor.mk) 229$(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/config/config-bcm.mk) 230 231ENABLE_LIBDRM := true 232BOARD_GPU_DRIVERS := tegra 233USE_XML_AUDIO_POLICY_CONF := 1 234PRODUCT_PACKAGES += \ 235 f54test \ 236 hwcomposer.drm \ 237 libdrm \ 238 rmi4update \ 239 rmihidtool 240 241$(call inherit-product-if-exists, vendor/nvidia/dragon/dragon-vendor.mk) 242