-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdevice.mk
152 lines (127 loc) · 5.1 KB
/
device.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#
# Copyright (C) 2019 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Only include Shield apps for first party targets
ifneq ($(filter $(word 2,$(subst _, ,$(TARGET_PRODUCT))), quill quill_tab),)
include device/nvidia/shield-common/shield.mk
endif
TARGET_REFERENCE_DEVICE ?= quill
TARGET_TEGRA_VARIANT ?= common
TARGET_TEGRA_MODELS := $(shell awk -F, '/tegra_init::devices/{ f = 1; next } /};/{ f = 0 } f{ gsub(/"/, "", $$3); gsub(/ /, "", $$3); print $$3 }' device/nvidia/$(TARGET_REFERENCE_DEVICE)/init/init_$(TARGET_REFERENCE_DEVICE).cpp |sort |uniq)
TARGET_TEGRA_BOOTCTRL ?= smd
TARGET_TEGRA_BT ?= bcm btlinux
TARGET_TEGRA_CAMERA ?= rel-shield-r
TARGET_TEGRA_KERNEL ?= 4.9
TARGET_TEGRA_HEALTH ?= nobattery
TARGET_TEGRA_TOS ?= software
TARGET_TEGRA_LIGHT ?= lineage
TARGET_TEGRA_THERMAL ?= lineage
TARGET_TEGRA_WIDEVINE ?= rel-shield-r
TARGET_TEGRA_WIFI ?= bcm
include device/nvidia/t186-common/t186.mk
# System properties
include $(LOCAL_PATH)/system_prop.mk
PRODUCT_CHARACTERISTICS := tv
PRODUCT_AAPT_PREBUILT_DPI := xxhdpi xhdpi hdpi mdpi hdpi tvdpi
PRODUCT_AAPT_PREF_CONFIG := xhdpi
PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := true
$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
include device/nvidia/quill/vendor/quill-vendor.mk
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += device/nvidia/quill
# Overlays
DEVICE_PACKAGE_OVERLAYS += \
device/nvidia/quill/overlay
# Init related
PRODUCT_COPY_FILES += \
$(foreach model,$(TARGET_TEGRA_MODELS),device/nvidia/quill/initfiles/fstab.quill:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.$(model)) \
$(foreach model,$(TARGET_TEGRA_MODELS),device/nvidia/quill/initfiles/fstab.quill:$(TARGET_COPY_OUT_RAMDISK)/fstab.$(model)) \
$(foreach model,$(TARGET_TEGRA_MODELS),device/nvidia/quill/initfiles/init.$(model).rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(model).rc) \
$(foreach model,$(TARGET_TEGRA_MODELS),device/nvidia/quill/initfiles/init.recovery.quill.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.$(model).rc) \
$(foreach model,$(TARGET_TEGRA_MODELS),device/nvidia/quill/initfiles/power.quill.rc:$(TARGET_COPY_OUT_ODM)/etc/power.$(model).rc) \
device/nvidia/quill/initfiles/init.quill_common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.quill_common.rc
# Permissions
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml
# ATV specific stuff
ifeq ($(PRODUCT_IS_ATV),true)
$(call inherit-product-if-exists, vendor/google/atv/atv-common.mk)
PRODUCT_PACKAGES += \
endif
# Audio
ifneq ($(filter rel-shield-r, $(TARGET_TEGRA_AUDIO)),)
PRODUCT_PACKAGES += \
audio_effects.xml \
audio_policy_configuration.xml \
nvaudio_conf.xml \
nvaudio_fx.xml
endif
# Kernel
ifneq ($(TARGET_PREBUILT_KERNEL),)
TARGET_FORCE_PREBUILT_KERNEL := true
endif
# Loadable kernel modules
PRODUCT_PACKAGES += \
lkm_loader \
lkm_loader_target
PRODUCT_COPY_FILES += \
device/nvidia/tegra-common/initfiles/init.lkm.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.lkm.rc
# Media config
ifneq ($(filter rel-shield-r, $(TARGET_TEGRA_OMX)),)
PRODUCT_PACKAGES += \
media_codecs.xml \
media_codecs_performance.xml \
media_profiles_V1_0.xml \
enctune.conf
endif
# NvPModel
PRODUCT_PACKAGES += \
nvpmodel
PRODUCT_COPY_FILES += \
device/nvidia/quill/nvpmodel/nvpmodel_t186.conf:$(TARGET_COPY_OUT_ODM)/etc/nvpmodel_t186.conf \
device/nvidia/quill/nvpmodel/nvpmodel_t186_p3636.conf:$(TARGET_COPY_OUT_ODM)/etc/nvpmodel_t186_p3636.conf
# PHS
ifneq ($(TARGET_TEGRA_PHS),)
PRODUCT_COPY_FILES += \
device/nvidia/quill/nvphs/nvphsd.conf.t186:$(TARGET_COPY_OUT_ODM)/etc/nvphsd.conf
endif
# Thermal
ifneq ($(TARGET_TEGRA_THERMAL),)
PRODUCT_COPY_FILES += \
$(foreach model,$(TARGET_TEGRA_MODELS),device/nvidia/quill/thermal/thermalhal.quill.xml:$(TARGET_COPY_OUT_VENDOR)/etc/thermalhal.$(model).xml)
endif
# Updater
ifneq ($(TARGET_TEGRA_BOOTCTRL),)
AB_OTA_PARTITIONS += \
boot \
recovery \
system \
vbmeta \
vendor \
odm
ifeq ($(TARGET_TEGRA_BOOTCTRL),smd)
AB_OTA_POSTINSTALL_CONFIG += \
FILESYSTEM_TYPE_system=ext4 \
POSTINSTALL_OPTIONAL_system=true \
POSTINSTALL_PATH_system=system/bin/nv_bootloader_payload_updater \
RUN_POSTINSTALL_system=true
PRODUCT_PACKAGES += \
nv_bootloader_payload_updater
endif
endif
PRODUCT_PACKAGES += \
WifiOverlay