...
 
Commits (6)
......@@ -72,3 +72,9 @@ $(INSTALLED_RECOVERYIMAGE_r8168-ko): $(INSTALLED_KERNEL_TARGET)
cp $(TARGET_OUT_VENDOR)/lib/modules/r8168.ko $@
$(INSTALLED_RECOVERYIMAGE_TARGET): $(INSTALLED_RECOVERYIMAGE_r8168-ko)
EKS_DAT_SYMLINK := $(TARGET_OUT_VENDOR)/app/eks2/eks2.dat
$(EKS_DAT_SYMLINK): $(LOCAL_INSTALLED_MODULE)
$(hide) ln -sf /data/vendor/eks2/ek2.dat $@
ALL_DEFAULT_INSTALLED_MODULES += $(EKS_DAT_SYMLINK)
......@@ -20,10 +20,12 @@ 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)
......@@ -54,6 +56,10 @@ PRODUCT_VENDOR_PROPERTY_BLACKLIST := \
ro.product.vendor.name \
ro.vendor.build.fingerprint
# Overlays
DEVICE_PACKAGE_OVERLAYS += \
device/nvidia/foster/overlay
# Init related
PRODUCT_PACKAGES += \
init_tegra \
......@@ -154,6 +160,17 @@ PRODUCT_PACKAGES += \
charger \
charger_res_images
# EKS
ifeq ($(TARGET_TEGRA_KEYSTORE),nvkeystore)
PRODUCT_PACKAGES += \
init.eks2.rc \
eks2_darcy.dat \
eks2_foster.dat \
eks2_mdarcy.dat \
eks2_public.dat \
eks2_sif.dat
endif
# Joycon daemon
PRODUCT_PACKAGES += \
joycond
......
#
# 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)
//
// 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",
],
}
......@@ -502,3 +502,11 @@ LOCAL_MODULE_SUFFIX := .sh
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_VENDOR_MODULE := true
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.eks2.rc
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := init.eks2.rc
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := init
include $(BUILD_PREBUILT)
#
# Copyright (C) 2019 The LineageOS Project
# 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.
......@@ -12,20 +11,22 @@
# 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)
on property:vold.post_fs_data_done=1
mkdir /data/vendor/eks2 0755 system system
on property:vold.post_fs_data_done=1 && property:ro.hardware=darcy
symlink /vendor/app/eks2/eks2_darcy.dat /data/vendor/eks2/eks2.dat
on property:vold.post_fs_data_done=1 && property:ro.hardware=foster_e
symlink /vendor/app/eks2/eks2_foster.dat /data/vendor/eks2/eks2.dat
on property:vold.post_fs_data_done=1 && property:ro.hardware=foster_e_hdd
symlink /vendor/app/eks2/eks2_foster.dat /data/vendor/eks2/eks2.dat
include $(CLEAR_VARS)
LOCAL_MODULE := libinit_foster
LOCAL_C_INCLUDES := device/nvidia/tegra-common/init
LOCAL_SRC_FILES := init_foster.cpp
LOCAL_WHOLE_STATIC_LIBRARIES := libinit_tegra
include $(BUILD_STATIC_LIBRARY)
on property:vold.post_fs_data_done=1 && property:ro.hardware=sif
symlink /vendor/app/eks2/eks2_sif.dat /data/vendor/eks2/eks2.dat
include $(CLEAR_VARS)
LOCAL_MODULE := libinit_foster_vendor
LOCAL_C_INCLUDES := device/nvidia/tegra-common/init
LOCAL_SRC_FILES := init_foster.cpp
LOCAL_VENDOR_MODULE := true
include $(BUILD_STATIC_LIBRARY)
# Default if none of the others trigger
on property:vold.post_fs_data_done=1
symlink /vendor/app/eks2/eks2_public.dat /data/vendor/eks2/eks2.dat
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2009, 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.
*/
-->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<resources>
<!-- This string array should be overridden by the device to present a list of network
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
<!-- An Array of "[Connection name],[ConnectivityManager connection type],
[associated radio-type],[priority] -->
<string-array translatable="false" name="networkAttributes">
<item>"wifi,1,1,2,-1,true"</item>
<item>"mobile,0,0,0,-1,true"</item>
<item>"mobile_mms,2,0,4,60000,true"</item>
<item>"mobile_supl,3,0,4,60000,true"</item>
<item>"mobile_dun,4,0,4,60000,true"</item>
<item>"bluetooth,7,7,1,-1,true"</item>
<item>"mobile_hipri,5,0,5,60000,true"</item>
<item>"ethernet,9,9,3,-1,true"</item>
</string-array>
<!-- This array should be overridden by the device to present a list of radio
attributes. This is used by the connectivity manager to decide which networks
can coexist based on the hardware. -->
<!-- An array of "[ConnectivityManager connectionType],
[# simultaneous connection types]" -->
<string-array translatable="false" name="radioAttributes">
<item>"1,1"</item>
<item>"0,1"</item>
<item>"7,1"</item>
<item>"9,0"</item>
</string-array>
<!-- List of regexpressions describing the interface (if any) that represent tetherable
USB interfaces. If the device doesn't want to support tething over USB this should
be empty. An example would be "usb.*" -->
<string-array translatable="false" name="config_tether_usb_regexs">
<item>"rndis0"</item>
</string-array>
<!-- List of regexpressions describing the interface (if any) that represent tetherable
Wifi interfaces. If the device doesn't want to support tethering over Wifi this
should be empty. An example would be "softap.*" -->
<string-array translatable="false" name="config_tether_wifi_regexs">
<item>"wlan0"</item>
</string-array>
<!-- List of regexpressions describing the interface (if any) that represent tetherable
Bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
should be empty. -->
<string-array translatable="false" name="config_tether_bluetooth_regexs">
<item>"bt-pan"</item>
</string-array>
<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<bool name="config_automatic_brightness_available">true</bool>
<!-- Indicate whether closing the lid causes the device to go to sleep and opening
it causes the device to wake up.
The default is false. -->
<bool name="config_lidControlsSleep">true</bool>
<!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
The N entries of this array define N 1 zones as follows:
Zone 0: 0 <= LUX < array[0]
Zone 1: array[0] <= LUX < array[1]
...
Zone N: array[N - 1] <= LUX < array[N]
Zone N + 1 array[N] <= LUX < infinity
Must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLevels">
<item>10</item>
<item>160</item>
<item>320</item>
<item>640</item>
<item>1280</item>
</integer-array>
<!-- Array of output values for LCD backlight corresponding to the LUX values
in the config_autoBrightnessLevels array. This array should have size one greater
than the size of the config_autoBrightnessLevels array.
This must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>30</item>
<item>100</item>
<item>130</item>
<item>170</item>
<item>200</item>
<item>250</item>
</integer-array>
<!-- Array of output values for button backlight corresponding to the LUX values
in the config_autoBrightnessLevels array. This array should have size one greater
than the size of the config_autoBrightnessLevels array.
This must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessButtonBacklightValues">
<item>75</item>
<item>90</item>
<item>140</item>
<item>190</item>
<item>240</item>
<item>250</item>
<item>255</item>
</integer-array>
<!-- Array of output values for keyboard backlight corresponding to the LUX values
in the config_autoBrightnessLevels array. This array should have size one greater
than the size of the config_autoBrightnessLevels array.
This must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessKeyboardBacklightValues">
<item>75</item>
<item>60</item>
<item>40</item>
<item>20</item>
<item>10</item>
<item>5</item>
<item>0</item>
</integer-array>
<!-- If this is true, the screen will come on when you unplug usb/power/whatever. -->
<bool name="config_unplugTurnsOnScreen">true</bool>
<!-- Enable electronBeam animation instead of fading off. -->
<bool name="config_animateScreenLights">false</bool>
<!-- Boolean indicating whether the wifi chipset supports background scanning mechanism.
This mechanism allows the host to remain in suspend state and the dongle to actively
scan and wake the host when a configured SSID is detected by the dongle. This chipset
capability can provide power savings when wifi needs to be always kept on.
The driver commands needed to support the feature are BGSCAN-START and BGSCAN-STOP -->
<bool name="config_wifi_background_scan_support">true</bool>
<!-- Wifi driver supports batched scan -->
<bool translatable="false" name="config_wifi_batched_scan_supported">false</bool>
<!-- Integer indicating wpa_supplicant scan interval when p2p is connected in milliseconds -->
<integer translatable="false" name="config_wifi_scan_interval_p2p_connected">15000</integer>
<!-- Maximum number of supported users -->
<integer name="config_multiuserMaximumUsers">8</integer>
<!-- Whether UI for multi user should be shown -->
<bool name="config_enableMultiUserUI">true</bool>
<!-- Is the device capable of hot swapping an UICC Card -->
<add-resource type="bool" name="config_hotswapCapable"/>
<bool name="config_hotswapCapable">true</bool>
<!-- MMS user agent string -->
<add-resource type="string" name="config_mms_user_agent"/>
<string name="config_mms_user_agent" translatable="false">Shield Tablet Pro</string>
<!-- MMS user agent prolfile url -->
<add-resource type="string" name="config_mms_user_agent_profile_url"/>
<string name="config_mms_user_agent_profile_url" translatable="false">http://www.nvidia.com</string>
<!-- Shutdown if the battery temperature exceeds (this value * 0.1) Celsius. -->
<integer name="config_shutdownBatteryTemperature">600</integer>
<!-- Configure mobile tcp buffer sizes in the form:
rat-name:rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max
If no value is found for the rat-name in use, the system default will be applied.
-->
<add-resource type="array" name="config_mobile_tcp_buffers"/>
<string-array name="config_mobile_tcp_buffers">
<item>gprs:4092,8760,48000,4096,8760,48000</item>
<item>edge:4093,26280,70800,4096,16384,70800</item>
<item>umts:4094,87380,1220608,4096,16384,1220608</item>
<item>hsdpa:4094,87380,1220608,4096,16384,1220608</item>
<item>hsupa:4094,87380,1220608,4096,16384,1220608</item>
<item>hspa:4094,87380,1220608,4096,16384,1220608</item>
<item>hspap:4094,87380,1220608,4096,16384,1220608</item>
<item>lte:524288,1048576,2097152,262144,524288,1048576</item>
</string-array>
<!-- Boolean indicating whether the wifi chipset has dual frequency band support -->
<bool translatable="false" name="config_wifi_dual_band_support">true</bool>
<!-- Boolean indicating associated network selection is allowed -->
<bool translatable="false" name="config_wifi_framework_enable_associated_network_selection">false</bool>
<!-- Use proper headphone jack detection -->
<bool name="config_useDevInputEventForAudioJack">true</bool>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<!--
**
** Copyright 2010, 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.
*/
-->
<device name="Android">
<!-- All values are in mA except as noted -->
<item name="none">0</item>
<item name="screen.on">202.25</item>
<item name="screen.full">252</item>
<item name="bluetooth.active">5</item>
<!--
Bluetooth stereo audio playback 14.0 mA
-->
<item name="bluetooth.on">5</item>
<!--
I measured the following value 1.4 mA
but there is a GPIO fix pending that should
bring this down to 0.2 mA
-->
<item name="wifi.on">30</item>
<item name="wifi.active">95.5</item>
<item name="wifi.scan">95.5</item>
<item name="dsp.audio">85</item>
<item name="dsp.video">256</item>
<item name="gps.on">58.8</item>
<item name="radio.active">0</item>
<item name="radio.scanning">0</item>
<array name="radio.on"> <!-- Strength 0 to BINS-1 (4) -->
<value>0</value>
</array>
<!-- Different CPU speeds as reported in
/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state -->
<array name="cpu.speeds">
<value>51000</value>
<value>102000</value>
<value>204000</value>
<value>304000</value>
<value>433898</value>
<value>613195</value>
<value>792492</value>
<value>817593</value>
<value>918000</value>
<value>1020000</value>
<value>1122000</value>
<value>1224000</value>
<value>1326000</value>
<value>1428000</value>
<value>1530000</value>
<value>1606500</value>
<value>1708500</value>
<value>1810500</value>
<value>1912500</value>
</array>
<!-- Power consumption when CPU is idle -->
<item name="cpu.idle">0</item>
<item name="cpu.awake">0.5</item>
<!-- Power consumption at different speeds -->
<array name="cpu.active">
<value>4</value>
<value>8</value>
<value>15</value>
<value>22.5</value>
<value>67.25</value>
<value>90.25</value>
<value>122.75</value>
<value>125.25</value>
<value>137.75</value>
<value>216</value>
<value>237.75</value>
<value>265</value>
<value>430.75</value>
<value>471</value>
<value>507.5</value>
<value>531.75</value>
<value>576.75</value>
<value>630.25</value>
<value>689</value>
</array>
<!-- This is the battery capacity in mAh -->
<item name="battery.capacity">6750</item>
<!--
Battery capacity is 6750 mAH (at 4 Volts)
-->
</device>
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright (c) 2009, 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.
*/
-->
<resources>
<!-- Auto brightness mode is ON by default-->
<bool name="def_screen_brightness_automatic_mode">true</bool>
</resources>
<resources>
<bool name="profile_supported_map">false</bool>
<bool name="profile_supported_hdp">false</bool>
<bool name="profile_supported_hs_hfp">false</bool>
<bool name="profile_supported_pan">false</bool>
<bool name="profile_supported_opp">false</bool>
<bool name="profile_supported_pbap">false</bool>
<bool name="profile_supported_avrcp_controller">false</bool>
</resources>
......@@ -21,8 +21,18 @@ import os
TARGET_DIR = os.getenv('OUT')
STAGING_PART = '/dev/block/USP'
APP_PART = '/dev/block/APP'
VENDOR_PART = '/dev/block/vendor'
ICOSA_SD = '/external_sd/switchroot/android/'
def FullOTA_PostValidate(info):
info.script.AppendExtra('run_program("/sbin/e2fsck", "-fy", "' + APP_PART + '");');
info.script.AppendExtra('run_program("/sbin/e2fsck", "-fy", "' + VENDOR_PART + '");');
info.script.AppendExtra('run_program("/sbin/resize2fs", "' + APP_PART + '");');
info.script.AppendExtra('run_program("/sbin/resize2fs", "' + VENDOR_PART + '");');
info.script.AppendExtra('run_program("/sbin/e2fsck", "-fy", "' + APP_PART + '");');
info.script.AppendExtra('run_program("/sbin/e2fsck", "-fy", "' + VENDOR_PART + '");');
def FullOTA_Assertions(info):
if 'RADIO/foster_e.blob' in info.input_zip.namelist():
CopyBlobs(info.input_zip, info.output_zip)
......