...
 
Commits (53)
......@@ -28,11 +28,20 @@ TARGET_COPY_OUT_VENDOR := vendor
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
# Assert
TARGET_OTA_ASSERT_DEVICE := foster,darcy,mdarcy,sif,jetson,porg,loki
TARGET_OTA_ASSERT_DEVICE := foster,darcy,mdarcy,sif,jetson,porg,loki,icosa
# Bootloader versions
TARGET_BOARD_INFO_FILE := device/nvidia/foster/board-info.txt
# Manifest
DEVICE_MANIFEST_FILE := device/nvidia/foster/manifest.xml
# Bluetooth
ifeq ($(TARGET_TEGRA_BT),bcm)
BOARD_CUSTOM_BT_CONFIG := device/nvidia/foster/comms/vnd_foster.txt
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/nvidia/foster/comms
endif
# Kernel
KERNEL_TOOLCHAIN := $(shell pwd)/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-gnu-6.4.1/bin
KERNEL_TOOLCHAIN_PREFIX := aarch64-linux-gnu-
......@@ -42,16 +51,35 @@ BOARD_KERNEL_IMAGE_NAME := Image.gz
BOARD_KERNEL_BASE := 0x80080000
BOARD_KERNEL_PAGESIZE := 4096
# Light
include hardware/nvidia/light/BoardLight.mk
# Lineage Hardware Support
JAVA_SOURCE_OVERLAYS := org.lineageos.hardware|device/nvidia/foster/lineagehw|**/*.java
# Recovery
TARGET_RECOVERY_FSTAB := device/nvidia/foster/initfiles/fstab.foster
BOARD_SUPPRESS_EMMC_WIPE := true
# Releasetools
TARGET_RELEASETOOLS_EXTENSIONS := device/nvidia/foster/releasetools
# Security Patch Level
VENDOR_SECURITY_PATCH := 2019-07-05
# Treble
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
BOARD_VNDK_VERSION := current
PRODUCT_FULL_TREBLE_OVERRIDE := true
# TWRP Support
ifeq ($(WITH_TWRP),true)
include device/nvidia/foster/twrp/twrp.mk
endif
#Vendor Init
TARGET_INIT_VENDOR_LIB := libinit_foster
include device/nvidia/t210-common/BoardConfigCommon.mk
include device/nvidia/touch/BoardConfigTouch.mk
include vendor/nvidia/foster/BoardConfigVendor.mk
require version-bootloader=32.00.2019.29-t210-352664f9|32.00.2019.29-t210-840db81f|32.00.2019.50-t210-c0223907|24.00.2015.42-t210-39c6cadc
require version-bootloader=32.00.2019.29-t210-352664f9|32.00.2019.29-t210-840db81f|32.00.2019.50-t210-c0223907|24.00.2015.42-t210-39c6cadc|2020.04-00022-gdb8327930e
# 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.
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := wifi_scan_config.conf
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := wifi_scan_config.conf
LOCAL_MODULE_RELATIVE_PATH := wifi
include $(BUILD_PREBUILT)
/*
* Copyright (C) 2012 The Android Open Source 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.
*/
#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H
// SERVICE_CLASS:0x5A (Bit17 -Networking,Bit19 - Capturing,Bit20 -Object Transfer,Bit22 -Telephony)
// MAJOR CLASS: COMPUTER
// MINOR CLASS: TABLET
#define BTA_DM_COD {0x5A, 0x01, 0x10}
// SERVICE_CLASS:0x20 (Bit18 - Rendering)
// MAJOR CLASS: AUDIO/VIDEO
// MINOR CLASS: set top box
#define BTA_DM_COD_ATV {0x20, BTM_COD_MAJOR_AUDIO, BTM_COD_MINOR_SET_TOP_BOX}
#define BTIF_HF_WBS_PREFERRED TRUE
#define BTM_WBS_INCLUDED TRUE
#define BLE_VND_INCLUDED TRUE
#define BTSNOOP_MEM_BUFFER_SIZE (1024 * 1024)
#define DEBUG_FS_UART_PATH "/d/70006300.serial/tty_buffer_count"
// To sync with CONN TIMEOUT of pepper
#define BTM_BLE_CONN_TIMEOUT_DEF 1000
// Increase MAX GATT notification to 75
#define BTA_GATTC_NOTIF_REG_MAX 75
#endif
BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyTHS3"
FW_PATCHFILE_LOCATION = "/vendor/firmware/"
#Device no movement time configuration in seconds
devicenomovementtime=120
#Device max exponential time in seconds, after max time expo time will be reset.
maxexpotime=300
#ATV:Block Settings Page Scan outside network page when Ethernet is connected
scan={
app=com.android.tv.settings
rate=-1
#Ethernet case
nvappproperty=connectivity.state:ethernet
nvappproperty=settings.uipage:other
#ATV check
appproperty=ro.product.model:SHIELD Android TV
#Block scan
scanpolicy=1:block_scan -W 8 1 536 2 -H 3 -n 1 -a 3 -p 3 -h 32 -c 1-14*8,36-165*4
}
#ATV: BLOCK SCAN WHEN TS is having a2dp in sniff mode
scan={
app=DEFAULT
rate=-1
#APP PROPERTY
appproperty=ro.product.model:SHIELD Android TV
nvappproperty=pc2shield.state:active ||
nvappproperty=grid2shield.state:active ||
appproperty=bluetooth.ts.a2dp.sniff:1
#NVAPP PROPERTY
nvappproperty=settings.uipage:other
#BLOCK SCAN
scanpolicy=1:block_scan -W 8 1 536 2 -H 3 -n 1 -a 3 -p 3 -h 32 -c 1-14*8,36-165*4
}
#ATV specific WHEN ETHERNET NETWORK IS CONNECTED- DO Fast Scan
scan={
app=DEFAULT
#Ethernet case
nvappproperty=connectivity.state:ethernet
nvappproperty=settings.uipage:other
#ATV check
appproperty=ro.product.model:SHIELD Android TV
#Do fast scan
scanpolicy=atv_fast_scan -H 100 -n 1 -a 10 -p 130 -h 45
}
#ATV specific WHEN Wi-FI IS CONNECTED- DO Fast Scan
scan={
app=DEFAULT
# Wi-Fi connected
wpastate=CONNECTED
nvappproperty=settings.uipage:other
#ATV check
appproperty=ro.product.model:SHIELD Android TV
#Do fast scan
scanpolicy=atv_fast_scan -H 100 -n 2 -a 10 -p 130 -h 45
}
#G.S/BLAKE/CAST PROFILE
scan={
app=DEFAULT
rate=15
#SCAN RATE VALUE FOR DISPLAY TURNED OFF
displayoffrate=300
#APP PROPERTIES
nvappproperty=blake.conn.count:>0 ||
nvappproperty=pc2shield.state:active ||
appproperty=sys.cast.on:1 ||
nvappproperty=grid2shield.state:active
#ALLOW ONLY IF DISPLAY IS ON
#display=1
#ALLOW ONLY FOREGROUND APP
#foreground=1
#ENABLE SCAN EXPONENTIAL
scanexponential=1
#REPEAT EACH CHANNEL 2.4 GHZ 8 times and 5GHZ 4 times.
#ALLIGN BLAKE PKT 8ms, 1 p2p interface, 536 pkt size, 2 count
scanpolicy=1:blake_activea -W 8 1 536 2 -H 3 -n 1 -a 3 -p 3 -h 32 -c 1-14*8,36-165*4
scanpolicy=1:blake_activea -W 8 1 536 2 -H 3 -n 1 -a 3 -p 3 -h 32 -c 1-14*8,36-165*4
scanpolicy=1:blake_activea -W 8 1 536 2 -H 3 -n 1 -a 3 -p 3 -h 32 -c 1-14*8,36-165*4
#PASSIVE SCANNING
#-O optional is used only if DFS(PASSIVE) channels are not available.
scanpolicy=1:blake_passivea -W 8 1 536 2 -H 3 -a 3 -p 3 -h 32 -c 12-14*34 -- -W 8 1 536 2 -H 5 -a 5 -p 5 -h 32 -c 52-59*34 -- -W 8 1 536 2 -H 5 -a 5 -p 5 -h 32 -c 60-79*34 -- -O -W 8 1 536 2 -H 3 -n 1 -a 3 -p 3 -h 32 -c 1-14*8,36-165*4
scanpolicy=1:blake_activea -W 8 1 536 2 -H 3 -n 1 -a 3 -p 3 -h 32 -c 1-14*8,36-165*4
scanpolicy=1:blake_passiveb -W 8 1 536 2 -H 5 -a 5 -p 5 -h 32 -c 80-99*34 -- -W 8 1 536 2 -H 5 -a 5 -p 5 -h 32 -c 100-119*34 -- -W 8 1 536 2 -H 5 -a 5 -p 5 -h 32 -c 120-139*34 -- -W 8 1 536 2 -O -H 3 -n 1 -a 3 -p 3 -h 32 -c 1-14*8,36-165*4
}
#DEFAULT ASSOCIATED PROFILE
scan={
app=DEFAULT
wpastate=CONNECTED
rate=15
#SCAN RATE VALUE FOR DISPLAY TURNED OFF
displayoffrate=300
#APP PROPERTY
nvappproperty=blake.conn.count:0
#ENABLE SCAN EXPONENTIAL
scanexponential=1
#ALLOW ONLY IF DISPLAY IS ON
#display=1
#ALLOW ONLY FOREGROUND APP
#foreground=1
scanpolicy=default_assoc -H 100 -n 2 -a 35 -p 130 -h 45 -c 1-13 -- -H 100 -n 2 -a 35 -p 130 -h 45 -c 36-100 -- -H 100 -n 2 -a 35 -p 130 -h 45 -c 100-165
}
#THIS IS LAST RULE IF any of the above rule doesnt match
scan={
app=DEFAULT
wpastate=SCANNING
rate=15
#SCAN RATE VALUE FOR DISPLAY TURNED OFF
displayoffrate=300
#APP PROPERTY
nvappproperty=blake.conn.count:0
#ENABLE SCAN EXPONENTIAL
scanexponential=1
#PNO contains TIME REPEAT EXPONENTIAL, PNO scans every 5min
pno=150 1 1
#appproperty=wifi.interface:wlan0
scanpolicy=default_unassoc -H 100 -n 2 -a 65 -p 130 -h 45 -c 1-13 -- -H 100 -n 2 -a 65 -p 130 -h 45 -c 36-100 -- -H 100 -n 2 -a 65 -p 130 -h 45 -c 100-165
}
......@@ -17,7 +17,28 @@
TARGET_REFERENCE_DEVICE ?= foster
TARGET_TEGRA_VARIANT := common
TARGET_TEGRA_AUDIO ?= nvaudio
TARGET_TEGRA_BT ?= bcm
TARGET_TEGRA_CEC ?= nvhdmi
TARGET_TEGRA_KEYSTORE ?= nvkeystore
TARGET_TEGRA_MEMTRACK ?= nvmemtrack
TARGET_TEGRA_OMX ?= nvmm64
TARGET_TEGRA_PHS ?= nvphs
TARGET_TEGRA_POWER ?= lineage
TARGET_TEGRA_WIDEVINE ?= true
TARGET_TEGRA_WIFI ?= bcm
$(call inherit-product, device/nvidia/t210-common/t210.mk)
$(call inherit-product, device/nvidia/touch/raydium.mk)
$(call inherit-product, device/nvidia/touch/shtouch.mk)
# Only include Shield apps for first party targets
ifneq ($(filter $(word 2,$(subst _, ,$(TARGET_PRODUCT))), foster foster_tab),)
$(call inherit-product, device/nvidia/shield-common/shield.mk)
endif
# System properties
include $(LOCAL_PATH)/system_prop.mk
PRODUCT_CHARACTERISTICS := tv
PRODUCT_AAPT_CONFIG := xlarge large
......@@ -27,19 +48,29 @@ TARGET_SCREEN_WIDTH := 1080
$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
$(call inherit-product, vendor/nvidia/foster/foster-vendor.mk)
PRODUCT_VENDOR_PROPERTY_BLACKLIST := \
ro.product.vendor.device \
ro.product.vendor.model \
ro.product.vendor.name \
ro.vendor.build.fingerprint
# Overlays
DEVICE_PACKAGE_OVERLAYS += \
device/nvidia/foster/overlay
# Init related
PRODUCT_PACKAGES += \
init_tegra \
fstab.darcy \
fstab.dragon \
fstab.foster \
fstab.foster_e \
fstab.foster_e_hdd \
fstab.he2290 \
fstab.icosa \
fstab.icosa_emmc \
fstab.jetson_cv \
fstab.jetson_e \
fstab.loki_e_base \
......@@ -49,11 +80,16 @@ PRODUCT_PACKAGES += \
fstab.porg_sd \
fstab.sif \
init.darcy.rc \
init.dragon.rc \
init.foster_e.rc \
init.foster_e_hdd.rc \
init.foster_e_common.rc \
init.he2290.rc \
init.loki_e_common.rc \
init.loki_foster_e_common.rc \
init.icosa.rc \
init.icosa_common.rc \
init.icosa_emmc.rc \
init.jetson_cv.rc \
init.jetson_e.rc \
init.loki_e_base.rc \
......@@ -63,9 +99,13 @@ PRODUCT_PACKAGES += \
init.porg_sd.rc \
init.sif.rc \
init.recovery.darcy.rc \
init.recovery.dragon.rc \
init.recovery.foster_e.rc \
init.recovery.foster_e_hdd.rc \
init.recovery.foster_common.rc \
init.recovery.he2290.rc \
init.recovery.icosa.rc \
init.recovery.icosa_emmc.rc \
init.recovery.jetson_cv.rc \
init.recovery.jetson_e.rc \
init.recovery.loki_e_base.rc \
......@@ -75,8 +115,12 @@ PRODUCT_PACKAGES += \
init.recovery.porg_sd.rc \
init.recovery.sif.rc \
power.darcy.rc \
power.dragon.rc \
power.foster_e.rc \
power.foster_e_hdd.rc \
power.he2290.rc \
power.icosa.rc \
power.icosa_emmc.rc \
power.jetson_cv.rc \
power.jetson_e.rc \
power.loki_e_base.rc \
......@@ -85,3 +129,105 @@ PRODUCT_PACKAGES += \
power.porg.rc \
power.porg_sd.rc \
power.sif.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 += \
android.hardware.tv.input@1.0-impl
endif
# Audio
ifeq ($(TARGET_TEGRA_AUDIO),nvaudio)
PRODUCT_PACKAGES += \
audio_effects.xml \
audio_policy_configuration.xml \
dragon_nvaudio_conf.xml \
icosa_nvaudio_conf.xml \
icosa_emmc_nvaudio_conf.xml \
nvaudio_conf.xml \
nvaudio_fx.xml
endif
# Charger
PRODUCT_PACKAGES += \
charger \
charger_res_images
# EKS
ifeq ($(TARGET_TEGRA_KEYSTORE),nvkeystore)
PRODUCT_PACKAGES += \
eks2_darcy.dat \
eks2_foster.dat \
eks2_mdarcy.dat \
eks2_public.dat \
eks2_sif.dat
endif
# Joycon daemon
PRODUCT_PACKAGES += \
joycond
# 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 ($(filter $(TARGET_TEGRA_OMX), nvmm nvmm64),)
PRODUCT_PACKAGES += \
media_codecs_performance.xml \
media_profiles_V1_0.xml
endif
# Netflix nrdp
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/permissions/nrdp.modelgroup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/nrdp.modelgroup.xml
# 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
# Thermal
PRODUCT_PACKAGES += \
android.hardware.thermal@1.0-service-nvidia \
thermalhal.jetson_cv.xml \
thermalhal.jetson_e.xml \
thermalhal.loki_e_lte.xml \
thermalhal.loki_e_wifi.xml
# Trust HAL
PRODUCT_PACKAGES += \
vendor.lineage.trust@1.0-service
# Variant blobs script
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/releasetools/variant_blobs.sh:install/bin/variant_blobs.sh
# WiFi
ifeq ($(TARGET_TEGRA_WIFI),bcm)
PRODUCT_PACKAGES += \
cypress-fmac \
wifi_scan_config.conf
endif
#
# 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.
#
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := eks2_foster.dat
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := eks2_foster.dat
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/app/eks2
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := eks2_darcy.dat
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := eks2_darcy.dat
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/app/eks2
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := eks2_mdarcy.dat
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := eks2_mdarcy.dat
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/app/eks2
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := eks2_public.dat
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := eks2_public.dat
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/app/eks2
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := eks2_sif.dat
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := eks2_sif.dat
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/app/eks2
include $(BUILD_PREBUILT)
#!/bin/bash
#
# 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.
#
set -e
DEVICE=foster
VENDOR=nvidia
# Load extract_utils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
LINEAGE_ROOT="$MY_DIR"/../../..
HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh
if [ ! -f "$HELPER" ]; then
echo "Unable to find helper script at $HELPER"
exit 1
fi
. "$HELPER"
while [ "$1" != "" ]; do
case $1 in
-n | --no-cleanup ) CLEAN_VENDOR=false
;;
-s | --section ) shift
SECTION=$1
CLEAN_VENDOR=false
;;
* ) SRC=$1
;;
esac
shift
done
if [ -z "$SRC" ]; then
SRC=adb
fi
# Initialize the helper
setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" false "$CLEAN_VENDOR"
extract "$MY_DIR"/proprietary-files.txt "$SRC" "$SECTION"
"$MY_DIR"/setup-makefiles.sh
//
// 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.
//
cc_library_static {
name: "libinit_foster",
recovery_available: true,
include_dirs: [
"device/nvidia/tegra-common/init",
],
whole_static_libs: ["libinit_tegra"],
srcs: [
"init_foster.cpp",
],
}
cc_library_static {
name: "libinit_foster_vendor",
vendor: true,
include_dirs: [
"device/nvidia/tegra-common/init",
],
srcs: [
"init_foster.cpp",
],
}
......@@ -80,6 +80,35 @@ void vendor_set_usb_product_ids(tegra_init *ti)
mDeviceUsbIds["ro.vendor.nv.usb.pid.ptp.adb"] = "B427";
mDeviceUsbIds["ro.vendor.nv.usb.pid.rndis"] = "B428";
mDeviceUsbIds["ro.vendor.nv.usb.pid.rndis.adb"] = "B429";
} else if (ti->is_model("he2290")) {
mDeviceUsbIds["ro.vendor.nv.usb.pid.mtp"] = "CF0A";
mDeviceUsbIds["ro.vendor.nv.usb.pid.mtp.adb"] = "CF0B";
mDeviceUsbIds["ro.vendor.nv.usb.pid.ptp"] = "CF0C";
mDeviceUsbIds["ro.vendor.nv.usb.pid.ptp.adb"] = "CF0C";
mDeviceUsbIds["ro.vendor.nv.usb.pid.rndis"] = "7103";
mDeviceUsbIds["ro.vendor.nv.usb.pid.rndis.adb"] = "7103";
} else if (ti->is_model("icosa") || ti->is_model("icosa_emmc")) {
mDeviceUsbIds["ro.vendor.nv.usb.vid"] = "057E";
mDeviceUsbIds["ro.vendor.nv.usb.pid.mtp"] = "2000";
mDeviceUsbIds["ro.vendor.nv.usb.pid.mtp.adb"] = "2000";
mDeviceUsbIds["ro.vendor.nv.usb.pid.ptp"] = "2000";
mDeviceUsbIds["ro.vendor.nv.usb.pid.ptp.adb"] = "2000";
mDeviceUsbIds["ro.vendor.nv.usb.pid.rndis"] = "2000";
mDeviceUsbIds["ro.vendor.nv.usb.pid.rndis.adb"] = "2000";
} else if (ti->is_model("dragon")) {
mDeviceUsbIds["ro.vendor.nv.usb.vid"] = "18D1";
mDeviceUsbIds["ro.vendor.nv.usb.pid.mtp"] = "5202";
mDeviceUsbIds["ro.vendor.nv.usb.pid.mtp.adb"] = "5203";
mDeviceUsbIds["ro.vendor.nv.usb.pid.ptp"] = "5206";
mDeviceUsbIds["ro.vendor.nv.usb.pid.ptp.adb"] = "5207";
mDeviceUsbIds["ro.vendor.nv.usb.pid.rndis"] = "5204";
mDeviceUsbIds["ro.vendor.nv.usb.pid.rndis.adb"] = "5205";
mCommonUsbIds["ro.vendor.nv.usb.pid.adb"] = "5208";
mCommonUsbIds["ro.vendor.nv.usb.pid.accessory.adb"] = "2D01";
mCommonUsbIds["ro.vendor.nv.usb.pid.audio_source.adb"] = "2D03";
mCommonUsbIds["ro.vendor.nv.usb.pid.midi"] = "5209";
mCommonUsbIds["ro.vendor.nv.usb.pid.midi.adb"] = "520A";
} else {
mDeviceUsbIds["ro.vendor.nv.usb.pid.mtp"] = "EE02";
mDeviceUsbIds["ro.vendor.nv.usb.pid.mtp.adb"] = "EE03";
......@@ -107,10 +136,14 @@ void vendor_load_properties()
{ "loki", "loki_e_base", "SHIELD Portable", 2530, 131, tegra_init::boot_dev_type::EMMC, 21, 192 },
{ "loki", "loki_e_lte", "SHIELD Portable", 2530, 31, tegra_init::boot_dev_type::EMMC, 21, 240 },
{ "loki", "loki_e_wifi", "SHIELD Portable", 2530, 30, tegra_init::boot_dev_type::EMMC, 21, 240 },
{ "he2290", "he_un_do", "SHIELD Tablet Pro", 2290, 3304, tegra_init::boot_dev_type::EMMC, 23, 320 },
{ "jetson", "jetson_cv", "Jetson TX1", 2597, 2180, tegra_init::boot_dev_type::EMMC, 21, 320 },
{ "jetson", "jetson_e", "Jetson TX1", 2595, 0, tegra_init::boot_dev_type::EMMC, 21, 320 },
{ "porg", "porg_sd", "Jetson Nano", 3448, 0, tegra_init::boot_dev_type::SD, 28, 320 },
{ "porg", "porg", "Jetson Nano", 3448, 2, tegra_init::boot_dev_type::EMMC, 28, 320 } };
{ "porg", "porg", "Jetson Nano", 3448, 2, tegra_init::boot_dev_type::EMMC, 28, 320 },
{ "icosa", "icosa_emmc", "Switch", 20, 1, tegra_init::boot_dev_type::EMMC, 27, 192 },
{ "icosa", "icosa", "Switch", 20, 0, tegra_init::boot_dev_type::SD, 27, 192 },
{ "dragon", "dragon", "Pixel C", 3, 0, tegra_init::boot_dev_type::EMMC, 23, 320 } };
tegra_init::build_version tav = { "9", "PPR1.180610.011", "4199485_1739.5219" };
std::vector<std::string> parts = { "APP", "CAC", "LNX", "SOS", "UDA", "USP", "vendor" };
......@@ -123,6 +156,26 @@ void vendor_load_properties()
ti.property_set("ro.product.vendor.device", "t210");
ti.property_set("ro.product.vendor.model", ti.get_model());
}
} else if (ti.is_model("icosa") || ti.is_model("icosa_emmc")) {
parts.erase(std::remove(parts.begin(), parts.end(), "USP"), parts.end());
} else if (ti.is_model("dragon")) {
tav = { "8.1.0", "OPM8.190605.005", "5749003" };
ti.property_set("ro.product.name", "ryu");
if (ti.recovery_context()) {
std::map<std::string,std::string> dragon_parts;
dragon_parts.emplace("KERN-A", "LNX");
dragon_parts.emplace("recovery", "SOS");
dragon_parts.emplace("VNR", "vendor");
ti.recovery_links(dragon_parts);
parts.erase(std::remove(parts.begin(), parts.end(), "LNX"), parts.end());
parts.erase(std::remove(parts.begin(), parts.end(), "SOS"), parts.end());
parts.erase(std::remove(parts.begin(), parts.end(), "USP"), parts.end());
parts.erase(std::remove(parts.begin(), parts.end(), "vendor"), parts.end());
} else if (ti.vendor_context()) {
ti.property_set("ro.product.vendor.name", "ryu");
}
}
ti.set_properties();
......
......@@ -21,6 +21,13 @@ LOCAL_SRC_FILES := fstab.darcy
LOCAL_VENDOR_MODULE := true
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := fstab.dragon
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := fstab.dragon
LOCAL_VENDOR_MODULE := true
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := fstab.foster
LOCAL_MODULE_CLASS := ETC
......@@ -42,6 +49,27 @@ LOCAL_SRC_FILES := fstab.foster_e_hdd
LOCAL_VENDOR_MODULE := true
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := fstab.he2290
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := fstab.foster_e
LOCAL_VENDOR_MODULE := true
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := fstab.icosa
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := fstab.porg_sd
LOCAL_VENDOR_MODULE := true
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := fstab.icosa_emmc
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := fstab.foster_e
LOCAL_VENDOR_MODULE := true
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := fstab.jetson_e
LOCAL_MODULE_CLASS := ETC
......@@ -106,6 +134,14 @@ LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.dragon.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := init.dragon.rc
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.foster_e.rc
LOCAL_MODULE_CLASS := ETC
......@@ -122,6 +158,38 @@ LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.he2290.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := init.he2290.rc
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.icosa.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := init.icosa.rc
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.icosa_common.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := init.icosa_common.rc
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.icosa_emmc.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := init.icosa_emmc.rc
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.jetson_e.rc
LOCAL_MODULE_CLASS := ETC
......@@ -193,6 +261,13 @@ LOCAL_SRC_FILES := init.recovery.darcy.rc
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.recovery.dragon.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := init.recovery.foster.rc
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.recovery.foster_e.rc
LOCAL_MODULE_CLASS := ETC
......@@ -207,6 +282,27 @@ LOCAL_SRC_FILES := init.recovery.foster.rc
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.recovery.he2290.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := init.recovery.he2290.rc
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.recovery.icosa.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := init.recovery.icosa.rc
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.recovery.icosa_emmc.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := init.recovery.icosa.rc
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.recovery.jetson_cv.rc
LOCAL_MODULE_CLASS := ETC
......@@ -301,6 +397,13 @@ LOCAL_ODM_MODULE := true
LOCAL_SRC_FILES := power.darcy.rc
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := power.dragon.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_ODM_MODULE := true
LOCAL_SRC_FILES := power.abca.rc
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := power.foster_e.rc
LOCAL_MODULE_CLASS := ETC
......@@ -315,6 +418,27 @@ LOCAL_ODM_MODULE := true
LOCAL_SRC_FILES := power.foster_e_common.rc
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := power.he2290.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_ODM_MODULE := true
LOCAL_SRC_FILES := power.he2290.rc
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := power.icosa.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_ODM_MODULE := true
LOCAL_SRC_FILES := power.abca.rc
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := power.icosa_emmc.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_ODM_MODULE := true
LOCAL_SRC_FILES := power.abca.rc
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := power.jetson_cv.rc
LOCAL_MODULE_CLASS := ETC
......@@ -370,3 +494,11 @@ LOCAL_MODULE_CLASS := ETC
LOCAL_ODM_MODULE := true
LOCAL_SRC_FILES := power.darcy.rc
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := lkm_loader
LOCAL_SRC_FILES := lkm_loader.sh
LOCAL_MODULE_SUFFIX := .sh
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_VENDOR_MODULE := true
include $(BUILD_PREBUILT)
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/block/platform/sdhci-tegra.3/by-name/APP / ext4 ro,noatime wait
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 noatime,nosuid,nodev,data=ordered,barrier=1,nodelalloc wait,formattable
/dev/block/platform/sdhci-tegra.3/by-name/KERN-A /boot emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/MSC /misc emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 noatime,nosuid,nodev,data=ordered,barrier=0,noauto_da_alloc wait,check,formattable,encryptable=/dev/block/platform/sdhci-tegra.3/by-name/MD1,quota,reservedsize=128M
/dev/block/platform/sdhci-tegra.3/by-name/MD1 /metadata emmc defaults defaults
/dev/block/platform/sdhci-tegra.3/by-name/recovery /recovery emmc defaults defaults
/devices/70090000.xusb/usb* auto vfat defaults voldmanaged=usbdrive:auto,encryptable=userdata
/dev/block/platform/70090000.xusb/by-num/p1 /usbdrive vfat defaults recoveryonly
/dev/block/zram0 none swap defaults zramsize=536870912
# Copyright (C) 2020 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.
import /vendor/etc/init/hw/init.tegra.rc
import /vendor/etc/init/hw/init.t210.rc
import /vendor/etc/init/hw/init.loki_e_common.rc
on fs
mount_all /vendor/etc/fstab.dragon
swapon_all /vendor/etc/fstab.dragon
......@@ -12,13 +12,6 @@ on boot
write /sys/devices/system/cpu/cpuquiet/runnable_threads/nr_run_thresholds "6 10 18"
write /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable 0
# CPU and GPU governor scaling settings
write /sys/devices/system/cpu/cpufreq/schedutil/up_rate_limit_us 0
write /sys/devices/system/cpu/cpufreq/schedutil/down_rate_limit_us 2000
write /sys/devices/system/cpu/cpufreq/schedutil/capacity_margin 256
write /sys/devices/57000000.gpu/submit_boost_freq 691200
write /sys/devices/57000000.gpu/submit_boost_time 500
# Lower console loglevel to reduce number of printk messages to console
write /proc/sys/kernel/printk "4 7 1 7 3"
......@@ -27,10 +20,6 @@ on boot && property:ro.build.type=user
setprop vendor.debug.enable_console_logs false
write /dev/kmsg "Disabling kernel console prints. Prints can be enabled via the developer menu"
on fs
# Assuming system takes 1GB runtime RAM, dedeuct it from GPU comptag memory allocation
write /sys/devices/57000000.gpu/comptag_mem_deduct 1024
on post-fs-data
# Set Foster as console mode
setprop persist.vendor.tegra.composite.range Auto
......@@ -63,44 +52,6 @@ on property:vendor.debug.enable_console_logs=true && property:ro.build.type=user
on property:vendor.debug.enable_console_logs=false && property:ro.build.type=user
write /proc/sys/kernel/printk "1 7 1 7 3"
# override cpuset cpus to 0-3, mems to 0
on init
write /dev/cpuset/foreground/cpus 0-3
write /dev/cpuset/foreground/mems 0
write /dev/cpuset/foreground/boost/cpus 0-3
write /dev/cpuset/foreground/boost/mems 0
write /dev/cpuset/background/cpus 0-3
write /dev/cpuset/background/mems 0
write /dev/cpuset/system-background/cpus 0-3
write /dev/cpuset/system-background/mems 0
write /dev/cpuset/top-app/cpus 0-3
write /dev/cpuset/top-app/mems 0
# ZRAM setup
write /sys/block/zram0/comp_algorithm lz4
write /proc/sys/vm/page-cluster 0
# KSM setup
write /sys/kernel/mm/ksm/sleep_millisecs 250
write /sys/kernel/mm/ksm/pages_to_scan 100
write /sys/kernel/mm/ksm/run 1
service mossignerd /vendor/bin/mossignerd
class late_start
user system
on early-init
# Disable Transparent HUGEPAGE
write /sys/kernel/mm/transparent_hugepage/enabled "never"
# LMK tunables
on property:sys.boot_completed=1
chown system system /sys/module/lowmemorykiller/parameters/minfree
write /sys/module/lowmemorykiller/parameters/minfree 18432,23040,27648,80640,100000,124000
chown system system /sys/module/lowmemorykiller/parameters/adj
write /sys/module/lowmemorykiller/parameters/adj 0,100,200,300,600,800
# Free Memory tunables
on property:sys.boot_completed=1
write /proc/sys/vm/extra_free_kbytes 0
write /proc/sys/vm/min_free_kbytes 16384
#Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
#
#NVIDIA Corporation and its licensors retain all intellectual property and
#proprietary rights in and to this software and related documentation. Any
#use, reproduction, disclosure or distribution of this software and related
#documentation without an express license agreement from NVIDIA Corporation
#is strictly prohibited.
import /vendor/etc/init/hw/init.tegra_emmc.rc
import /vendor/etc/init/hw/init.t210.rc
import /vendor/etc/init/hw/init.loki_e_common.rc
import /vendor/etc/init/hw/init.sharp_touch.rc
on init
setprop ro.feature.stylus 1
setprop ro.feature.quickmenu 1
setprop persist.tegra.cursor.enable 1
setprop sf.async.cursor.enable 1
setprop input.gaming_mode_enabled 1
setprop input.tch_blk.enabled 1
setprop input.tch_blk.ext_for_ptrs 1
setprop input.tch_blk.timeout_ms 500
setprop input.tch_prs.ebc 0.9
setprop input.tch_blk.edgeremap_left 10
setprop input.tch_blk.edgeremap_top 5
setprop input.tch_blk.edgeremap_right 15
setprop input.tch_blk.edgeremap_bottom 5
setprop input.ptr_trk.toolswitch_time 400
setprop input.ptr_trk.toolswitch_range 200
setprop input.ptr_trk.eraserlatch_range 10
setprop input.ptr_trk.eraserdelay_time 250
setprop input.ptr_trk.pinchtozoom_time 1000
setprop input.ptr_trk.pinchtozoom_range 1100
setprop input.ptr_trk.pinchtozoom_rectX 800
setprop input.ptr_trk.pinchtozoom_rectY 1400
setprop input.ptr_trk.pinchtozoom_cenX 600
setprop input.ptr_trk.pinchtozoom_cenY 960
setprop input.nonwhitelistedmode 3
setprop input.quick_menu_enabled 1
setprop input.quick_menu_sound_enabled 1
setprop sys.esrd.powermon_path /sys/bus/i2c/devices/1-0040/iio_device
setprop sys.esrd.powermon_channel 0
setprop sys.esrd.min_esr 95
setprop sys.esrd.max_esr 160
setprop sys.esrd.margin 35
setprop sys.esrd.nwindow 200
setprop sys.esrd.ntry 600
setprop sys.esrd.tsample 20
setprop sys.esrd.delay_start 900
setprop sys.esrd.delay_retry 900
setprop sys.esrd.delay_ok 604800
setprop sys.esrd.needed_coeff 0.97
setprop sys.esrd.needed_var 300
setprop sys.esrd.battery_thresh_high 60
setprop sys.esrd.battery_thresh_low 15
setprop sys.esrd.load_burst_duration 3
setprop sys.esrd.check_screen_off 1
setprop persist.tegra.didim.enable 0
chown system system /sys/power/sysedp/batmon/esr
chown system system /sys/bus/i2c/devices/1-0040/iio_device/running_mode
chmod 0664 /sys/bus/i2c/devices/1-0040/iio_device/running_mode
chown system system /sys/bus/i2c/devices/1-0040/iio_device/warn_current_limit_0
chown system audio /sys/devices/platform/sound.17/dmicinput
chmod 0664 /sys/devices/platform/sound.17/dmicinput
on fs
setprop ro.gps.gpio 66
setprop ro.gpsstatus.changed true
mount_all /fstab.he2290
swapon_all /fstab.he2290
on post-fs-data
write /sys/class/gpio/export 66
write /sys/class/gpio/gpio66/direction out
write /sys/class/gpio/gpio66/value 0
chown root system /sys/class/gpio/gpio66/value
chmod 0664 /sys/class/gpio/gpio66/value
setprop persist.gps.present false
on property:persist.gps.present=true
symlink /system/etc/android.hardware.location.gps.xml /data/android.hardware.location.gps.xml
start start-gps
on property:persist.gps.present=false
rm /data/android.hardware.location.gps.xml
# Copyright (C) 2020 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.
import /vendor/etc/init/hw/init.icosa_common.rc
on fs
mount_all /vendor/etc/fstab.icosa
swapon_all /vendor/etc/fstab.icosa
# 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.
import /vendor/etc/init/hw/init.tegra.rc
import /vendor/etc/init/hw/init.t210.rc
import /vendor/etc/init/hw/init.loki_e_common.rc
on init
setprop ro.surface_flinger.primary_display_orientation 270
on post-fs
write /sys/bus/platform/drivers/tegra-reboot2payload/r2p/default_payload_ready 1
stop watchdogd
# Copyright (C) 2020 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.
import /vendor/etc/init/hw/init.icosa_common.rc
on fs
mount_all /vendor/etc/fstab.icosa_emmc
swapon_all /vendor/etc/fstab.icosa_emmc
......@@ -8,19 +8,6 @@
import /vendor/etc/init/hw/init.loki_foster_e_common.rc
# override cpuset cpus to 0-3, mems to 0
on init
write /dev/cpuset/foreground/cpus 0-3
write /dev/cpuset/foreground/mems 0
write /dev/cpuset/foreground/boost/cpus 0-3
write /dev/cpuset/foreground/boost/mems 0
write /dev/cpuset/background/cpus 0-3
write /dev/cpuset/background/mems 0
write /dev/cpuset/system-background/cpus 0-3
write /dev/cpuset/system-background/mems 0
write /dev/cpuset/top-app/cpus 0-3
write /dev/cpuset/top-app/mems 0
service charger /charger
class charger
seclabel u:r:healthd:s0
......
......@@ -10,6 +10,9 @@
import /vendor/etc/init/hw/init.lkm.rc
on fs
# Assuming system takes 1GB runtime RAM, dedeuct it from GPU comptag memory allocation
write /sys/devices/57000000.gpu/comptag_mem_deduct 1024
setprop ro.wifi.sdmmc 1
setprop persist.vendor.sys.dpy0.prism 0
setprop camera.disable_zsl_mode 1
......@@ -54,6 +57,13 @@ on post-fs-data
chmod 0444 /sys/devices/platform/tegra-fuse/aid
on boot
# CPU and GPU governor scaling settings
write /sys/devices/system/cpu/cpufreq/schedutil/up_rate_limit_us 0
write /sys/devices/system/cpu/cpufreq/schedutil/down_rate_limit_us 2000
write /sys/devices/system/cpu/cpufreq/schedutil/capacity_margin 256
write /sys/devices/57000000.gpu/submit_boost_freq 691200
write /sys/devices/57000000.gpu/submit_boost_time 500
# start Loadable Kernel Module service
start vendor.lkm_loader
......@@ -75,4 +85,39 @@ on property:init.svc.vendor.lkm_loader=stopped
chown system system /sys/bus/hid/drivers/Jarvis/ts_joystick_stats
on init
write /dev/cpuset/foreground/cpus 0-3
write /dev/cpuset/foreground/mems 0
write /dev/cpuset/foreground/boost/cpus 0-3
write /dev/cpuset/foreground/boost/mems 0
write /dev/cpuset/background/cpus 0-3
write /dev/cpuset/background/mems 0
write /dev/cpuset/system-background/cpus 0-3
write /dev/cpuset/system-background/mems 0
write /dev/cpuset/top-app/cpus 0-3
write /dev/cpuset/top-app/mems 0
# ZRAM setup
write /sys/block/zram0/comp_algorithm lz4
write /proc/sys/vm/page-cluster 0
# KSM setup
write /sys/kernel/mm/ksm/sleep_millisecs 250
write /sys/kernel/mm/ksm/pages_to_scan 100
write /sys/kernel/mm/ksm/run 1
setprop ro.hardware.gatekeeper tlk.tegra
on early-init
# Disable Transparent HUGEPAGE
write /sys/kernel/mm/transparent_hugepage/enabled "never"
# LMK tunables
on property:sys.boot_completed=1
chown system system /sys/module/lowmemorykiller/parameters/minfree
write /sys/module/lowmemorykiller/parameters/minfree 18432,23040,27648,80640,100000,124000
chown system system /sys/module/lowmemorykiller/parameters/adj
write /sys/module/lowmemorykiller/parameters/adj 0,100,200,300,600,800
# Free Memory tunables
write /proc/sys/vm/extra_free_kbytes 0
write /proc/sys/vm/min_free_kbytes 16384
# Copyright (C) 2020 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.
import init.recovery.sharp_touch.rc
import init.recovery.foster_common.rc
on post-fs
# touchscreen
mkdir /mnt/vendor/factory
mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/FCT /mnt/vendor/factory rw noatime
restorecon_recursive /mnt/vendor/factory
# 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.
import init.recovery.foster_common.rc
on init
setprop persist.twrp.rotation 270
write /sys/bus/platform/drivers/tegra-reboot2payload/r2p/default_payload_ready 1
This diff is collapsed.
# FORMAT:
# panelresolution=[xres]X[yres], such as panelresolution=1280X720
# powernode1 maxperf optimized maxbatterylife
# powernode2 maxperf optimized maxbatterylife
# ......
# powernoden maxperf optimized maxbatterylife
# panelresolution=[xres]X[yres], such as panelresolution=1920X1080
# powernode1 maxperf optimized maxbatterylife
# powernode2 maxperf optimized maxbatterylife
# ......
# powernoden maxperf optimized maxbatterylife
# ......
# ......
# panelresolution=[xres]X[yres], such as panelresolution=1920X1200
# powernode1 maxperf optimized maxbatterylife
# powernode2 maxperf optimized maxbatterylife
# ......
# powernoden maxperf optimized maxbatterylife
#
# NOTES:
# The panelresolution is the lcd panel resolution.
# No space should exist in panelresolution=[xres]X[yres].
# panelresolution=720X1280 equals with panelresolution=1280X720.
# For panelresolution=-1X-1, it should be the last set of power settings in this file.
# When your panel resolution is found in this file,
# it will use the set of power settings followed by your panel resolution.
# When your panel resolution is not found in this file, it will use the default power settings.
# The power settings followed by panelresolution=-1X-1 is the default power settings.
# powernode is the sysfs or variable we need to write and it is followed by three ints.
# maxperf, optimized, maxbatterylife are the three ints for different power modes.
#
# Default power mode: can be set to 0, 1, or 2
NV_DEFAULT_MODE 1
panelresolution=1900X1200
NV_FPSLIMIT 0 0 0
NV_MAX_CORES 0 0 0
NV_MIN_CORES 2 2 2
NV_MAX_FREQ 0 0 0
NV_MIN_FREQ 900000 0 0
NV_MAX_GPU_FREQ 0 0 0
NV_MIN_GPU_FREQ 0 0 0
NV_HYPERVOLT_ALPHA 50 0 0
NV_APM_CPU_BOOST 5 0 0
NV_APM_GPU_BOOST 5 0 0
NV_APM_FRT_BOOST 5 0 0
NV_APM_PRETHROTTLE 0 1 1
NV_APM_FRT_MIN 20 15 15
NV_APM_LOADAPPFRT 0 1 1
NV_PBC_SYSPOWER_CAP 15000 11000 8500
NV_PBC_BATCURRENT_CAP 5000 5000 4100
NV_FAN_STATE_CAP 7 3 2
NV_FAN_STATE_MAP 80/110/150/200/255 80/110/150/200/255 80/110/150/200/255
NV_ECO_MAX_FREQ 1400000 1400000 1400000
NV_ECO_MAX_GPU_FREQ 700000 700000 700000
NV_ECO_PBC_LIMIT 8500 8500 8500
NV_ECO_THRESHOLD 10 10 10
NV_ECO_THRESHYST 5 5 5
/sys/devices/platform/host1x/tegradc.0/smartdimmer/aggressiveness 27 27 29
panelresolution=2500X1600
NV_FPSLIMIT 0 0 0
NV_MAX_CORES 0 0 0
NV_MIN_CORES 2 2 2
NV_MAX_FREQ 0 0 0
NV_MIN_FREQ 900000 0 0
NV_MAX_GPU_FREQ 0 0 0
NV_MIN_GPU_FREQ 0 0 0
NV_HYPERVOLT_ALPHA 50 0 0
NV_APM_CPU_BOOST 5 0 0
NV_APM_GPU_BOOST 5 0 0
NV_APM_FRT_BOOST 5 0 0
NV_APM_PRETHROTTLE 0 1 1
NV_APM_FRT_MIN 20 15 15
NV_APM_LOADAPPFRT 0 1 1
NV_PBC_SYSPOWER_CAP 15000 11000 8500
NV_PBC_BATCURRENT_CAP 5000 5000 4100
NV_FAN_STATE_CAP 7 3 2
NV_FAN_STATE_MAP 80/110/150/200/255 80/110/150/200/255 80/110/150/200/255
NV_ECO_MAX_FREQ 1400000 1400000 1400000
NV_ECO_MAX_GPU_FREQ 700000 700000 700000
NV_ECO_PBC_LIMIT 8500 8500 8500
NV_ECO_THRESHOLD 10 10 10
NV_ECO_THRESHYST 5 5 5
/sys/devices/platform/host1x/tegradc.0/smartdimmer/aggressiveness 27 27 29
panelresolution=-1X-1
NV_FPSLIMIT 0 0 0
NV_MAX_CORES 0 0 0
NV_MIN_CORES 2 2 2
NV_MAX_FREQ 0 0 0
NV_MIN_FREQ 900000 0 0
NV_MAX_GPU_FREQ 0 0 0
NV_MIN_GPU_FREQ 0 0 0
NV_HYPERVOLT_ALPHA 50 0 0
NV_APM_CPU_BOOST 5 0 0
NV_APM_GPU_BOOST 5 0 0
NV_APM_FRT_BOOST 5 0 0
NV_APM_PRETHROTTLE 0 1 1
NV_APM_FRT_MIN 20 15 15
NV_APM_LOADAPPFRT 0 1 1
NV_PBC_SYSPOWER_CAP 15000 11000 8500
NV_PBC_BATCURRENT_CAP 5000 5000 4100
NV_FAN_STATE_CAP 7 3 2
NV_FAN_STATE_MAP 80/110/150/200/255 80/110/150/200/255 80/110/150/200/255
NV_ECO_MAX_FREQ 1400000 1400000 1400000
NV_ECO_MAX_GPU_FREQ 700000 700000 700000
NV_ECO_PBC_LIMIT 8500 8500 8500
NV_ECO_THRESHOLD 10 10 10
NV_ECO_THRESHYST 5 5 5
/sys/devices/platform/host1x/tegradc.0/smartdimmer/aggressiveness 27 27 29
# FORMAT:
# panelresolution=[xres]X[yres], such as panelresolution=1280X720
# powernode1 maxperf optimized maxbatterylife
# powernode2 maxperf optimized maxbatterylife
# ......
# powernoden maxperf optimized maxbatterylife
# panelresolution=[xres]X[yres], such as panelresolution=1920X1080
# powernode1 maxperf optimized maxbatterylife
# powernode2 maxperf optimized maxbatterylife
# ......
# powernoden maxperf optimized maxbatterylife
# ......
# ......
# panelresolution=[xres]X[yres], such as panelresolution=1920X1200
# powernode1 maxperf optimized maxbatterylife
# powernode2 maxperf optimized maxbatterylife
# ......
# powernoden maxperf optimized maxbatterylife
#
# NOTES:
# The panelresolution is the lcd panel resolution.
# No space should exist in panelresolution=[xres]X[yres].
# panelresolution=720X1280 equals with panelresolution=1280X720.
# For panelresolution=-1X-1, it should be the last set of power settings in this file.
# When your panel resolution is found in this file,
# it will use the set of power settings followed by your panel resolution.
# When your panel resolution is not found in this file, it will use the default power settings.
# The power settings followed by panelresolution=-1X-1 is the default power settings.
# powernode is the sysfs or variable we need to write and it is followed by three ints.
# maxperf, optimized, maxbatterylife are the three ints for different power modes.
#
# Default power mode: can be set to 0, 1, or 2
NV_DEFAULT_MODE 1
panelresolution=1920X1200
NV_FPSLIMIT 0 0 0
NV_MAX_CORES 4 0 2
NV_MIN_CORES 4 0 0
NV_DISPOFF_CORES 0 0 0
NV_MAX_FREQ 0 0 1400000
NV_MIN_FREQ 800000 800000 800000
NV_MAX_GPU_FREQ 0 0 380000
NV_MIN_GPU_FREQ FmaxAtVmin FmaxAtVmin FmaxAtVmin
NV_TSKIN_SETPOINT 50000 45000 45000
NV_APM_CPU_BOOST 5 0 0
NV_APM_GPU_BOOST 5 0 0
NV_APM_FRT_BOOST 5 0 0
NV_APM_FRT_MIN 20 15 15
NV_APM_LOADAPPFRT 0 0 0
# Here the SYSPOWER CAPS are not actual thermal budgets.
# They are dummy values inserted to make sure PBC does
# not throttle for SYSTEM_POWER values
NV_PBC_SYSPOWER_CAP 30000 29999 29999
NV_PBC_BATCURRENT_CAP 5200 5200 5200
NV_ECO_MAX_FREQ 1400000 1400000 1400000
NV_ECO_MAX_GPU_FREQ 700000 700000 700000
NV_ECO_THRESHOLD 0 0 0
NV_ECO_THRESHYST 5 5 5
NV_ECO_CPU_CORE_CAP 2 2 2
/sys/devices/platform/host1x/tegradc.0/smartdimmer/aggressiveness 27 27 29