Files
android_device_nintendo_nx/device.mk
T
c03875880c nx: Intial rebrand from foster
* This is a tree for all Nintendo Switch variants:
  `odin`, `modin`, `vali`, and `frig`.
* `ro.hardware` will be NX on all variants with
   `ro.hardware.sku` being set per variant by u-boot.

Changes are as follows:
* At the moment the packaged DTB is only for `odin`, more to follow.
 * Note: We may make `modin`, `vail`, and `frig` device-tree-overlays
   on the `odin` base DTB to simplify things.
* Use darcy's thermal config as it's the most lenient, and is a same SoC STB.
* Unlike `icosa_sr` previously did, we will use the BCM HAL for BT over
  BTLinux, as A2DP is tested and verified, no need to deviate.

Changes that will require follow-up commits to build out:
* Update init to reflect nx's needs - will need more work to support devices
  other than `odin`.

Removals are as follows:
* Remove all non-nx device support files.

Co-authored-by: Thomas Makin <halorocker89@gmail.com>
Co-authored-by: Billy Laws <blaws05@gmail.com>
Co-authored-by: Aaron Kling <webgeek1234@gmail.com>
Co-authored-by: CTCaer <ctcaer@gmail.com>
Co-authored-by: John Smith <nemui3353@gmail.com>
Co-authored-by: langerhans <langerhans@users.noreply.github.com>
Co-authored-by: Nolen Johnson <johnsonnolen@gmail.com>
Change-Id: I9bab4d94c6e94a9c6e2a7cf04d16c4b76c0b6ac5
2024-01-25 14:56:45 -05:00

175 lines
4.5 KiB
Makefile

#
# Copyright (C) 2018 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))), nx),)
include device/nvidia/shield-common/shield.mk
endif
TARGET_TEGRA_VARIANT ?= common
TARGET_TEGRA_APTX ?= true
TARGET_TEGRA_AUDIO ?= nvaudio
TARGET_TEGRA_BT ?= bcm
TARGET_TEGRA_CAMERA ?= nvcamera
TARGET_TEGRA_CEC ?= nvhdmi
TARGET_TEGRA_KERNEL ?= 4.9
TARGET_TEGRA_KEYSTORE ?= nvkeystore
TARGET_TEGRA_MEMTRACK ?= nvmemtrack
TARGET_TEGRA_OMX ?= nvmm
TARGET_TEGRA_PHS ?= nvphs
TARGET_TEGRA_POWER ?= aosp
TARGET_TEGRA_WIDEVINE ?= true
TARGET_TEGRA_WIFI ?= bcm
ifneq ($(filter 3.10 4.9, $(TARGET_TEGRA_KERNEL)),)
TARGET_TEGRA_WIREGUARD ?= compat
endif
include device/nvidia/t210-common/t210.mk
# Properties
include $(LOCAL_PATH)/properties.mk
PRODUCT_CHARACTERISTICS := tv
PRODUCT_AAPT_PREBUILT_DPI := xxhdpi xhdpi hdpi mdpi hdpi tvdpi
PRODUCT_AAPT_PREF_CONFIG := xhdpi
$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
$(call inherit-product, device/nintendo/nx/vendor/nx-vendor.mk)
# Overlays
DEVICE_PACKAGE_OVERLAYS += \
device/nintendo/nx/overlay
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += device/nintendo/nx
# Init related
PRODUCT_PACKAGES += \
fstab.nx \
init.loki_e_common.rc \
init.loki_foster_e_common.rc \
init.nx.rc \
init.recovery.nx.rc \
power.nx.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)
PRODUCT_PACKAGES += \
android.hardware.tv.input@1.0-impl
endif
# Audio
ifeq ($(TARGET_TEGRA_AUDIO),nvaudio)
PRODUCT_PACKAGES += \
audio_effects.xml \
audio_policy_configuration.xml \
nvaudio_conf.xml
endif
# EKS
ifeq ($(TARGET_TEGRA_KEYSTORE),nvkeystore)
PRODUCT_PACKAGES += \
init.eks2.rc \
eks2_public.dat
endif
# Kernel
ifneq ($(TARGET_PREBUILT_KERNEL),)
TARGET_FORCE_PREBUILT_KERNEL := true
else ifeq ($(TARGET_TEGRA_KERNEL),4.9)
PRODUCT_PACKAGES += \
cypress-fmac
endif
# Keylayouts
PRODUCT_PACKAGES += \
gpio-keys.kl
# Light
PRODUCT_PACKAGES += \
android.hardware.light@2.0-service-nvidia
# Loadable kernel modules
PRODUCT_PACKAGES += \
init.lkm.rc \
lkm_loader
# Media config
PRODUCT_COPY_FILES += \
frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_ODM)/etc/media_codecs_google_audio.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_ODM)/etc/media_codecs_google_video.xml
PRODUCT_PACKAGES += \
media_codecs.xml
ifneq (,$(findstring nvmm,$(TARGET_TEGRA_OMX)))
PRODUCT_PACKAGES += \
media_codecs_performance.xml \
media_profiles_V1_0.xml \
enctune.conf
endif
# Netflix
ifeq ($(PRODUCT_IS_ATV),true)
PRODUCT_PACKAGES += \
NetflixConfig \
NetflixConfigOverlay
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/permissions/netflix.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/netflix.xml \
$(LOCAL_PATH)/permissions/nrdp.modelgroup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/nrdp.modelgroup.xml
endif
# NVIDIA specific permissions
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/permissions/com.nvidia.feature.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nvidia.feature.xml
# PHS
ifeq ($(TARGET_TEGRA_PHS),nvphs)
PRODUCT_PACKAGES += \
nvphsd.conf
endif
# SKU Specific Overlays
PRODUCT_PACKAGES += \
DarcyOverlay
# Thermal
PRODUCT_PACKAGES += \
android.hardware.thermal@1.0-service-nvidia \
thermalhal.nx.xml
# Treble workaround
PRODUCT_PACKAGES += $(PRODUCT_PACKAGES_SHIPPING_API_LEVEL_29)
# Trust HAL
PRODUCT_PACKAGES += \
vendor.lineage.trust@1.0-service
# WiFi
ifeq ($(TARGET_TEGRA_WIFI),bcm)
PRODUCT_PACKAGES += \
wifi_scan_config.conf
endif
PRODUCT_PACKAGES += \
WifiOverlay