summaryrefslogtreecommitdiff
path: root/rootdir
diff options
context:
space:
mode:
authorDavide Garberi <dade.garberi@gmail.com>2019-09-14 12:48:48 +0200
committerMichael Bestas <mkbestas@lineageos.org>2020-04-30 00:48:53 +0300
commit5935e5dcaeaf18ef5100c74dce194450fc293126 (patch)
treea9a8e832f7ae7764468769a45e9db53d42a6c72f /rootdir
parent1643c02b301b880592b67ed06c34a15cceeb5531 (diff)
sdm660-common: Checkout rootdir to LA.UM.7.2.r1-07500-sdm660.0
Change-Id: Id8bf30d72e8a513f09d654c91ccdf22cd4182b2d
Diffstat (limited to 'rootdir')
-rw-r--r--[-rwxr-xr-x]rootdir/bin/init.class_main.sh62
-rw-r--r--[-rwxr-xr-x]rootdir/bin/init.qcom.post_boot.sh617
-rw-r--r--[-rwxr-xr-x]rootdir/bin/init.qcom.sensors.sh5
-rw-r--r--[-rwxr-xr-x]rootdir/bin/init.qcom.sh29
-rw-r--r--[-rwxr-xr-x]rootdir/bin/init.qcom.usb.sh131
-rw-r--r--[-rwxr-xr-x]rootdir/etc/init.msm.usb.configfs.rc88
-rw-r--r--[-rwxr-xr-x]rootdir/etc/init.qcom.rc311
-rw-r--r--[-rwxr-xr-x]rootdir/etc/init.qcom.usb.rc3
-rw-r--r--rootdir/etc/ueventd.qcom.rc89
9 files changed, 928 insertions, 407 deletions
diff --git a/rootdir/bin/init.class_main.sh b/rootdir/bin/init.class_main.sh
index 9368ac9..cee656e 100755..100644
--- a/rootdir/bin/init.class_main.sh
+++ b/rootdir/bin/init.class_main.sh
@@ -1,6 +1,6 @@
#! /vendor/bin/sh
-# Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+# Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -33,17 +33,20 @@
baseband=`getprop ro.baseband`
sgltecsfb=`getprop persist.vendor.radio.sglte_csfb`
datamode=`getprop persist.vendor.data.mode`
-rild_status=`getprop init.svc.ril-daemon`
-vendor_rild_status=`getprop init.svc.vendor.ril-daemon`
+qcrild_status=true
case "$baseband" in
"apq" | "sda" | "qcs" )
setprop ro.vendor.radio.noril yes
- if [ -n "$rild_status" ] || [ -n "$vendor_rild_status" ]; then
- stop ril-daemon
- stop vendor.ril-daemon
- start vendor.ipacm
- fi
+ stop ril-daemon
+ stop vendor.ril-daemon
+ stop vendor.qcrild
+ start vendor.ipacm
+esac
+
+case "$baseband" in
+ "sa8")
+ start vendor.ipacm
esac
case "$baseband" in
@@ -54,62 +57,55 @@ esac
case "$baseband" in
"msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx" | "sm6")
+ # For older modem packages launch ril-daemon.
if [ -f /vendor/firmware_mnt/verinfo/ver_info.txt ]; then
modem=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
sed 's/.*MPSS.\(.*\)/\1/g' | cut -d \. -f 1`
- # Check if this is AT 3.0 or below. If so, start ril-daemon
if [ "$modem" = "AT" ]; then
version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
sed 's/.*AT.\(.*\)/\1/g' | cut -d \- -f 1`
if [ ! -z $version ]; then
if [ "$version" \< "3.1" ]; then
- # For OTA targets, ril-daemon will be defined and for new vendor.ril-daemon
- # To keep this script agnostic,start both of them as only valid one will start.
- start ril-daemon
- start vendor.ril-daemon
+ qcrild_status=false
fi
fi
- # For older than TA 3.0 start ril-daemon
elif [ "$modem" = "TA" ]; then
version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
sed 's/.*TA.\(.*\)/\1/g' | cut -d \- -f 1`
if [ ! -z $version ]; then
if [ "$version" \< "3.0" ]; then
- # For OTA targets, ril-daemon will be defined and for new vendor.ril-daemon
- # To keep this script agnostic,start both of them as only valid one will start.
- start ril-daemon
- start vendor.ril-daemon
+ qcrild_status=false
fi
fi
- # For older than JO 3.2 start ril-daemon
elif [ "$modem" = "JO" ]; then
version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
sed 's/.*JO.\(.*\)/\1/g' | cut -d \- -f 1`
if [ ! -z $version ]; then
if [ "$version" \< "3.2" ]; then
- # For OTA targets, ril-daemon will be defined and for new vendor.ril-daemon
- # To keep this script agnostic,start both of them as only valid one will start.
- start ril-daemon
- start vendor.ril-daemon
+ qcrild_status=false
fi
fi
- else
- start ril-daemon
- start vendor.ril-daemon
+ elif [ "$modem" = "TH" ]; then
+ qcrild_status=false
fi
fi
- # Get ril-daemon status again to ensure that we have latest info
- rild_status=`getprop init.svc.ril-daemon`
- vendor_rild_status=`getprop init.svc.vendor.ril-daemon`
+ if [ "$qcrild_status" = "true" ]; then
+ # Make sure both rild, qcrild are not running at same time.
+ # This is possible with vanilla aosp system image.
+ stop ril-daemon
+ stop vendor.ril-daemon
- if [[ -z "$rild_status" || "$rild_status" = "stopped" ]] && [[ -z "$vendor_rild_status" || "$vendor_rild_status" = "stopped" ]]; then
- start vendor.qcrild
+ start vendor.qcrild
+ else
+ start ril-daemon
+ start vendor.ril-daemon
fi
+
start vendor.ipacm-diag
start vendor.ipacm
case "$baseband" in
@@ -128,13 +124,13 @@ case "$baseband" in
multisim=`getprop persist.radio.multisim.config`
if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then
- if [[ -z "$rild_status" || "$rild_status" = "stopped" ]] && [[ -z "$vendor_rild_status" || "$vendor_rild_status" = "stopped" ]]; then
+ if [ "$qcrild_status" = "true" ]; then
start vendor.qcrild2
else
start vendor.ril-daemon2
fi
elif [ "$multisim" = "tsts" ]; then
- if [[ -z "$rild_status" || "$rild_status" = "stopped" ]] && [[ -z "$vendor_rild_status" || "$vendor_rild_status" = "stopped" ]]; then
+ if [ "$qcrild_status" = "true" ]; then
start vendor.qcrild2
start vendor.qcrild3
else
diff --git a/rootdir/bin/init.qcom.post_boot.sh b/rootdir/bin/init.qcom.post_boot.sh
index 12600b0..992da7f 100755..100644
--- a/rootdir/bin/init.qcom.post_boot.sh
+++ b/rootdir/bin/init.qcom.post_boot.sh
@@ -72,6 +72,115 @@ function 8937_sched_dcvs_eas()
}
+function configure_sku_parameters() {
+
+#read feature id from nvram
+reg_val=`cat /sys/devices/platform/soc/780130.qfprom/qfprom0/nvmem | od -An -t d4`
+feature_id=$(((reg_val >> 20) & 0xFF))
+log -t BOOT -p i "feature id '$feature_id'"
+if [ $feature_id == 6 ]; then
+ echo " SKU Configured : SA6145"
+ echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq
+ echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+ echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
+ echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
+ echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
+ echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
+ echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
+ echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq
+ echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq
+ echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/min_freq
+ echo 1017600000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/max_freq
+ echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/min_freq
+ echo 1017600000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/max_freq
+ echo 3 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
+ echo {class:ddr, res:fixed, val: 1016} > /sys/kernel/debug/aop_send_message
+ setprop vendor.sku_identified 1
+elif [ $feature_id == 5 ]; then
+ echo "SKU Configured : SA6150"
+ echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq
+ echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+ echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq
+ echo 998400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ echo 998400 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
+ echo 998400 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
+ echo 998400 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
+ echo 998400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
+ echo 998400 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
+ echo 1708800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq
+ echo 1708800 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq
+ echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/min_freq
+ echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/max_freq
+ echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/min_freq
+ echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/max_freq
+ echo 2 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
+ echo {class:ddr, res:fixed, val: 1333} > /sys/kernel/debug/aop_send_message
+ setprop vendor.sku_identified 1
+elif [ $feature_id == 4 || $feature_id == 3 ]; then
+ echo "SKU Configured : SA6155"
+ echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq
+ echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+ echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq
+ echo 1593600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ echo 1593600 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
+ echo 1593600 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
+ echo 1593600 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
+ echo 1593600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
+ echo 1593600 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
+ echo 1900800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq
+ echo 1900800 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq
+ echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/min_freq
+ echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/max_freq
+ echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/min_freq
+ echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/max_freq
+ echo 0 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
+ echo {class:ddr, res:fixed, val: 1555} > /sys/kernel/debug/aop_send_message
+ setprop vendor.sku_identified 1
+else
+ echo "unknown feature_id value" $feature_id
+ echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq
+ echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+ echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq
+ echo 1593600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ echo 1593600 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
+ echo 1593600 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
+ echo 1593600 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
+ echo 1593600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
+ echo 1593600 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
+ echo 1900800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq
+ echo 1900800 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq
+ echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/min_freq
+ echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/max_freq
+ echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/min_freq
+ echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/max_freq
+ echo 0 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
+ echo {class:ddr, res:fixed, val: 1555} > /sys/kernel/debug/aop_send_message
+ setprop vendor.sku_identified 1
+fi
+}
+
function 8953_sched_dcvs_hmp()
{
#scheduler settings
@@ -231,8 +340,7 @@ function configure_zram_parameters() {
# Zram disk - 75% for Go devices.
# For 512MB Go device, size = 384MB, set same for Non-Go.
# For 1GB Go device, size = 768MB, set same for Non-Go.
- # For 2GB and 3GB Non-Go device, size = 1GB
- # For 4GB and 6GB Non-Go device, size = 2GB
+ # For >=2GB Non-Go device, size = 1GB
# And enable lz4 zram compression for Go targets.
if [ "$low_ram" == "true" ]; then
@@ -240,14 +348,14 @@ function configure_zram_parameters() {
fi
if [ -f /sys/block/zram0/disksize ]; then
+ echo 1 > /sys/block/zram0/use_dedup
if [ $MemTotal -le 524288 ]; then
echo 402653184 > /sys/block/zram0/disksize
elif [ $MemTotal -le 1048576 ]; then
echo 805306368 > /sys/block/zram0/disksize
- elif [ $MemTotal -le 3145728 ]; then
+ else
+ # Set Zram disk size=1GB for >=2GB Non-Go targets.
echo 1073741824 > /sys/block/zram0/disksize
- elif [ $MemTotal -le 6291456 ]; then
- echo 2147483648 > /sys/block/zram0/disksize
fi
mkswap /dev/block/zram0
swapon /dev/block/zram0 -p 32758
@@ -267,6 +375,7 @@ function configure_read_ahead_kb_values() {
echo 128 > /sys/block/mmcblk0rpmb/queue/read_ahead_kb
echo 128 > /sys/block/dm-0/queue/read_ahead_kb
echo 128 > /sys/block/dm-1/queue/read_ahead_kb
+ echo 128 > /sys/block/dm-2/queue/read_ahead_kb
else
echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
echo 512 > /sys/block/mmcblk0/queue/read_ahead_kb
@@ -274,6 +383,7 @@ function configure_read_ahead_kb_values() {
echo 512 > /sys/block/mmcblk0rpmb/queue/read_ahead_kb
echo 512 > /sys/block/dm-0/queue/read_ahead_kb
echo 512 > /sys/block/dm-1/queue/read_ahead_kb
+ echo 512 > /sys/block/dm-2/queue/read_ahead_kb
fi
}
@@ -334,6 +444,8 @@ if [ "$ProductName" == "msmnile" ]; then
# Enable ZRAM
configure_zram_parameters
configure_read_ahead_kb_values
+ echo 0 > /proc/sys/vm/page-cluster
+ echo 100 > /proc/sys/vm/swappiness
else
arch_type=`uname -m`
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
@@ -346,6 +458,10 @@ else
echo 0 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
echo 0 > /sys/module/process_reclaim/parameters/enable_process_reclaim
disable_core_ctl
+ # Enable oom_reaper for Go devices
+ if [ -f /proc/sys/vm/reap_mem_on_sigkill ]; then
+ echo 1 > /proc/sys/vm/reap_mem_on_sigkill
+ fi
else
# Read adj series and set adj threshold for PPR and ALMK.
@@ -411,7 +527,7 @@ else
*)
#Set PPR parameters for all other targets.
echo $set_almk_ppr_adj > /sys/module/process_reclaim/parameters/min_score_adj
- echo 0 > /sys/module/process_reclaim/parameters/enable_process_reclaim
+ echo 1 > /sys/module/process_reclaim/parameters/enable_process_reclaim
echo 50 > /sys/module/process_reclaim/parameters/pressure_min
echo 70 > /sys/module/process_reclaim/parameters/pressure_max
echo 30 > /sys/module/process_reclaim/parameters/swap_opt_eff
@@ -425,6 +541,10 @@ else
echo 0 > /sys/module/vmpressure/parameters/allocstall_threshold
echo 100 > /proc/sys/vm/swappiness
+ # Disable wsf for all targets beacause we are using efk.
+ # wsf Range : 1..1000 So set to bare minimum value 1.
+ echo 1 > /proc/sys/vm/watermark_scale_factor
+
configure_zram_parameters
configure_read_ahead_kb_values
@@ -1984,8 +2104,9 @@ case "$target" in
platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
fi
+ # Socid 386 = Pukeena
case "$soc_id" in
- "303" | "307" | "308" | "309" | "320" )
+ "303" | "307" | "308" | "309" | "320" | "386" )
# Start Host based Touch processing
case "$hw_platform" in
@@ -2009,7 +2130,7 @@ case "$target" in
echo 0 > /proc/sys/kernel/sched_boost
# core_ctl is not needed for 8917. Disable it.
- echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/disable
+ disable_core_ctl
for devfreq_gov in /sys/class/devfreq/qcom,mincpubw*/governor
do
@@ -2318,6 +2439,18 @@ case "$target" in
esac
;;
esac
+
+ case "$soc_id" in
+ "386" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "QRD" )
+ start_hbtp
+ ;;
+ esac
+ ;;
+ esac
;;
esac
@@ -2381,11 +2514,8 @@ case "$target" in
echo 20 > /proc/sys/kernel/sched_small_wakee_task_load
# cpuset settings
- echo 0-7 > /dev/cpuset/top-app/cpus
- echo 4-7 > /dev/cpuset/foreground/boost/cpus
- echo 0-2,4-7 > /dev/cpuset/foreground/cpus
- echo 0-1 > /dev/cpuset/background/cpus
- echo 0-2 > /dev/cpuset/system-background/cpus
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
# disable thermal bcl hotplug to switch governor
echo 0 > /sys/module/msm_thermal/core_control/enabled
@@ -2454,12 +2584,6 @@ case "$target" in
# re-enable thermal and BCL hotplug
echo 1 > /sys/module/msm_thermal/core_control/enabled
- #Add-begin-HMI_M6100_A01-422,lijiang@longcheer.com,2018-10-12
- #Enable input boost configuration
- echo "0:1401600" > /sys/module/cpu_boost/parameters/input_boost_freq
- echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
- #Add-end-HMI_M6100_A01-422
-
# Set Memory parameters
configure_memory_parameters
@@ -2494,15 +2618,16 @@ case "$target" in
echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
# Start cdsprpcd only for sdm660 and disable for sdm630
- start vendor.cdsprpcd
-##D2SP&F7A has no hbtp feature
-# # Start Host based Touch processing
-# case "$hw_platform" in
-# "MTP" | "Surf" | "RCM" | "QRD" )
-# start_hbtp
-# ;;
-# esac
-#end
+ if [ "$soc_id" -eq "317" ]; then
+ start vendor.cdsprpcd
+ fi
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" | "QRD" )
+ start_hbtp
+ ;;
+ esac
;;
esac
#Apply settings for sdm630 and Tahaa
@@ -2672,6 +2797,132 @@ case "$target" in
esac
case "$target" in
+ "trinket")
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ case "$soc_id" in
+ "394" )
+
+ # Core control parameters on big
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 40 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster
+ echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
+
+ # Setting b.L scheduler parameters
+ echo 67 > /proc/sys/kernel/sched_downmigrate
+ echo 77 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_group_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+
+ # cpuset settings
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
+ echo 1305600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 614400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
+ echo 1401600 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq
+ echo 1056000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
+ echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu4/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu5/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ ddr_type=`od -An -tx /proc/device-tree/memory/ddr_device_type`
+ ddr_type4="07"
+ ddr_type3="05"
+
+ for device in /sys/devices/platform/soc
+ do
+ for cpubw in $device/*cpu-cpu-ddr-bw/devfreq/*cpu-cpu-ddr-bw
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo 762 > $cpubw/min_freq
+ if [ ${ddr_type:4:2} == $ddr_type4 ]; then
+ # LPDDR4
+ echo "2288 3440 4173 5195 5859 7759 10322 11863 13763" > $cpubw/bw_hwmon/mbps_zones
+ echo 85 > $cpubw/bw_hwmon/io_percent
+ fi
+ if [ ${ddr_type:4:2} == $ddr_type3 ]; then
+ # LPDDR3
+ echo "1525 3440 5195 5859 7102" > $cpubw/bw_hwmon/mbps_zones
+ echo 34 > $cpubw/bw_hwmon/io_percent
+ fi
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 90 > $cpubw/bw_hwmon/decay_rate
+ echo 190 > $cpubw/bw_hwmon/bw_step
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
+
+ done
+
+ # colcoation v3 disabled
+ echo 0 > /proc/sys/kernel/sched_min_task_util_for_boost
+ echo 0 > /proc/sys/kernel/sched_min_task_util_for_colocation
+ echo 0 > /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Turn on sleep modes.
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
"sdm710")
#Apply settings for sdm710
@@ -2693,11 +2944,11 @@ case "$target" in
fi
case "$soc_id" in
- "336" | "337" | "347" | "360" )
+ "336" | "337" | "347" | "360" | "393" | "370" | "371" )
# Start Host based Touch processing
case "$hw_platform" in
- "MTP" | "Surf" | "RCM" | "QRD" )
+ "MTP" | "Surf" | "RCM" | "QRD" | "HDK" )
start_hbtp
;;
esac
@@ -2807,9 +3058,9 @@ case "$target" in
esac
case "$target" in
- "talos")
+ "sm6150")
- #Apply settings for talos
+ #Apply settings for sm6150
# Set the default IRQ affinity to the silver cluster. When a
# CPU is isolated/hotplugged, the IRQ affinity is adjusted
# to one of the CPU from the default IRQ affinity mask.
@@ -2822,7 +3073,15 @@ case "$target" in
fi
case "$soc_id" in
- "355" | "369" )
+ "355" | "369" | "377" | "380" | "384" )
+ target_type=`getprop ro.hardware.type`
+ if [ "$target_type" == "automotive" ]; then
+ # update frequencies
+ configure_sku_parameters
+ sku_identified=`getprop vendor.sku_identified`
+ else
+ sku_identified=0
+ fi
# Core control parameters on silver
echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
@@ -2844,17 +3103,27 @@ case "$target" in
echo 100 > /proc/sys/kernel/sched_group_upmigrate
echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+ # colocation v3 settings
+ echo 740000 > /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz
+
+
# configure governor settings for little cluster
echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
- echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
echo 1209600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
- echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ if [ $sku_identified != 1 ]; then
+ echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ fi
# configure governor settings for big cluster
echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
- echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us
echo 1209600 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
- echo 768000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+ if [ $sku_identified != 1 ]; then
+ echo 768000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+ fi
# sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
@@ -2867,6 +3136,7 @@ case "$target" in
# Set Memory parameters
configure_memory_parameters
+
# Enable bus-dcvs
for device in /sys/devices/platform/soc
do
@@ -2908,6 +3178,15 @@ case "$target" in
echo 400 > $memlat/mem_latency/ratio_ceil
done
+ #Gold L3 ratio ceil
+ echo 4000 > /sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil
+
+ #Enable cdspl3 governor for L3 cdsp nodes
+ for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
+ do
+ echo "cdspl3" > $l3cdsp/governor
+ done
+
#Enable compute governor for gold latfloor
for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
do
@@ -2929,6 +3208,146 @@ case "$target" in
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
;;
esac
+
+ #Apply settings for moorea
+ case "$soc_id" in
+ "365" | "366" )
+
+ # Core control parameters on silver
+ echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+ echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
+ echo 0 > /sys/devices/system/cpu/cpu6/core_ctl/enable
+
+
+ # Setting b.L scheduler parameters
+ # default sched up and down migrate values are 71 and 65
+ echo 65 > /proc/sys/kernel/sched_downmigrate
+ echo 71 > /proc/sys/kernel/sched_upmigrate
+ # default sched up and down migrate values are 100 and 95
+ echo 85 > /proc/sys/kernel/sched_group_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ #colocation v3 settings
+ echo 740000 > /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
+ echo 1248000 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us
+ echo 1324600 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
+ echo 652800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+
+ # sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+ echo 85 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load
+
+ echo "0:1248000" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ for device in /sys/devices/platform/soc
+ do
+ for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "2288 4577 7110 9155 12298 14236" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 68 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
+ do
+ echo "bw_hwmon" > $llccbw/governor
+ echo 40 > $llccbw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881" > $llccbw/bw_hwmon/mbps_zones
+ echo 4 > $llccbw/bw_hwmon/sample_ms
+ echo 68 > $llccbw/bw_hwmon/io_percent
+ echo 20 > $llccbw/bw_hwmon/hist_memory
+ echo 0 > $llccbw/bw_hwmon/hyst_length
+ echo 80 > $llccbw/bw_hwmon/down_thres
+ echo 0 > $llccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $llccbw/bw_hwmon/up_scale
+ echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ done
+
+ for npubw in $device/*npu-npu-ddr-bw/devfreq/*npu-npu-ddr-bw
+ do
+ echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
+ echo "bw_hwmon" > $npubw/governor
+ echo 40 > $npubw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881" > $npubw/bw_hwmon/mbps_zones
+ echo 4 > $npubw/bw_hwmon/sample_ms
+ echo 80 > $npubw/bw_hwmon/io_percent
+ echo 20 > $npubw/bw_hwmon/hist_memory
+ echo 10 > $npubw/bw_hwmon/hyst_length
+ echo 30 > $npubw/bw_hwmon/down_thres
+ echo 0 > $npubw/bw_hwmon/guard_band_mbps
+ echo 250 > $npubw/bw_hwmon/up_scale
+ echo 0 > $npubw/bw_hwmon/idle_mbps
+ echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
+ done
+
+ #Enable mem_latency governor for L3, LLCC, and DDR scaling
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Gold L3 ratio ceil
+ echo 4000 > /sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil
+
+ #Enable cdspl3 governor for L3 cdsp nodes
+ for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
+ do
+ echo "cdspl3" > $l3cdsp/governor
+ done
+
+ #Enable compute governor for gold latfloor
+ for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
+
+ done
+
+ # cpuset parameters
+ echo 0-5 > /dev/cpuset/background/cpus
+ echo 0-5 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Turn on sleep modes.
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ ;;
+ esac
;;
esac
@@ -2973,6 +3392,7 @@ case "$target" in
esac
# Core control parameters on silver
+ echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
@@ -3047,7 +3467,9 @@ case "$target" in
# Turn on sleep modes.
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
- echo 100 > /proc/sys/vm/swappiness
+
+ # Set Memory parameters
+ configure_memory_parameters
;;
esac
;;
@@ -3629,10 +4051,10 @@ case "$target" in
# tasks eligible to run on previous cluster minus number of CPUs in
# the previous cluster).
#
- # Setting to 3 by default which means there should be at least
- # 6 tasks eligible to run on gold cluster (tasks running on gold cores
+ # Setting to 1 by default which means there should be at least
+ # 4 tasks eligible to run on gold cluster (tasks running on gold cores
# plus misfit tasks on silver cores) to trigger assitance from gold+.
- echo 3 > /sys/devices/system/cpu/cpu7/core_ctl/nr_prev_assist_thresh
+ echo 1 > /sys/devices/system/cpu/cpu7/core_ctl/nr_prev_assist_thresh
# Disable Core control on silver
echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable
@@ -3641,7 +4063,7 @@ case "$target" in
echo 95 95 > /proc/sys/kernel/sched_upmigrate
echo 85 85 > /proc/sys/kernel/sched_downmigrate
echo 100 > /proc/sys/kernel/sched_group_upmigrate
- echo 95 > /proc/sys/kernel/sched_group_downmigrate
+ echo 10 > /proc/sys/kernel/sched_group_downmigrate
echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
# cpuset parameters
@@ -3653,28 +4075,33 @@ case "$target" in
# configure governor settings for silver cluster
echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
- echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/rate_limit_us
- echo 1075200 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/down_rate_limit_us
+ echo 1209600 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq
echo 576000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
echo 1 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl
# configure governor settings for gold cluster
echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor
- echo 0 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/rate_limit_us
- echo 1248000 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/down_rate_limit_us
+ echo 1612800 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/hispeed_freq
echo 1 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/pl
# configure governor settings for gold+ cluster
echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy7/scaling_governor
- echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/rate_limit_us
- echo 1286400 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/down_rate_limit_us
+ echo 1612800 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq
echo 1 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/pl
# configure input boost settings
echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq
echo 120 > /sys/module/cpu_boost/parameters/input_boost_ms
- echo 120 > /proc/sys/vm/watermark_scale_factor
+ # Disable wsf, beacause we are using efk.
+ # wsf Range : 1..1000 So set to bare minimum value 1.
+ echo 1 > /proc/sys/vm/watermark_scale_factor
echo 0-3 > /dev/cpuset/background/cpus
echo 0-3 > /dev/cpuset/system-background/cpus
@@ -3693,7 +4120,7 @@ case "$target" in
do
echo "bw_hwmon" > $cpubw/governor
echo 40 > $cpubw/polling_interval
- echo "2288 3051 6149 8132 10162 11856" > $cpubw/bw_hwmon/mbps_zones
+ echo "2288 4577 7110 9155 12298 14236 15258" > $cpubw/bw_hwmon/mbps_zones
echo 4 > $cpubw/bw_hwmon/sample_ms
echo 50 > $cpubw/bw_hwmon/io_percent
echo 20 > $cpubw/bw_hwmon/hist_memory
@@ -3702,13 +4129,14 @@ case "$target" in
echo 0 > $cpubw/bw_hwmon/guard_band_mbps
echo 250 > $cpubw/bw_hwmon/up_scale
echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ echo 14236 > $cpubw/max_freq
done
for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
do
echo "bw_hwmon" > $llccbw/governor
echo 40 > $llccbw/polling_interval
- echo "1720 2929 4943 5931 6881 7980" > $llccbw/bw_hwmon/mbps_zones
+ echo "1720 2929 3879 5931 6881 7980" > $llccbw/bw_hwmon/mbps_zones
echo 4 > $llccbw/bw_hwmon/sample_ms
echo 80 > $llccbw/bw_hwmon/io_percent
echo 20 > $llccbw/bw_hwmon/hist_memory
@@ -3717,6 +4145,7 @@ case "$target" in
echo 0 > $llccbw/bw_hwmon/guard_band_mbps
echo 250 > $llccbw/bw_hwmon/up_scale
echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ echo 6881 > $llccbw/max_freq
done
for npubw in $device/*npu-npu-ddr-bw/devfreq/*npu-npu-ddr-bw
@@ -3724,15 +4153,15 @@ case "$target" in
echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
echo "bw_hwmon" > $npubw/governor
echo 40 > $npubw/polling_interval
- echo "1720 2929 4943 5931 6881 7980" > $npubw/bw_hwmon/mbps_zones
+ echo "1720 2929 3879 5931 6881 7980" > $npubw/bw_hwmon/mbps_zones
echo 4 > $npubw/bw_hwmon/sample_ms
echo 80 > $npubw/bw_hwmon/io_percent
echo 20 > $npubw/bw_hwmon/hist_memory
- echo 10 > $npubw/bw_hwmon/hyst_length
+ echo 6 > $npubw/bw_hwmon/hyst_length
echo 30 > $npubw/bw_hwmon/down_thres
echo 0 > $npubw/bw_hwmon/guard_band_mbps
echo 250 > $npubw/bw_hwmon/up_scale
- echo 1600 > $npubw/bw_hwmon/idle_mbps
+ echo 0 > $npubw/bw_hwmon/idle_mbps
echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
done
@@ -3762,6 +4191,12 @@ case "$target" in
do
echo 4000 > $l3gold/mem_latency/ratio_ceil
done
+
+ #Prime L3 ratio ceil
+ for l3prime in $device/*cpu7-cpu-l3-lat/devfreq/*cpu7-cpu-l3-lat
+ do
+ echo 20000 > $l3prime/mem_latency/ratio_ceil
+ done
done
if [ -f /sys/devices/soc0/hw_platform ]; then
@@ -3783,6 +4218,11 @@ case "$target" in
;;
esac
;;
+ "HDK" )
+ if [ -d /sys/kernel/hbtpsensor ] ; then
+ start_hbtp
+ fi
+ ;;
esac
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
@@ -4118,7 +4558,7 @@ case "$target" in
start mpdecision
echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
;;
- "msm8994" | "msm8992" | "msm8996" | "msm8998" | "sdm660" | "apq8098_latv" | "sdm845" | "sdm710" | "msmnile" | "msmsteppe")
+ "msm8994" | "msm8992" | "msm8996" | "msm8998" | "sdm660" | "apq8098_latv" | "sdm845" | "sdm710" | "msmnile" | "qcs605" | "sm6150" | "trinket")
setprop vendor.post_boot.parsed 1
;;
"apq8084")
@@ -4195,6 +4635,61 @@ case "$target" in
;;
esac
+product=`getprop ro.build.product`
+case "$product" in
+ "msmnile_au")
+ #Setting the min and max supported frequencies
+ reg_val=`cat /sys/devices/platform/soc/780130.qfprom/qfprom0/nvmem | od -An -t d4`
+ feature_id=$(((reg_val >> 20) & 0xFF))
+
+ if [ $feature_id == 0 ]; then
+ echo "feature_id is 0 for SA8155"
+ echo 1036800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 1036800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 1036800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 1036800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 1056000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 1056000 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq
+ echo 1056000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+ echo 1171200 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq
+ echo 1785600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ echo 1785600 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
+ echo 1785600 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
+ echo 1785600 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
+ echo 2131200 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
+ echo 2131200 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
+ echo 2131200 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq
+ echo 2419200 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq
+ echo 4 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel
+ echo 0 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
+ elif [ $feature_id == 1 ]; then
+ echo "feature_id is 1 for SA8150"
+ echo 1036800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 1036800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 1036800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 1036800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 1056000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 1056000 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq
+ echo 1056000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+ echo 1171200 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq
+ echo 1785600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ echo 1785600 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
+ echo 1785600 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
+ echo 1785600 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
+ echo 1920000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
+ echo 1920000 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
+ echo 1920000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq
+ echo 2227200 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq
+ echo 4 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel
+ echo 3 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
+ else
+ echo "unknown feature_id value" $feature_id
+ fi
+ ;;
+ *)
+ ;;
+esac
+
# Let kernel know our image version/variant/crm_version
if [ -f /sys/devices/soc0/select_image ]; then
image_version="10:"
@@ -4211,18 +4706,6 @@ if [ -f /sys/devices/soc0/select_image ]; then
echo $oem_version > /sys/devices/soc0/image_crm_version
fi
-# Change console log level as per console config property
-console_config=`getprop persist.console.silent.config`
-case "$console_config" in
- "1")
- echo "Enable console config to $console_config"
- echo 0 > /proc/sys/kernel/printk
- ;;
- *)
- echo "Enable console config to $console_config"
- ;;
-esac
-
# Parse misc partition path and set property
misc_link=$(ls -l /dev/block/bootdevice/by-name/misc)
real_path=${misc_link##*>}
diff --git a/rootdir/bin/init.qcom.sensors.sh b/rootdir/bin/init.qcom.sensors.sh
index d2eb8e1..daf7de2 100755..100644
--- a/rootdir/bin/init.qcom.sensors.sh
+++ b/rootdir/bin/init.qcom.sensors.sh
@@ -1,5 +1,5 @@
#!/vendor/bin/sh
-# Copyright (c) 2015, The Linux Foundation. All rights reserved.
+# Copyright (c) 2015,2018 The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -31,12 +31,13 @@
#
start_sensors()
{
+
chmod -h 664 /persist/sensors/sensors_settings
chown -h -R system.system /persist/sensors
start vendor.sensors.qti
# Only for SLPI
- if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then
+ if [ -c /dev/msm_dsps -o -c /dev/sensors ] ; then
start vendor.sensors
fi
}
diff --git a/rootdir/bin/init.qcom.sh b/rootdir/bin/init.qcom.sh
index fbf8c82..1b811c3 100755..100644
--- a/rootdir/bin/init.qcom.sh
+++ b/rootdir/bin/init.qcom.sh
@@ -84,7 +84,7 @@ start_msm_irqbalance_8939()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
case "$platformid" in
- "239" | "293" | "294" | "295" | "304" | "313" |"353")
+ "239" | "293" | "294" | "295" | "304" | "338" | "313" |"353" | "354")
start vendor.msm_irqbalance;;
"349" | "350" )
start vendor.msm_irqbal_lb;;
@@ -92,7 +92,14 @@ start_msm_irqbalance_8939()
fi
}
-start_msm_irqbalance()
+start_msm_irqbalance_msmnile()
+{
+ if [ -f /vendor/bin/msm_irqbalance ]; then
+ start vendor.msm_irqbalance
+ fi
+}
+
+start_msm_irqbalance660()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
case "$platformid" in
@@ -104,6 +111,13 @@ start_msm_irqbalance()
fi
}
+start_msm_irqbalance()
+{
+ if [ -f /vendor/bin/msm_irqbalance ]; then
+ start vendor.msm_irqbalance
+ fi
+}
+
baseband=`getprop ro.baseband`
echo 1 > /proc/sys/net/ipv6/conf/default/accept_ra_defrtr
@@ -183,7 +197,7 @@ case "$target" in
fi
case "$soc_id" in
- "317" | "324" | "325" | "326" | "318" | "327" )
+ "317" | "324" | "325" | "326" | "318" | "327" | "385" )
case "$hw_platform" in
"Surf")
setprop qemu.hw.mainkeys 0
@@ -200,7 +214,7 @@ case "$target" in
esac
;;
esac
- start_msm_irqbalance
+ start_msm_irqbalance660
;;
"apq8084")
platformvalue=`cat /sys/devices/soc0/hw_platform`
@@ -253,7 +267,7 @@ case "$target" in
;;
esac
;;
- "msm8994" | "msm8992" | "msm8998" | "apq8098_latv" | "sdm845" | "sdm710" | "qcs605" | "msmnile" | "talos")
+ "msm8994" | "msm8992" | "msm8998" | "apq8098_latv" | "sdm845" | "sdm710" | "qcs605" | "sm6150" | "trinket")
start_msm_irqbalance
;;
"msm8996")
@@ -280,6 +294,9 @@ case "$target" in
"msm8909")
start_vm_bms
;;
+ "msmnile")
+ start_msm_irqbalance_msmnile
+ ;;
"msm8937")
start_msm_irqbalance_8939
if [ -f /sys/devices/soc0/soc_id ]; then
@@ -359,7 +376,7 @@ case "$target" in
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$soc_id" in
- "336" | "337" | "347" | "360" )
+ "336" | "337" | "347" | "360" | "393" | "370" | "371" )
case "$hw_platform" in
"Surf")
setprop qemu.hw.mainkeys 0
diff --git a/rootdir/bin/init.qcom.usb.sh b/rootdir/bin/init.qcom.usb.sh
index 4a18c40..28e8324 100755..100644
--- a/rootdir/bin/init.qcom.usb.sh
+++ b/rootdir/bin/init.qcom.usb.sh
@@ -29,43 +29,20 @@
#
# Set platform variables
-if [ -f /sys/devices/soc0/hw_platform ]; then
- soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
-else
- soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
-fi
-
-if [ -f /sys/devices/soc0/machine ]; then
- soc_machine=`cat /sys/devices/soc0/machine` 2> /dev/null
-else
- soc_machine=`cat /sys/devices/system/soc/soc0/machine` 2> /dev/null
-fi
+soc_hwplatform=`cat /sys/devices/soc0/hw_platform 2> /dev/null`
+soc_machine=`cat /sys/devices/soc0/machine 2> /dev/null`
+soc_machine=${soc_machine:0:2}
+soc_id=`cat /sys/devices/soc0/soc_id 2> /dev/null`
#
-# Check ESOC for external MDM
+# Check ESOC for external modem
#
-# Note: currently only a single MDM is supported
+# Note: currently only a single MDM/SDX is supported
#
-if [ -d /sys/bus/esoc/devices ]; then
-for f in /sys/bus/esoc/devices/*; do
- if [ -d $f ]; then
- if [ `grep -e "^MDM" -e "^SDX" $f/esoc_name` ]; then
- esoc_link=`cat $f/esoc_link`
- break
- fi
- fi
-done
-fi
+esoc_name=`cat /sys/bus/esoc/devices/esoc0/esoc_name 2> /dev/null`
target=`getprop ro.board.platform`
-# soc_ids for 8937
-if [ -f /sys/devices/soc0/soc_id ]; then
- soc_id=`cat /sys/devices/soc0/soc_id`
-else
- soc_id=`cat /sys/devices/system/soc/soc0/id`
-fi
-
if [ -f /sys/class/android_usb/f_mass_storage/lun/nofua ]; then
echo 1 > /sys/class/android_usb/f_mass_storage/lun/nofua
fi
@@ -74,13 +51,11 @@ fi
# Override USB default composition
#
# If USB persist config not set, set default configuration
-miui_release=`getprop ro.fota.oem`
-miui_debuggable=`getprop ro.debuggable`
if [ "$(getprop persist.vendor.usb.config)" == "" -a \
"$(getprop init.svc.vendor.usb-gadget-hal-1-0)" != "running" ]; then
- if [ "$esoc_link" != "" ]; then
+ if [ "$esoc_name" != "" ]; then
setprop persist.vendor.usb.config diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb
- else
+ else
case "$(getprop ro.baseband)" in
"apq")
setprop persist.vendor.usb.config diag,adb
@@ -91,16 +66,12 @@ if [ "$(getprop persist.vendor.usb.config)" == "" -a \
setprop persist.vendor.usb.config diag,adb
;;
*)
- soc_machine=${soc_machine:0:3}
case "$soc_machine" in
- "SDA")
+ "SA")
setprop persist.vendor.usb.config diag,adb
;;
*)
case "$target" in
- "msm8996")
- setprop persist.vendor.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb
- ;;
"msm8909")
setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb
;;
@@ -110,7 +81,6 @@ if [ "$(getprop persist.vendor.usb.config)" == "" -a \
else
case "$soc_id" in
"313" | "320")
- echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_rndis_qc/rndis_transports
setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb
;;
*)
@@ -126,34 +96,20 @@ if [ "$(getprop persist.vendor.usb.config)" == "" -a \
setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb
fi
;;
- "msm8998" | "sdm660" | "sdm636"| "apq8098_latv")
- case "$miui_release" in
- "")
- case "$miui_debuggable" in
- "1")
- setprop persist.vendor.usb.config diag,serial_cdev,rmnet,adb
- ;;
- *)
- setprop persist.vendor.usb.config diag,serial_cdev,rmnet
- ;;
- esac
- ;;
- *)
- case "$miui_debuggable" in
- "1")
- setprop persist.vendor.usb.config adb
- ;;
- *)
- setprop persist.vendor.usb.config none
- ;;
- esac
- ;;
- esac
- ;;
+ "msm8996")
+ if [ -d /config/usb_gadget ]; then
+ setprop persist.vendor.usb.config diag,serial_cdev,rmnet,adb
+ else
+ setprop persist.vendor.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb
+ fi
+ ;;
+ "msm8998" | "sdm660" | "apq8098_latv")
+ setprop persist.vendor.usb.config diag,serial_cdev,rmnet,adb
+ ;;
"sdm845" | "sdm710")
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
;;
- "msmnile" | "talos")
+ "msmnile" | "sm6150" | "trinket")
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,qdss,adb
;;
*)
@@ -169,6 +125,20 @@ if [ "$(getprop persist.vendor.usb.config)" == "" -a \
fi
fi
+# Start peripheral mode on primary USB controllers for Automotive platforms
+case "$soc_machine" in
+ "SA")
+ if [ -f /sys/bus/platform/devices/a600000.ssusb/mode ]; then
+ default_mode=`cat /sys/bus/platform/devices/a600000.ssusb/mode`
+ case "$default_mode" in
+ "none")
+ echo peripheral > /sys/bus/platform/devices/a600000.ssusb/mode
+ ;;
+ esac
+ fi
+ ;;
+esac
+
# set rndis transport to BAM2BAM_IPA for 8920 and 8940
if [ "$target" == "msm8937" ]; then
if [ ! -d /config/usb_gadget ]; then
@@ -179,19 +149,28 @@ if [ "$target" == "msm8937" ]; then
*)
;;
esac
+ else
+ case "$soc_id" in
+ "313" | "320")
+ setprop vendor.usb.rndis.func.name "rndis_bam"
+ setprop vendor.usb.rmnet.func.name "rmnet_bam"
+ setprop vendor.usb.rmnet.inst.name "rmnet"
+ setprop vendor.usb.dpl.inst.name "dpl"
+ ;;
+ *)
+ ;;
+ esac
fi
fi
-# set device mode notification to USB driver for SA8150 Auto ADP
-product=`getprop ro.build.product`
-
-case "$product" in
- "msmnile_au")
- echo peripheral > /sys/bus/platform/devices/a600000.ssusb/mode
- ;;
- *)
- ;;
-esac
+if [ "$target" == "msm8996" ]; then
+ if [ -d /config/usb_gadget ]; then
+ setprop vendor.usb.rndis.func.name "rndis_bam"
+ setprop vendor.usb.rmnet.func.name "rmnet_bam"
+ setprop vendor.usb.rmnet.inst.name "rmnet"
+ setprop vendor.usb.dpl.inst.name "dpl"
+ fi
+fi
# check configfs is mounted or not
if [ -d /config/usb_gadget ]; then
@@ -203,7 +182,7 @@ if [ -d /config/usb_gadget ]; then
echo "$product_string" > /config/usb_gadget/g1/strings/0x409/product
# ADB requires valid iSerialNumber; if ro.serialno is missing, use dummy
- serialnumber=`cat /config/usb_gadget/g1/strings/0x409/serialnumber` 2> /dev/null
+ serialnumber=`cat /config/usb_gadget/g1/strings/0x409/serialnumber 2> /dev/null`
if [ "$serialnumber" == "" ]; then
serialno=1234567
echo $serialno > /config/usb_gadget/g1/strings/0x409/serialnumber
diff --git a/rootdir/etc/init.msm.usb.configfs.rc b/rootdir/etc/init.msm.usb.configfs.rc
index 7ad3db6..2936a14 100755..100644
--- a/rootdir/etc/init.msm.usb.configfs.rc
+++ b/rootdir/etc/init.msm.usb.configfs.rc
@@ -156,6 +156,29 @@ on property:sys.usb.config=diag,serial_cdev,rmnet && property:sys.usb.configfs=1
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
+on property:sys.usb.config=diag,serial_cdev,serial_cdev_nmea,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,serial_cdev_nmea,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_nmea_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9020
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/cser.nmea.1 /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
on property:vendor.usb.tethering=true
write /sys/class/net/rndis0/queues/rx-0/rps_cpus ${vendor.usb.rps_mask}
@@ -173,21 +196,33 @@ on property:sys.usb.config=rndis,none && property:sys.usb.configfs=1
rm /config/usb_gadget/g1/configs/b.1/f7
rm /config/usb_gadget/g1/configs/b.1/f8
rm /config/usb_gadget/g1/configs/b.1/f9
- write /config/usb_gadget/g1/idVendor 0x2717
- write /config/usb_gadget/g1/idProduct 0xFF80
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0xF00E
symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- write /config/usb_gadget/g1/configs/b.1/f1/wceis 1
setprop sys.usb.state rndis
+
on property:sys.usb.config=rndis,sec && property:sys.usb.configfs=1
write /config/usb_gadget/g2/configs/b.1/strings/0x409/configuration "rndis"
rm /config/usb_gadget/g2/configs/b.1/f1
+ rm /config/usb_gadget/g2/configs/b.1/f2
write /config/usb_gadget/g2/idVendor 0x05C6
write /config/usb_gadget/g2/idProduct 0xF00E
symlink /config/usb_gadget/g2/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g2/configs/b.1/f1
write /config/usb_gadget/g2/UDC ${persist.vendor.usb.controller.secondary}
setprop sys.usb.state rndis
+on property:sys.usb.config=rndis,rmnet,sec && property:sys.usb.configfs=1
+ write /config/usb_gadget/g2/configs/b.1/strings/0x409/configuration "rndis_rmnet"
+ rm /config/usb_gadget/g2/configs/b.1/f1
+ rm /config/usb_gadget/g2/configs/b.1/f2
+ write /config/usb_gadget/g2/idVendor 0x05C6
+ write /config/usb_gadget/g2/idProduct 0x90F1
+ symlink /config/usb_gadget/g2/functions/rndis.rndis /config/usb_gadget/g2/configs/b.1/f1
+ symlink /config/usb_gadget/g2/functions/${vendor.usb.rmnet.func.name}.rmnet /config/usb_gadget/g2/configs/b.1/f2
+ write /config/usb_gadget/g2/UDC ${persist.vendor.usb.controller.secondary}
+ setprop sys.usb.state rndis
+
on property:sys.usb.config=rndis,adb
setprop sys.usb.config rndis,${persist.vendor.usb.config.extra},adb
@@ -205,12 +240,11 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,none,adb && pro
rm /config/usb_gadget/g1/configs/b.1/f7
rm /config/usb_gadget/g1/configs/b.1/f8
rm /config/usb_gadget/g1/configs/b.1/f9
- write /config/usb_gadget/g1/idVendor 0x2717
- write /config/usb_gadget/g1/idProduct 0xFF88
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9024
symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
- write /config/usb_gadget/g1/configs/b.1/f1/wceis 1
setprop sys.usb.state rndis,adb
on property:sys.usb.config=rndis,diag && property:sys.usb.configfs=1
@@ -1161,25 +1195,47 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,diag_mdm,q
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state rndis,adb
+on property:sys.usb.config=diag,diag_mdm,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90D9
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
on property:sys.usb.config=adb && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/idVendor 0x2717
- write /config/usb_gadget/g1/idProduct 0xFF08
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x4ee7
on property:sys.usb.config=mtp && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/idVendor 0x2717
- write /config/usb_gadget/g1/idProduct 0xFF40
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x4ee1
on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/idVendor 0x2717
- write /config/usb_gadget/g1/idProduct 0xFF48
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x4ee2
on property:sys.usb.config=ptp && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/idVendor 0x2717
- write /config/usb_gadget/g1/idProduct 0xFF10
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x4ee5
on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
- write /config/usb_gadget/g1/idVendor 0x2717
- write /config/usb_gadget/g1/idProduct 0xFF18
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x4ee6
on property:sys.usb.config=accessory && property:sys.usb.configfs=1
write /config/usb_gadget/g1/idVendor 0x18d1
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
index 1683bb5..c99111e 100755..100644
--- a/rootdir/etc/init.qcom.rc
+++ b/rootdir/etc/init.qcom.rc
@@ -1,4 +1,4 @@
-# Copyright (c) 2009-2012, 2014-2018, The Linux Foundation. All rights reserved.
+# Copyright (c) 2009-2012, 2014-2019, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -28,33 +28,29 @@
import /vendor/etc/init/hw/init.qcom.usb.rc
import /vendor/etc/init/hw/init.msm.usb.configfs.rc
import /vendor/etc/init/hw/init.target.rc
+import /vendor/etc/init/hw/init.qcom.factory.rc
+import /vendor/etc/init/hw/init.qcom.test.rc
on early-init
mount debugfs debugfs /sys/kernel/debug
chmod 0755 /sys/kernel/debug
- # create symlink for vendor mount points
- symlink /vendor/firmware_mnt /firmware
- symlink /vendor/bt_firmware /bt_firmware
- symlink /vendor/dsp /dsp
-
# Change ownership of hw_recovery related nodes
chown system graphics /sys/kernel/debug/dri/0/debug/dump
chown system graphics /sys/kernel/debug/dri/0/debug/recovery_reg
chown system graphics /sys/kernel/debug/dri/0/debug/recovery_dbgbus
chown system graphics /sys/kernel/debug/dri/0/debug/recovery_vbif_dbgbus
+ # Change ownership of sw_sync node
+ chown system graphics /sys/kernel/debug/sync/sw_sync
+ chmod 0666 /sys/kernel/debug/sync/sw_sync
+
chown root system /dev/kmsg
chmod 0620 /dev/kmsg
# Load WIGIG platform driver
exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules msm_11ad_proxy
on init
-
- # Support legacy paths
- symlink /sdcard /mnt/sdcard
- symlink /sdcard /storage/sdcard0
-
# Create cgroup mount point for memory
mkdir /sys/fs/cgroup/memory/bg 0750 root system
write /sys/fs/cgroup/memory/bg/memory.swappiness 140
@@ -64,6 +60,7 @@ on init
on post-fs
chmod 0755 /sys/kernel/debug/tracing
+
on early-boot
# set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864
@@ -71,7 +68,8 @@ on early-boot
write /sys/kernel/boot_adsp/boot 1
write /sys/kernel/boot_cdsp/boot 1
write /sys/kernel/boot_slpi/boot 1
- setprop ro.alarm_boot false
+ exec u:r:qti_init_shell:s0 -- /vendor/bin/init.qcom.early_boot.sh
+ exec u:r:qti_init_shell:s0 -- /vendor/bin/init.qti.can.sh
# for backward compatibility
chown system system /persist/sensors
@@ -84,11 +82,13 @@ on early-boot
chown system system /mnt/vendor/persist/sensors
chown system system /mnt/vendor/persist/sensors/sns.reg
+ chown system system /mnt/vendor/persist/sensors/sensors_list.txt
chown system system /mnt/vendor/persist/sensors/registry
chown system system /mnt/vendor/persist/sensors/registry/registry
chown system system /mnt/vendor/persist/sensors/registry/registry/sensors_registry
chown system system /mnt/vendor/persist/sensors/sensors_settings
chown system system /mnt/vendor/persist/sensors/registry/sns_reg_config
+ chown system system /mnt/vendor/persist/sensors/registry/sns_reg_version
chown system system /mnt/vendor/persist/sensors/registry/config
chmod 0664 /mnt/vendor/persist/sensors/sensors_settings
@@ -106,6 +106,7 @@ on boot
chown system system /sys/kernel/debug/msm_core/enable
chown system system /sys/kernel/debug/msm_core/ptable
chown system system /sys/kernel/boot_slpi/ssr
+ chown system system /sys/kernel/boot_adsp/ssr
chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set
chmod 0660 /sys/module/bluetooth_power/parameters/power
chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
@@ -135,41 +136,11 @@ on boot
mkdir /dev/socket/qmux_gps 0770 gps gps
chmod 2770 /dev/socket/qmux_gps
-
- #define back flash and front flash
- chmod 0660 /sys/android_camera/sensor
- chmod 0660 /sys/class/leds/led:flash_0/brightness
- chmod 0660 /sys/class/leds/led:flash_1/brightness
- chmod 0660 /sys/class/leds/led:flash_2/brightness
- chmod 0660 /sys/class/leds/led:torch_0/brightness
- chmod 0660 /sys/class/leds/led:torch_1/brightness
- chmod 0660 /sys/class/leds/led:torch_2/brightness
- chmod 0660 /sys/class/leds/led:switch_0/brightness
- chmod 0660 /sys/class/leds/led:switch_1/brightness
- chmod 0660 /sys/class/leds/flashlight/brightness
- chown system system /sys/android_camera/sensor
- chown system system /sys/class/leds/led:flash_0/brightness
- chown system system /sys/class/leds/led:flash_1/brightness
- chown system system /sys/class/leds/led:flash_2/brightness
- chown system system /sys/class/leds/led:torch_0/brightness
- chown system system /sys/class/leds/led:torch_1/brightness
- chown system system /sys/class/leds/led:torch_2/brightness
- chown system system /sys/class/leds/led:switch_0/brightness
- chown system system /sys/class/leds/led:switch_1/brightness
- chown system system /sys/class/leds/flashlight/brightness
- chmod 0660 /sys/class/power_supply/battery/input_suspend
- chmod 0660 /sys/class/power_supply/battery/charging_enabled
- chown system system /sys/class/power_supply/battery/input_suspend
- chown system system /sys/class/power_supply/battery/charging_enabled
-
- chmod 0770 /sys/class/power_supply/battery/device/thermalcall
- chown system system /sys/class/power_supply/battery/device/thermalcall
-
mkdir /persist/drm 0770 system system
- mkdir /persist/bluetooth 0770 bluetooth bluetooth
+ mkdir /mnt/vendor/persist/bluetooth 0770 bluetooth bluetooth
mkdir /persist/misc 0770 system system
mkdir /mnt/vendor/persist/alarm 0770 system system
- mkdir /persist/time 0770 system system
+ mkdir /mnt/vendor/persist/time 0770 system system
mkdir /mnt/vendor/persist/secnvm 0770 system system
#Create NETMGR daemon socket area
@@ -184,8 +155,6 @@ on boot
setprop ro.telephony.call_ring.multiple false
- #enable camera read sensors data
- setprop persist.camera.gyro.disable 0
#Remove SUID bit for iproute2 ip tool
chmod 0755 /system/bin/ip
@@ -210,7 +179,7 @@ on boot
# Assign TCP buffer thresholds to be ceiling value of technology maximums
# Increased technology maximums should be reflected here.
- write /proc/sys/net/core/rmem_max 8388608
+ write /proc/sys/net/core/rmem_max 16777216
write /proc/sys/net/core/wmem_max 8388608
# To prevent out of order acknowledgements from making
@@ -221,9 +190,6 @@ on boot
# an ack packet comes out of order
write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
- #Make MTU adjusting for sometimes cannot access to internet
- write /proc/sys/net/ipv4/tcp_mtu_probing 1
-
# Set the console loglevel to < KERN_INFO
# Set the default message loglevel to KERN_INFO
write /proc/sys/kernel/printk "6 6 1 7"
@@ -258,17 +224,17 @@ on boot
chown system system /sys/class/sensors/apds9930-proximity/poll_delay
# Create directory used for display
+ # for backward compatibility
mkdir /persist/display 0770 system graphics
+ mkdir /mnt/vendor/persist/display 0770 system graphics
# Create vpp directory
mkdir /mnt/vendor/persist/vpp 0770 media media
+
# Create hvdcp_opti directory
mkdir /mnt/vendor/persist/hvdcp_opti 0770 root system
- # Create pa-cal driver directory lct-20180914
- mkdir /mnt/vendor/persist/audio 0770 root root
-
# msm specific files that need to be created on /data
on post-fs-data
mkdir /data/vendor/misc 01771 system system
@@ -288,8 +254,8 @@ on post-fs-data
# create QDMA dropbox
mkdir /data/vendor/qdmastats 0700 system system
mkdir /data/vendor/qdma 0770 system system
- mkdir /dev/socket/qdma 0770 system system
- chmod 2770 /dev/socket/qdma
+ mkdir /dev/socket/qdma 0777 system system
+ chmod 2777 /dev/socket/qdma
# Create /data/vendor/tzstorage directory for SFS listener
mkdir /data/vendor/tzstorage 0770 system system
@@ -300,11 +266,8 @@ on post-fs-data
#Create folder of camera
mkdir /data/vendor/camera 0770 camera camera
- mkdir /data/media 0770 media_rw media_rw
- chown media_rw media_rw /data/media
-
- #Create directory for tftp
- mkdir /data/vendor/tombstones 0771 system system
+ #Change ownership to system
+ chown system system /data/vendor/tombstones
mkdir /data/vendor/ramdump 0771 root system
mkdir /data/vendor/bluetooth 0770 bluetooth bluetooth
@@ -370,7 +333,6 @@ on post-fs-data
chown system system /sys/devices/platform/msm_sdcc.4/polling
#Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
- mkdir /data/system 0775 system system
#symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
#Create directories for Location services
@@ -380,6 +342,11 @@ on post-fs-data
mkdir /dev/socket/location 0770 gps gps
mkdir /dev/socket/location/mq 0770 gps gps
mkdir /dev/socket/location/xtra 0770 gps gps
+ mkdir /data/vendor/location-partner 0770 gps gps
+ mkdir /data/vendor/location-partner/dre 0770 gps gps
+ mkdir /data/vendor/location-partner/ppe 0770 gps gps
+ mkdir /dev/socket/location 0770 gps gps
+ mkdir /dev/socket/location/ehub 0770 gps gps
#Create directory from IMS services
mkdir /data/shared 0755
@@ -389,15 +356,9 @@ on post-fs-data
mkdir /data/fota 0771
chown system system /data/fota
- #Create directory for hostapd
- mkdir /data/hostapd 0770 system wifi
-
# Create /data/time folder for time-services
mkdir /data/vendor/time/ 0700 system system
- # Create /data/vendor/diag_logs folder for on-device-logging
- #mkdir /data/vendor/diag_logs 0770 system system
-
setprop vold.post_fs_data_done 1
#Create a folder for SRS to be able to create a usercfg file
@@ -412,6 +373,8 @@ on post-fs-data
chmod 2770 /data/vendor/perfd
rm /data/vendor/perfd/default_values
+ mkdir /data/vendor/secure_element 0777 system system
+
#Create IOP deamon related dirs
mkdir /data/vendor/iop 0700 root system
@@ -432,8 +395,6 @@ on post-fs-data
chown radio radio /data/vendor/radio/db_check_done
chmod 0660 /data/vendor/radio/db_check_done
- copy /vendor/etc/ad_calib.cfg /data/vendor/display/ad_calib.cfg
- chmod 0644 /data/vendor/display/ad_calib.cfg
# qti-logkit data
mkdir /data/vendor/qti-logkit/ 0771 system system
mkdir /data/vendor/qti-logkit/shared-privileged/ 2770 system system
@@ -449,15 +410,13 @@ on post-fs-data
# set aggressive read ahead for dm-0 and dm-1 during boot up
write /sys/block/dm-0/queue/read_ahead_kb 2048
write /sys/block/dm-1/queue/read_ahead_kb 2048
+ write /sys/block/dm-2/queue/read_ahead_kb 2048
# Create vpp directory
mkdir /data/vendor/vpp 0770 media media
- #Create FTM_AP dir for factory test
- mkdir /data/FTM_AP 0775 system system
-
#Create dir for TUI
- mkdir /data/vendor/tui 0600 system drmrpc
+ mkdir /data/vendor/tui 0700 system system
#Start move time data to /data/vendor once post-fs-data done
start vendor.move_time_data
@@ -509,17 +468,17 @@ on property:ro.vendor.iocgrp.config=1
write /dev/blkio/blkio.weight 1000
write /dev/blkio/bg/blkio.weight 100
-on property:persist.sys.ssr.enable_debug=*
- write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
+on property:persist.vendor.sys.ssr.enable_debug=*
+ write /sys/module/subsystem_restart/parameters/enable_debug ${persist.vendor.sys.ssr.enable_debug}
-on property:persist.sys.mba_boot_timeout=*
- write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
+on property:persist.vendor.sys.mba_boot_timeout=*
+ write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.vendor.sys.mba_boot_timeout}
-on property:persist.sys.modem_auth_timeout=*
- write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
+on property:persist.vendor.sys.modem_auth_timeout=*
+ write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.vendor.sys.modem_auth_timeout}
-on property:persist.sys.pil_proxy_timeout=*
- write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
+on property:persist.vendor.sys.pil_proxy_timeout=*
+ write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.vendor.sys.pil_proxy_timeout}
on property:persist.vendor.ssr.restart_level=*
start vendor.ssr_setup
@@ -586,10 +545,15 @@ service qcom-c_main-sh /vendor/bin/init.class_main.sh
user root
oneshot
+service qcom-c_late-sh /vendor/bin/init.class_late.sh
+ class late_start
+ user root
+ oneshot
+
on property:vold.decrypt=trigger_restart_framework
start qcom-c_main-sh
- start config_bt_addr
start wcnss-service
+ start qcom-c_late-sh
on property:persist.env.fastdorm.enabled=true
setprop persist.radio.data_no_toggle 1
@@ -604,11 +568,11 @@ service dpmQmiMgr /system/vendor/bin/dpmQmiMgr
user system
group system
-service vendor.qrtr-ns /vendor/bin/qrtr-ns -f -i 1
+service vendor.qrtr-ns /vendor/bin/qrtr-ns -f
class core
- user system
- group system net_admin
- capabilities NET_BIND_SERVICE NET_ADMIN
+ user vendor_qrtr
+ group vendor_qrtr
+ capabilities NET_BIND_SERVICE
service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
class core
@@ -768,6 +732,14 @@ service vendor.wigig_supplicant /vendor/bin/hw/wpa_supplicant \
disabled
oneshot
+# Data Migration
+service vendor.move_wifi_data /system/bin/move_wifi_data.sh
+ class main
+ user wifi
+ group wifi
+ disabled
+ oneshot
+
# FST Manager with hostapd (softap) - all settings inside ini file
service fstman /vendor/bin/fstman -B -ddd -c /data/vendor/wifi/fstman.ini -a 1
user wifi
@@ -847,9 +819,9 @@ service iprenew_wigig0 /system/bin/dhcpcd -n
service ptt_socket_app /system/vendor/bin/ptt_socket_app -d
class main
- user root
- group root
- disabled
+ user wifi
+ group wifi system inet net_admin
+ capabilities NET_ADMIN
oneshot
service ptt_ffbm /system/vendor/bin/ptt_socket_app -f -d
@@ -868,45 +840,6 @@ service wifi_ftmd /system/vendor/bin/wifi_ftmd
on property:vendor.wifi.ftmd.load=true
insmod /system/lib/modules/pronto/pronto_wlan.ko con_mode=5
-service vendor.cnss_diag /system/vendor/bin/cnss_diag -q -f
- class late_start
- user system
- group system wifi inet net_admin sdcard_rw media_rw diag
- disabled
- oneshot
-
-service vendor.tcpdump /vendor/bin/tcpdump -i any -W 2 -C 2 -s 134 -w /data/vendor/wlan_logs/tcpdump.pcap
- class main
- user root
- group root wifi
- disabled
- oneshot
-
-service sniffer /vendor/bin/tcpdump -i wlan0 -w /sdcard/wlan_logs/sniffer.pcap
- class main
- user root
- group root
- disabled
- oneshot
-
-on property:sys.user.0.ce_available=true
- start vendor.cnss_diag
- start vendor.tcpdump
-
-service startpktlog /system/bin/iwpriv wlan0 pktlog 1
- class main
- user root
- group root
- disabled
- oneshot
-
-service stoppktlog /system/bin/iwpriv wlan0 pktlog 0
- class main
- user root
- group root
- disabled
- oneshot
-
on property:persist.vendor.data.shs_ko_load=1
exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules rmnet_shs
@@ -926,6 +859,7 @@ service cnss-daemon /system/vendor/bin/cnss-daemon -n -l
capabilities NET_ADMIN
on property:sys.shutdown.requested=*
+ write /sys/kernel/shutdown_wlan/shutdown 1
stop cnss-daemon
service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
@@ -956,6 +890,11 @@ service mlid /vendor/bin/mlid
group gps
socket mlid stream 0666 gps gps
+service vendor.qdmastatsd /system/vendor/bin/qdmastatsd
+ class late_start
+ user system
+ group readproc system net_bw_stats radio vendor_rfs_shared
+
service loc_launcher /system/vendor/bin/loc_launcher
class late_start
user gps
@@ -1035,6 +974,7 @@ service vendor.atfwd /vendor/bin/ATFWD-daemon
class late_start
user system
group system radio
+ disabled
service hostapd_fst /vendor/bin/hw/hostapd -dd -g /data/vendor/wifi/hostapd/global
interface android.hardware.wifi.hostapd@1.0::IHostapd default
@@ -1127,19 +1067,27 @@ on property:sys.qbcharger.enable=true
on property:sys.qbcharger.enable=false
stop qbcharger
+service diag_mdlog_start /system/vendor/bin/diag_mdlog
+ class late_start
+ user shell
+ group system oem_2901 sdcard_rw sdcard_r media_rw
+ disabled
+ oneshot
-on property:persist.vendor.mdlog.enable=true
- start diag_mdlog_start
-on property:persist.vendor.mdlog.enable=false
- start diag_mdlog_stop
+service diag_mdlog_stop /system/vendor/bin/diag_mdlog -k
+ class late_start
+ user shell
+ group system oem_2901 sdcard_rw sdcard_r media_rw
+ disabled
+ oneshot
service qlogd /system/xbin/qlogd
socket qlogd stream 0662 system system
class main
disabled
-on property:persist.vendor.qlogd=1
+on property:persist.sys.qlogd=1
start qlogd
-on property:persist.vendor.qlogd=0
+on property:persist.sys.qlogd=0
stop qlogd
service vm_bms /vendor/bin/vm_bms
@@ -1172,23 +1120,6 @@ service vendor.LKCore-dbg /vendor/bin/LKCore
disabled
user root
group root system log diag net_raw
-service sdlog /system/bin/sdlog
- class late_start
- user root
- disabled
- oneshot
-
-on property:sys.logd_t2.enable=1
- start sdlog
-
-on property:sys.logd.enable=1
- start sdlog
-
-on property:persist.vendor.logd.enable=1
- start sdlog
-on property:persist.vendor.logd.enable=0
- setprop vendor.sdlog.run 0
- stop sdlog
# service for USER
service vendor.LKCore-rel /vendor/bin/LKCore
@@ -1221,34 +1152,10 @@ service poweroffhandler /system/vendor/bin/poweroffhandler
disabled
oneshot
-on property:init.svc.surfaceflinger=restarting
- stop vendor.hwcomposer-2-1
- start vendor.hwcomposer-2-1
on property:vendor.display.lcd_density=*
setprop ro.sf.lcd_density ${vendor.display.lcd_density}
-# Logcat dump daemon, dumps logs to logdump partition
-service logdumpd /system/bin/logcat -b all -v threadtime -D -w /dev/block/bootdevice/by-name/logdump
- class core
- writepid /dev/cpuset/system-background/tasks
- seclabel u:r:logdumpd:s0
- disabled
-
-# Logdumpd is enabled only for userdebug non-perf build
-on property:ro.logdumpd.enabled=1
- start logdumpd
-
-service time_daemon /system/vendor/bin/time_daemon
- class main
- user root
- group root
-
-service vendor.qdmastatsd /system/vendor/bin/qdmastatsd
- class late_start
- user system
- group readproc system net_bw_stats radio vendor_rfs_shared
-
service vendor.vppservice /vendor/bin/vppservice
class main
user media
@@ -1266,11 +1173,7 @@ service seemp_healthd /vendor/bin/seemp_healthd
user system
group system
-#ant check change permission
- chown system system /sys/class/ant_class/ant_state
- chmod 0644 /sys/class/ant_class/ant_state
-
-service power_off_alarm /vendor/bin/power_off_alarm
+service vendor.power_off_alarm /vendor/bin/power_off_alarm
class core
group system
disabled
@@ -1297,11 +1200,9 @@ service chre /vendor/bin/chre
socket chre seqpacket 0660 root system
shutdown critical
-service config_bt_addr /vendor/bin/btnvtool -O
- class core
- user bluetooth
- group bluetooth radio
- oneshot
+
+on property:vendor.chre.enabled=0
+ stop chre
service bugreport /system/bin/dumpstate -d -p -B -z -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
class main
@@ -1309,6 +1210,40 @@ service bugreport /system/bin/dumpstate -d -p -B -z -o /data/user_de/0/com.andro
oneshot
keycodes 114 115 116
-#workaround for camera HAL can not read sys property
-on property:sys.camera.face.unlock=*
- setprop vendor.camera.face.unlock ${sys.camera.face.unlock}
+#Set GPU Opengles version
+on property:vendor.opengles.version=*
+ setprop ro.opengles.version ${vendor.opengles.version}
+
+#Set gpu available frequencies property
+on property:vendor.gpu.available_frequencies=*
+ setprop ro.vendor.gpu.available_frequencies ${vendor.gpu.available_frequencies}
+
+service vendor.wifilearner /system/vendor/bin/wifilearner
+ class main
+ user wifi
+ group wifi
+ oneshot
+
+service vendor.audio-hal-2-0 /vendor/bin/hw/android.hardware.audio@2.0-service
+ override
+ class hal
+ user audioserver
+ # media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
+ group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock system
+ capabilities BLOCK_SUSPEND
+ ioprio rt 4
+ writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
+ # audioflinger restarts itself when it loses connection with the hal
+ # and its .rc file has an "onrestart restart audio-hal" rule, thus
+ # an additional auto-restart from the init process isn't needed.
+ oneshot
+ interface android.hardware.audio@4.0::IDevicesFactory default
+ interface android.hardware.audio@2.0::IDevicesFactory default
+
+service vendor.contexthub-hal-1-0 /vendor/bin/hw/android.hardware.contexthub@1.0-service
+ override
+ class hal
+ interface android.hardware.contexthub@1.0::IContexthub default
+ user system
+ group system
+ disabled
diff --git a/rootdir/etc/init.qcom.usb.rc b/rootdir/etc/init.qcom.usb.rc
index 7737741..cd85142 100755..100644
--- a/rootdir/etc/init.qcom.usb.rc
+++ b/rootdir/etc/init.qcom.usb.rc
@@ -102,9 +102,8 @@ on boot
mkdir /dev/usb-ffs/adb 0770 shell system
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=1000,rmode=0770,fmode=0660
write /sys/class/android_usb/android0/f_ffs/aliases adb
+ setprop sys.usb.mtp.device_type 2
setprop vendor.usb.controller ${sys.usb.controller}
-
-on load_persist_props_action
enable vendor.qcom-usb-sh
service vendor.qcom-usb-sh /vendor/bin/init.qcom.usb.sh
diff --git a/rootdir/etc/ueventd.qcom.rc b/rootdir/etc/ueventd.qcom.rc
index dde621b..dc9d34e 100644
--- a/rootdir/etc/ueventd.qcom.rc
+++ b/rootdir/etc/ueventd.qcom.rc
@@ -1,4 +1,4 @@
-# Copyright (c) 2012-2015, 2017-2018, The Linux Foundation. All rights reserved.
+# Copyright (c) 2012-2015, 2017-2019, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -55,7 +55,9 @@ firmware_directories /vendor/firmware_mnt/image/
/dev/dpl_ctrl 0660 usb usb
/dev/ipa_odl_ctl 0660 radio radio
/dev/ipa_adpl 0660 system oem_2905
-/dev/spidev7.1 0660 system system
+/dev/hab 0666 system system
+/dev/synx_device 0660 root camera
+
#permissions for CSVT
/dev/smd11 0660 radio radio
@@ -137,6 +139,7 @@ firmware_directories /vendor/firmware_mnt/image/
/dev/sec_nvm_* 0660 system system
/dev/cryptoapp 0660 system system
/dev/spdaemon_ssr 0660 system system
+/dev/cam-hyp-intf* 0660 system camera
/dev/gemini0 0660 system camera
/dev/jpeg0 0660 system camera
/dev/jpeg1 0660 system camera
@@ -146,24 +149,12 @@ firmware_directories /vendor/firmware_mnt/image/
/dev/adsprpc-smd-secure 0644 system system
/dev/system_health_monitor 0644 radio system
/dev/mdss_rotator 0664 system system
+/dev/cpu_dma_latency 0660 root system
#QDSS
/dev/byte-cntr 0660 system oem_2902
-# fpc fingerprint
-/sys/devices/soc/soc:fpc1020* hw_reset 0660 system system
-/sys/devices/soc/soc:fpc1020* irq 0660 system system
-/sys/devices/soc/soc:fpc1020* wakeup_enable 0660 system system
-/sys/devices/soc/soc:fpc1020* fingerdown_wait 0220 system system
-
-/sys/class/leds/red delay_on 0640 system system
-/sys/class/leds/red delay_off 0640 system system
-/sys/class/leds/red breath 0640 system system
-/sys/class/leds/green delay_on 0640 system system
-/sys/class/leds/green delay_off 0640 system system
-/sys/class/leds/green breath 0640 system system
-/sys/class/leds/blue delay_on 0640 system system
-/sys/class/leds/blue delay_off 0640 system system
-/sys/class/leds/blue breath 0640 system system
+/dev/mhi_qdss 0660 system oem_2902
+/sys/class/qdss_bridge/mhi_qdss mode 0660 system oem_2902
# wlan
/dev/wcnss_wlan 0660 system system
@@ -171,6 +162,7 @@ firmware_directories /vendor/firmware_mnt/image/
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/wlan0/queues/rx-* rps_cpus 0660 system system
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/p2p0/queues/rx-* rps_cpus 0660 system system
/dev/spidev0.0 0660 system audio
+/dev/i2c-7 0660 system audio
/dev/msm_camera/* 0660 system camera
/dev/gemini/ 0660 system camera
/dev/mercury0 0660 system camera
@@ -222,6 +214,7 @@ firmware_directories /vendor/firmware_mnt/image/
/dev/ttyGS0 0660 system system
/dev/i2c-5 0660 media media
/dev/avtimer 0660 system audio
+/dev/spidev2.0 0660 system audio
# DVB devices
/dev/dvb/adapter0/demux* 0440 media media
@@ -268,6 +261,26 @@ firmware_directories /vendor/firmware_mnt/image/
/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch 0440 system drmrpc
/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch_enable 0660 system drmrpc
+# native sensors input
+/sys/devices/virtual/input/input* enable_int 0660 system input
+/sys/devices/virtual/input/input* gyro_op_mode 0660 system input
+/sys/devices/virtual/input/input* acc_range 0660 system input
+/sys/devices/virtual/input/input* acc_value 0660 system input
+/sys/devices/virtual/input/input* gyro_odr 0660 system input
+/sys/devices/virtual/input/input* fifo_data_sel 0660 system input
+/sys/devices/virtual/input/input* fifo_watermark 0660 system input
+/sys/devices/virtual/input/input* enable 0660 system input
+/sys/devices/virtual/input/input* acc_odr 0660 system input
+/sys/devices/virtual/input/input* temperature 0660 system input
+/sys/devices/virtual/input/input* acc_op_mode 0660 system input
+/sys/devices/virtual/input/input* fifo_bytecount 0660 system input
+/sys/devices/virtual/input/input* gyro_range 0660 system input
+/sys/devices/virtual/input/input* gyro_value 0660 system input
+
+# GNSS PPS Device premissions
+/dev/pps* 0660 gps gps
+/dev/gnss_sirf 0660 gps gps
+
# laser sensor access
/sys/devices/virtual/input/input* enable_ps_sensor 0660 system input
/sys/devices/virtual/input/input* set_delay_ms 0660 system input
@@ -325,6 +338,8 @@ firmware_directories /vendor/firmware_mnt/image/
/dev/block/platform/soc/c0c4000.sdhci/by-name/frp 0600 system system
/dev/block/platform/soc/1d84000.ufshc/by-name/frp 0600 system system
/dev/block/platform/soc/7c4000.sdhci/by-name/frp 0600 system system
+/dev/block/platform/soc/4744000.sdhci/by-name/frp 0600 system system
+/dev/block/platform/soc/4804000.ufshc/by-name/frp 0600 system system
# This is temporary while using SD card for initial bring-up
/dev/block/platform/soc/8804000.sdhci/by-name/frp 0600 system system
@@ -350,3 +365,43 @@ firmware_directories /vendor/firmware_mnt/image/
/sys/class/dual_role_usb/* data_role 0660 system system
/sys/class/dual_role_usb/* power_role 0660 system system
/sys/class/dual_role_usb/* mode 0660 system system
+
+#Memory Offline
+/sys/devices/system/memory/memory* state 0660 system system
+
+# sys-fs display
+/sys/class/graphics/fb* hpd 0664 system graphics
+/sys/class/graphics/fb* res_info 0664 system graphics
+/sys/class/graphics/fb* vendor_name 0664 system graphics
+/sys/class/graphics/fb* product_description 0664 system graphics
+/sys/class/graphics/fb* video_mode 0664 system graphics
+/sys/class/graphics/fb* format_3d 0664 system graphics
+/sys/class/graphics/fb* s3d_mode 0664 system graphics
+/sys/class/graphics/fb* dynamic_fps 0664 system graphics
+/sys/class/graphics/fb* msm_fb_dfps_mode 0664 system graphics
+/sys/class/graphics/fb* hdr_stream 0664 system graphics
+/sys/class/graphics/fb* cec/enable 0664 system graphics
+/sys/class/graphics/fb* cec/logical_addr 0664 system graphics
+/sys/class/graphics/fb* cec/rd_msg 0664 system graphics
+/sys/class/graphics/fb* pa 0664 system graphics
+/sys/class/graphics/fb* cec/wr_msg 0600 system graphics
+/sys/class/graphics/fb* hdcp/tp 0664 system graphics
+/sys/class/graphics/fb* hdcp2p2/min_level_change 0660 system graphics
+/sys/class/graphics/fb* hdmi_audio_cb 0600 audioserver audio
+
+/sys/class/graphics/fb* lineptr_value 0664 system graphics
+/sys/class/graphics/fb* msm_fb_persist_mode 0664 system graphics
+
+/sys/class/graphics/fb0 idle_time 0664 system graphics
+/sys/class/graphics/fb0 dynamic_fps 0664 system graphics
+/sys/class/graphics/fb0 dyn_pu 0664 system graphics
+/sys/class/graphics/fb0 modes 0664 system graphics
+/sys/class/graphics/fb0 mode 0664 system graphics
+/sys/class/graphics/fb0 msm_cmd_autorefresh_en 0664 system graphics
+/sys/class/graphics/fb0 dynamic_bitclk 0664 system graphics
+
+/sys/devices/virtual/hdcp/msm_hdcp min_level_change 0664 system graphics
+
+#QG device
+/dev/qg 0660 system system
+/dev/qg_battery 0660 system system