Init sm8650-common vendor

This commit is contained in:
SaschaNes
2025-08-03 10:24:58 +02:00
commit 62d4151397
580 changed files with 29848 additions and 0 deletions

BIN
proprietary/vendor/bin/ATFWD-daemon vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/adpl vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/adsprpcd vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/audioadsprpcd vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/cdsprpcd vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/cnss-daemon vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/diag-router vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/dspservice vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/factory.ssc vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/hermesd vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
proprietary/vendor/bin/hw/rild vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,439 @@
#=============================================================================
# Copyright (c) 2022-2023 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
#
# 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:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
rev=`cat /sys/devices/soc0/revision`
# Configure RT parameters:
# Long running RT task detection is confined to consolidated builds.
# Set RT throttle runtime to 50ms more than long running RT
# task detection time.
# Set RT throttle period to 100ms more than RT throttle runtime.
long_running_rt_task_ms=1200
sched_rt_runtime_ms=`expr $long_running_rt_task_ms + 50`
sched_rt_runtime_us=`expr $sched_rt_runtime_ms \* 1000`
sched_rt_period_ms=`expr $sched_rt_runtime_ms + 100`
sched_rt_period_us=`expr $sched_rt_period_ms \* 1000`
echo $sched_rt_period_us > /proc/sys/kernel/sched_rt_period_us
echo $sched_rt_runtime_us > /proc/sys/kernel/sched_rt_runtime_us
if [ -d /proc/sys/walt ]; then
# configure maximum frequency when CPUs are partially halted
echo 1190400 > /proc/sys/walt/sched_max_freq_partial_halt
# Core Control Paramters for Silvers
echo 0xFF > /sys/devices/system/cpu/cpu0/core_ctl/nrrun_cpu_mask
echo 0x00 > /sys/devices/system/cpu/cpu0/core_ctl/nrrun_cpu_misfit_mask
echo 0x00 > /sys/devices/system/cpu/cpu0/core_ctl/assist_cpu_mask
echo 0x00 > /sys/devices/system/cpu/cpu0/core_ctl/assist_cpu_misfit_mask
# Core control parameters for gold
echo 3 > /sys/devices/system/cpu/cpu2/core_ctl/min_cpus
echo 60 > /sys/devices/system/cpu/cpu2/core_ctl/busy_up_thres
echo 30 > /sys/devices/system/cpu/cpu2/core_ctl/busy_down_thres
echo 100 > /sys/devices/system/cpu/cpu2/core_ctl/offline_delay_ms
echo 3 > /sys/devices/system/cpu/cpu2/core_ctl/task_thres
echo 0 0 0 > /sys/devices/system/cpu/cpu2/core_ctl/not_preferred
echo 0xFC > /sys/devices/system/cpu/cpu2/core_ctl/nrrun_cpu_mask
echo 0x63 > /sys/devices/system/cpu/cpu2/core_ctl/nrrun_cpu_misfit_mask
echo 0x00 > /sys/devices/system/cpu/cpu2/core_ctl/assist_cpu_mask
echo 0x00 > /sys/devices/system/cpu/cpu2/core_ctl/assist_cpu_misfit_mask
# Core control parameters for titaniums
echo 0 > /sys/devices/system/cpu/cpu5/core_ctl/min_cpus
echo 2 > /sys/devices/system/cpu/cpu5/core_ctl/min_partial_cpus
echo 60 > /sys/devices/system/cpu/cpu5/core_ctl/busy_up_thres
echo 30 > /sys/devices/system/cpu/cpu5/core_ctl/busy_down_thres
echo 100 > /sys/devices/system/cpu/cpu5/core_ctl/offline_delay_ms
echo 2 > /sys/devices/system/cpu/cpu5/core_ctl/task_thres
echo 1 1 > /sys/devices/system/cpu/cpu5/core_ctl/not_preferred
echo 0xE0 > /sys/devices/system/cpu/cpu5/core_ctl/nrrun_cpu_mask
echo 0x00 > /sys/devices/system/cpu/cpu5/core_ctl/nrrun_cpu_misfit_mask
echo 0x1C > /sys/devices/system/cpu/cpu5/core_ctl/assist_cpu_mask
echo 0x03 > /sys/devices/system/cpu/cpu5/core_ctl/assist_cpu_misfit_mask
# Core control parameters for gold+
echo 0 > /sys/devices/system/cpu/cpu7/core_ctl/min_cpus
echo 60 > /sys/devices/system/cpu/cpu7/core_ctl/busy_up_thres
echo 30 > /sys/devices/system/cpu/cpu7/core_ctl/busy_down_thres
echo 100 > /sys/devices/system/cpu/cpu7/core_ctl/offline_delay_ms
echo 1 > /sys/devices/system/cpu/cpu7/core_ctl/task_thres
echo 1 > /sys/devices/system/cpu/cpu7/core_ctl/not_preferred
echo 0x80 > /sys/devices/system/cpu/cpu7/core_ctl/nrrun_cpu_mask
echo 0x7C > /sys/devices/system/cpu/cpu7/core_ctl/nrrun_cpu_misfit_mask
echo 0x7C > /sys/devices/system/cpu/cpu7/core_ctl/assist_cpu_mask
echo 0x03 > /sys/devices/system/cpu/cpu7/core_ctl/assist_cpu_misfit_mask
echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable
echo 0 > /sys/devices/system/cpu/cpu2/core_ctl/enable
echo 1 > /sys/devices/system/cpu/cpu5/core_ctl/enable
echo 1 > /sys/devices/system/cpu/cpu7/core_ctl/enable
# Configure Single Boost Thread
echo 0 > /proc/sys/walt/sched_sbt_delay_windows
echo 0x60 > /proc/sys/walt/sched_sbt_pause_cpus
# Setting b.L scheduler parameters
echo 95 95 95 > /proc/sys/walt/sched_upmigrate
echo 85 85 85 > /proc/sys/walt/sched_downmigrate
echo 80 > /proc/sys/walt/sched_group_downmigrate
echo 90 > /proc/sys/walt/sched_group_upmigrate
echo 1 > /proc/sys/walt/sched_walt_rotate_big_tasks
echo 400000000 > /proc/sys/walt/sched_coloc_downmigrate_ns
echo 16000000 16000000 16000000 16000000 16000000 16000000 16000000 5000000 > /proc/sys/walt/sched_coloc_busy_hyst_cpu_ns
echo 248 > /proc/sys/walt/sched_coloc_busy_hysteresis_enable_cpus
echo 10 10 10 10 10 10 10 95 > /proc/sys/walt/sched_coloc_busy_hyst_cpu_busy_pct
echo 8500000 8500000 8500000 8500000 8500000 8500000 8500000 2000000 > /proc/sys/walt/sched_util_busy_hyst_cpu_ns
echo 255 > /proc/sys/walt/sched_util_busy_hysteresis_enable_cpus
echo 1 1 1 1 1 1 1 15 > /proc/sys/walt/sched_util_busy_hyst_cpu_util
echo 40 > /proc/sys/walt/sched_cluster_util_thres_pct
echo 0 30 30 30 > /proc/sys/walt/sched_idle_enough_clust
echo 10 > /proc/sys/walt/sched_ed_boost
#Set early upmigrate tunables
freq_to_migrate=1248000
silver_fmax=`cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq`
silver_early_upmigrate=`expr 1024 \* $silver_fmax / $freq_to_migrate`
silver_early_downmigrate=`expr \( 1024 \* $silver_fmax \) / \( \( \( 10 \* $freq_to_migrate \) - $silver_fmax \) \/ 10 \)`
sched_upmigrate=`cat /proc/sys/walt/sched_upmigrate`
sched_downmigrate=`cat /proc/sys/walt/sched_downmigrate`
sched_upmigrate=${sched_upmigrate:0:2}
sched_downmigrate=${sched_downmigrate:0:2}
gold_early_upmigrate=`expr \( 1024 \* 100 \) \/ $sched_upmigrate`
gold_early_downmigrate=`expr \( 1024 \* 100 \) \/ $sched_downmigrate`
echo $silver_early_downmigrate $gold_early_downmigrate $gold_early_downmigrate > /proc/sys/walt/sched_early_downmigrate
echo $silver_early_upmigrate $gold_early_upmigrate $gold_early_upmigrate > /proc/sys/walt/sched_early_upmigrate
# Enable Gold CPUs for pipeline
echo 28 > /proc/sys/walt/sched_pipeline_cpus
# set the threshold for low latency task boost feature which prioritize
# binder activity tasks
echo 325 > /proc/sys/walt/walt_low_latency_task_threshold
# configure maximum frequency of silver cluster when load is not detected and ensure that
# other clusters' fmax remains uncapped by setting the frequency to S32_MAX
# enable smart fmax for silver
echo 1804800 2147483647 2147483647 2147483647 > /proc/sys/walt/sched_fmax_cap
# set c1dcvs parameter
chown system.system /sys/devices/system/cpu/c1dcvs/enable_c1dcvs
chmod 0660 /sys/devices/system/cpu/c1dcvs/enable_c1dcvs
chown system.system /sys/devices/system/cpu/c1dcvs/efreq_thresh
chmod 0660 /sys/devices/system/cpu/c1dcvs/efreq_thresh
echo 0 > /sys/devices/system/cpu/c1dcvs/enable_c1dcvs
echo 2 1400000 > /sys/devices/system/cpu/c1dcvs/efreq_thresh
echo 3 1400000 > /sys/devices/system/cpu/c1dcvs/efreq_thresh
echo 4 1400000 > /sys/devices/system/cpu/c1dcvs/efreq_thresh
echo 1 > /sys/devices/system/cpu/c1dcvs/enable_c1dcvs
# Turn off scheduler boost at the end
echo 0 > /proc/sys/walt/sched_boost
# configure input boost settings
if [ $rev == "1.0" ] || [ $rev == "1.1" ]; then
echo 0 0 0 0 0 0 0 0 > /proc/sys/walt/input_boost/input_boost_freq
else
echo 0 0 0 0 0 0 0 0 > /proc/sys/walt/input_boost/input_boost_freq
fi
echo 0 > /proc/sys/walt/input_boost/input_boost_ms
echo "walt" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo "walt" > /sys/devices/system/cpu/cpufreq/policy2/scaling_governor
echo "walt" > /sys/devices/system/cpu/cpufreq/policy5/scaling_governor
echo "walt" > /sys/devices/system/cpu/cpufreq/policy7/scaling_governor
echo 0 > /sys/devices/system/cpu/cpufreq/policy0/walt/down_rate_limit_us
echo 0 > /sys/devices/system/cpu/cpufreq/policy0/walt/up_rate_limit_us
echo 0 > /sys/devices/system/cpu/cpufreq/policy2/walt/down_rate_limit_us
echo 0 > /sys/devices/system/cpu/cpufreq/policy2/walt/up_rate_limit_us
echo 0 > /sys/devices/system/cpu/cpufreq/policy5/walt/down_rate_limit_us
echo 0 > /sys/devices/system/cpu/cpufreq/policy5/walt/up_rate_limit_us
echo 0 > /sys/devices/system/cpu/cpufreq/policy7/walt/down_rate_limit_us
echo 0 > /sys/devices/system/cpu/cpufreq/policy7/walt/up_rate_limit_us
echo 1 > /sys/devices/system/cpu/cpufreq/policy0/walt/pl
echo 1 > /sys/devices/system/cpu/cpufreq/policy2/walt/pl
echo 1 > /sys/devices/system/cpu/cpufreq/policy5/walt/pl
echo 1 > /sys/devices/system/cpu/cpufreq/policy7/walt/pl
echo 787200 > /sys/devices/system/cpu/cpufreq/policy0/walt/rtg_boost_freq
echo 844800 > /sys/devices/system/cpu/cpufreq/policy2/walt/rtg_boost_freq
echo 844800 > /sys/devices/system/cpu/cpufreq/policy5/walt/rtg_boost_freq
echo 902400 > /sys/devices/system/cpu/cpufreq/policy7/walt/rtg_boost_freq
if [ $rev == "1.0" ] || [ $rev == "1.1" ]; then
echo 1344000 > /sys/devices/system/cpu/cpufreq/policy0/walt/hispeed_freq
echo 1612800 > /sys/devices/system/cpu/cpufreq/policy2/walt/hispeed_freq
echo 1612800 > /sys/devices/system/cpu/cpufreq/policy5/walt/hispeed_freq
echo 1555200 > /sys/devices/system/cpu/cpufreq/policy7/walt/hispeed_freq
else
echo 1344000 > /sys/devices/system/cpu/cpufreq/policy0/walt/hispeed_freq
echo 1612800 > /sys/devices/system/cpu/cpufreq/policy2/walt/hispeed_freq
echo 1612800 > /sys/devices/system/cpu/cpufreq/policy5/walt/hispeed_freq
echo 1593600 > /sys/devices/system/cpu/cpufreq/policy7/walt/hispeed_freq
fi
else
echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy2/scaling_governor
echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy5/scaling_governor
echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy7/scaling_governor
echo 1 > /proc/sys/kernel/sched_pelt_multiplier
fi
if [ $rev == "1.0" ] || [ $rev == "1.1" ]; then
echo 556800 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
echo 576000 > /sys/devices/system/cpu/cpufreq/policy2/scaling_min_freq
echo 576000 > /sys/devices/system/cpu/cpufreq/policy5/scaling_min_freq
echo 729600 > /sys/devices/system/cpu/cpufreq/policy7/scaling_min_freq
else
echo 556800 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
echo 614400 > /sys/devices/system/cpu/cpufreq/policy2/scaling_min_freq
echo 499200 > /sys/devices/system/cpu/cpufreq/policy5/scaling_min_freq
echo 672000 > /sys/devices/system/cpu/cpufreq/policy7/scaling_min_freq
fi
# Reset the RT boost, which is 1024 (max) by default.
echo 0 > /proc/sys/kernel/sched_util_clamp_min_rt_default
# disable min util condition for boost
echo 0 > /proc/sys/walt/sched_min_task_util_for_boost
echo 0 > /proc/sys/walt/sched_min_task_util_for_colocation
echo 0 > /proc/sys/walt/sched_min_task_util_for_uclamp
# cpuset parameters
echo 0-1 5-6 > /dev/cpuset/background/cpus
echo 0-1 5-6 > /dev/cpuset/system-background/cpus
# configure bus-dcvs
bus_dcvs="/sys/devices/system/cpu/bus_dcvs"
for device in $bus_dcvs/*
do
cat $device/hw_min_freq > $device/boost_freq
done
for ubwcpbw in $bus_dcvs/UBWCP/*bwmon-ubwcp
do
echo "5931 7980 10437 16113" > $ubwcpbw/mbps_zones
echo 4 > $ubwcpbw/sample_ms
echo 80 > $ubwcpbw/io_percent
echo 20 > $ubwcpbw/hist_memory
echo 5 > $ubwcpbw/hyst_length
echo 1 > $ubwcpbw/idle_length
echo 30 > $ubwcpbw/down_thres
echo 0 > $ubwcpbw/guard_band_mbps
echo 250 > $ubwcpbw/up_scale
echo 1600 > $ubwcpbw/idle_mbps
echo 710000 > $ubwcpbw/max_freq
echo 40 > $ubwcpbw/window_ms
done
for llccbw in $bus_dcvs/LLCC/*bwmon-llcc
do
echo "4577 7110 9155 12298 14236 16265" > $llccbw/mbps_zones
echo 4 > $llccbw/sample_ms
echo 80 > $llccbw/io_percent
echo 20 > $llccbw/hist_memory
echo 5 > $llccbw/hyst_length
echo 1 > $llccbw/idle_length
echo 30 > $llccbw/down_thres
echo 0 > $llccbw/guard_band_mbps
echo 250 > $llccbw/up_scale
echo 1600 > $llccbw/idle_mbps
echo 806000 > $llccbw/max_freq
echo 40 > $llccbw/window_ms
done
for ddrbw in $bus_dcvs/DDR/*bwmon-ddr
do
echo "2086 5931 7980 10437 12157 14060 16113" > $ddrbw/mbps_zones
echo 4 > $ddrbw/sample_ms
echo 80 > $ddrbw/io_percent
echo 20 > $ddrbw/hist_memory
echo 5 > $ddrbw/hyst_length
echo 1 > $ddrbw/idle_length
echo 30 > $ddrbw/down_thres
echo 0 > $ddrbw/guard_band_mbps
echo 250 > $ddrbw/up_scale
echo 1600 > $ddrbw/idle_mbps
echo 2736000 > $ddrbw/max_freq
echo 40 > $ddrbw/window_ms
done
for latfloor in $bus_dcvs/*/*latfloor
do
echo 25000 > $latfloor/ipm_ceil
done
for l3gold in $bus_dcvs/L3/*gold
do
echo 4000 > $l3gold/ipm_ceil
done
for l3prime in $bus_dcvs/L3/*prime
do
echo 20000 > $l3prime/ipm_ceil
done
for qosgold in $bus_dcvs/DDRQOS/*gold
do
echo 50 > $qosgold/ipm_ceil
done
for qosprime in $bus_dcvs/DDRQOS/*prime
do
echo 100 > $qosprime/ipm_ceil
done
for ddrprime in $bus_dcvs/DDR/*prime
do
echo 25 > $ddrprime/freq_scale_pct
echo 1500 > $ddrprime/freq_scale_floor_mhz
echo 2726 > $ddrprime/freq_scale_ceil_mhz
done
# Permission for video hint
chown root.system /sys/devices/system/cpu/cpufreq/policy0/walt/hispeed_freq
chmod 0660 /sys/devices/system/cpu/cpufreq/policy0/walt/hispeed_freq
chown root.system /sys/devices/system/cpu/cpufreq/policy0/walt/rtg_boost_freq
chmod 0660 /sys/devices/system/cpu/cpufreq/policy0/walt/rtg_boost_freq
chown root.system /sys/devices/system/cpu/cpufreq/policy0/walt/pl
chmod 0660 /sys/devices/system/cpu/cpufreq/policy0/walt/pl
echo s2idle > /sys/power/mem_sleep
echo N > /sys/devices/system/cpu/qcom_lpm/parameters/sleep_disabled
model_name=`getprop ro.product.device`
if [ $model_name == "b6q" ]; then
echo 608 > /sys/devices/system/cpu/cpufreq/policy0/walt/target_load_thresh
echo 837 > /sys/devices/system/cpu/cpufreq/policy2/walt/target_load_thresh
echo 891 > /sys/devices/system/cpu/cpufreq/policy5/walt/target_load_thresh
echo 806 > /sys/devices/system/cpu/cpufreq/policy7/walt/target_load_thresh
echo 15000 > /sys/devices/system/cpu/cpufreq/policy0/walt/up_rate_limit_us
echo 15000 > /sys/devices/system/cpu/cpufreq/policy2/walt/up_rate_limit_us
echo 15000 > /sys/devices/system/cpu/cpufreq/policy5/walt/up_rate_limit_us
echo 15000 > /sys/devices/system/cpu/cpufreq/policy7/walt/up_rate_limit_us
echo 1344000 > /sys/devices/system/cpu/cpufreq/policy0/walt/up_delay_freq
echo 2572800 > /sys/devices/system/cpu/cpufreq/policy2/walt/up_delay_freq
echo 2572800 > /sys/devices/system/cpu/cpufreq/policy5/walt/up_delay_freq
echo 2630400 > /sys/devices/system/cpu/cpufreq/policy7/walt/up_delay_freq
echo 0 > /sys/devices/system/cpu/cpufreq/policy0/walt/pl
echo 1 > /proc/sys/walt/sched_conservative_pl
echo 50 85 85 > /proc/sys/walt/sched_downmigrate
echo 59 95 95 > /proc/sys/walt/sched_upmigrate
echo 20 > /dev/cpuctl/background/cpu.uclamp.max
echo 1804800 2707200 2707200 2147483647 > /proc/sys/walt/sched_fmax_cap
echo 51 > /proc/sys/walt/sched_min_task_util_for_boost
echo 51 > /proc/sys/walt/sched_min_task_util_for_uclamp
echo 35 > /proc/sys/walt/sched_min_task_util_for_colocation
chown root.system /sys/devices/system/cpu/cpufreq/policy0/walt/up_delay_freq
chmod 0660 /sys/devices/system/cpu/cpufreq/policy0/walt/up_delay_freq
chown root.system /sys/devices/system/cpu/cpufreq/policy0/walt/target_load_thresh
chmod 0660 /sys/devices/system/cpu/cpufreq/policy0/walt/target_load_thresh
chown root.system /sys/devices/system/cpu/cpufreq/policy0/walt/up_rate_limit_us
chmod 0660 /sys/devices/system/cpu/cpufreq/policy0/walt/up_rate_limit_us
chown root.system /sys/devices/system/cpu/cpufreq/policy0/walt/rtg_boost_freq
chmod 0664 /sys/devices/system/cpu/cpufreq/policy0/walt/rtg_boost_freq
chown root.system /sys/devices/system/cpu/cpufreq/policy2/walt/up_delay_freq
chmod 0660 /sys/devices/system/cpu/cpufreq/policy2/walt/up_delay_freq
chown root.system /sys/devices/system/cpu/cpufreq/policy2/walt/target_load_thresh
chmod 0660 /sys/devices/system/cpu/cpufreq/policy2/walt/target_load_thresh
chown root.system /sys/devices/system/cpu/cpufreq/policy2/walt/up_rate_limit_us
chmod 0660 /sys/devices/system/cpu/cpufreq/policy2/walt/up_rate_limit_us
chown root.system /sys/devices/system/cpu/cpufreq/policy5/walt/up_delay_freq
chmod 0660 /sys/devices/system/cpu/cpufreq/policy5/walt/up_delay_freq
chown root.system /sys/devices/system/cpu/cpufreq/policy5/walt/target_load_thresh
chmod 0660 /sys/devices/system/cpu/cpufreq/policy5/walt/target_load_thresh
chown root.system /sys/devices/system/cpu/cpufreq/policy5/walt/up_rate_limit_us
chmod 0660 /sys/devices/system/cpu/cpufreq/policy5/walt/up_rate_limit_us
chown root.system /sys/devices/system/cpu/cpufreq/policy7/walt/up_delay_freq
chmod 0660 /sys/devices/system/cpu/cpufreq/policy7/walt/up_delay_freq
chown root.system /sys/devices/system/cpu/cpufreq/policy7/walt/target_load_thresh
chmod 0660 /sys/devices/system/cpu/cpufreq/policy7/walt/target_load_thresh
chown root.system /sys/devices/system/cpu/cpufreq/policy7/walt/up_rate_limit_us
chmod 0660 /sys/devices/system/cpu/cpufreq/policy7/walt/up_rate_limit_us
chown root.system /sys/devices/system/cpu/cpufreq/policy0/walt/pl
chmod 0660 /sys/devices/system/cpu/cpufreq/policy0/walt/pl
chown root.system /dev/cpuctl/background/cpu.uclamp.max
chmod 0660 /dev/cpuctl/background/cpu.uclamp.max
fi
# Enable dynamic prefetcher
if [ $model_name == "b6q" ] || [ $model_name == "q6q" ] || [ $model_name == "q6aq" ]; then
chown root.system /sys/devices/system/cpu/dynpf/enable_dynpf
chmod 0660 /sys/devices/system/cpu/dynpf/enable_dynpf
echo 1 > /sys/devices/system/cpu/dynpf/enable_dynpf
fi
echo 4 > /proc/sys/kernel/printk
# SED data dump
factory=`getprop ro.factory.factory_binary`
if [ "$factory" == "factory" ] && [ ! -e /data/local/tmp/SED_DDR_DATA_* ]; then
ap_serial=`getprop ro.boot.ap_serial`
soc_model=`getprop ro.soc.model`
dram_info=`getprop ro.boot.dram_info`
sed_dump_file=/data/local/tmp/SED_DDR_DATA_$soc_model'_'$dram_info'_'$ap_serial.BIN
dd if=/dev/block/bootdevice/by-name/ddr of=$sed_dump_file bs=1024 count=256
chown shell:shell $sed_dump_file
chmod 755 $sed_dump_file
fi
# Change console log level as per console config property
console_config=`getprop persist.vendor.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
setprop vendor.post_boot.parsed 1

View File

@@ -0,0 +1,215 @@
#=============================================================================
# Copyright (c) 2019-2023 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
#
# 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:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
function configure_zram_parameters() {
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
MemTotal=${MemTotalStr:16:8}
low_ram=`getprop ro.config.low_ram`
let RamSizeGB="( $MemTotal / 1048576 ) + 1"
diskSizeUnit=M
# Zram disk - 75%
let zRamSizeMB="( $RamSizeGB * 1024 ) * 3 / 4"
# use MB avoid 32 bit overflow
if [ $zRamSizeMB -gt 6144 ]; then
let zRamSizeMB=6144
fi
# And enable lz4 zram compression for Go targets.
if [ "$low_ram" == "true" ]; then
echo lz4 > /sys/block/zram0/comp_algorithm
fi
if [ -f /sys/block/zram0/disksize ]; then
if [ -f /sys/block/zram0/use_dedup ]; then
echo 1 > /sys/block/zram0/use_dedup
fi
echo "$zRamSizeMB""$diskSizeUnit" > /sys/block/zram0/disksize
# ZRAM may use more memory than it saves if SLAB_STORE_USER
# debug option is enabled.
if [ -e /sys/kernel/slab/zs_handle ]; then
echo 0 > /sys/kernel/slab/zs_handle/store_user
fi
if [ -e /sys/kernel/slab/zspage ]; then
echo 0 > /sys/kernel/slab/zspage/store_user
fi
mkswap /dev/block/zram0
swapon /dev/block/zram0 -p 32758
fi
}
verify_pasr_support()
{
ddr_type=`od -An -tx /proc/device-tree/memory/ddr_device_type`
ddr_type5="08"
if [ -d /sys/kernel/mem-offline ]; then
#only LPDDR5 supports PAAR
if [ ${ddr_type:4:2} != $ddr_type5 ]; then
setprop vendor.pasr.activemode.enabled false
fi
setprop vendor.pasr.enabled true
echo "pasr-enabled"
fi
}
function configure_read_ahead_kb_values() {
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
MemTotal=${MemTotalStr:16:8}
dmpts=$(ls /sys/block/*/queue/read_ahead_kb | grep -e dm -e mmc -e sd)
# dmpts holds below read_ahead_kb nodes if exists:
# /sys/block/dm-0/queue/read_ahead_kb to /sys/block/dm-10/queue/read_ahead_kb
# /sys/block/sda/queue/read_ahead_kb to /sys/block/sdh/queue/read_ahead_kb
# Set 128 for <= 4GB &
# set 512 for >= 5GB targets.
if [ $MemTotal -le 4194304 ]; then
ra_kb=128
else
ra_kb=512
fi
if [ -f /sys/block/mmcblk0/bdi/read_ahead_kb ]; then
echo $ra_kb > /sys/block/mmcblk0/bdi/read_ahead_kb
fi
if [ -f /sys/block/mmcblk0rpmb/bdi/read_ahead_kb ]; then
echo $ra_kb > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
fi
for dm in $dmpts; do
if [ `cat $(dirname $dm)/../removable` -eq 0 ]; then
echo $ra_kb > $dm
fi
done
}
function configure_memory_parameters() {
# Set Memory parameters.
#
# Set per_process_reclaim tuning parameters
# All targets will use vmpressure range 50-70,
# All targets will use 512 pages swap size.
#
# Set Low memory killer minfree parameters
# 32 bit Non-Go, all memory configurations will use 15K series
# 32 bit Go, all memory configurations will use uLMK + Memcg
# 64 bit will use Google default LMK series.
#
# Set ALMK parameters (usually above the highest minfree values)
# vmpressure_file_min threshold is always set slightly higher
# than LMK minfree's last bin value for all targets. It is calculated as
# vmpressure_file_min = (last bin - second last bin ) + last bin
#
# Set allocstall_threshold to 0 for all targets.
#
#configure_zram_parameters
configure_read_ahead_kb_values
#echo 100 > /proc/sys/vm/swappiness
# Disable periodic kcompactd wakeups. We do not use THP, so having many
# huge pages is not as necessary.
echo 0 > /proc/sys/vm/compaction_proactiveness
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
MemTotal=${MemTotalStr:16:8}
let RamSizeGB="( $MemTotal / 1048576 ) + 1"
have_pasr=$(verify_pasr_support)
if [ -z $have_pasr ]; then
## Goal is to allow all allocations to use THP whilst minimizing allocaiton delays
# Allow all eligibe page faults to use THP
echo always > /sys/kernel/mm/transparent_hugepage/enabled
# Prevent page faults on THP-elgible VMAs from causing reclaim or compaction
echo never > /sys/kernel/mm/transparent_hugepage/defrag
## Goal is to make khugepaged as inert as possible using the below settings
# Prevent khugepaged from doing reclaim or compaction
echo 0 > /sys/kernel/mm/transparent_hugepage/khugepaged/defrag
# Minimize the number of pages that khugepaged will scan
echo 1 > /sys/kernel/mm/transparent_hugepage/khugepaged/pages_to_scan
# Maximize the amount of time that khugepaged is asleep for
echo 4294967295 > /sys/kernel/mm/transparent_hugepage/khugepaged/scan_sleep_millisecs
echo 4294967295 > /sys/kernel/mm/transparent_hugepage/khugepaged/alloc_sleep_millisecs
# Restrict khugepaged promotions as much as possible. Only allow khugepaged to promote
# if all pages in a VMA are (1) not invalid PTEs, (2) not swapped out PTEs, (3) not
# shared PTEs.
echo 0 > /sys/kernel/mm/transparent_hugepage/khugepaged/max_ptes_none
echo 0 > /sys/kernel/mm/transparent_hugepage/khugepaged/max_ptes_swap
echo 0 > /sys/kernel/mm/transparent_hugepage/khugepaged/max_ptes_shared
else
# Do not enable THP is PASR is enabled
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
# Set the min_free_kbytes to standard kernel value
if [ $RamSizeGB -ge 8 ]; then
echo 11584 > /proc/sys/vm/min_free_kbytes
elif [ $RamSizeGB -ge 4 ]; then
echo 8192 > /proc/sys/vm/min_free_kbytes
elif [ $RamSizeGB -ge 2 ]; then
echo 5792 > /proc/sys/vm/min_free_kbytes
else
echo 4096 > /proc/sys/vm/min_free_kbytes
fi
#Set per-app max kgsl reclaim limit and per shrinker call limit
if [ -f /sys/class/kgsl/kgsl/page_reclaim_per_call ]; then
echo 38400 > /sys/class/kgsl/kgsl/page_reclaim_per_call
fi
# if [ -f /sys/class/kgsl/kgsl/max_reclaim_limit ]; then
# echo 51200 > /sys/class/kgsl/kgsl/max_reclaim_limit
# fi
}
configure_memory_parameters
if [ -f /sys/devices/soc0/soc_id ]; then
platformid=`cat /sys/devices/soc0/soc_id`
fi
case "$platformid" in
"557"|"577")
/vendor/bin/sh /vendor/bin/init.kernel.post_boot-pineapple.sh
;;
"614"|"632")
/vendor/bin/sh /vendor/bin/init.kernel.post_boot-cliffs.sh
;;
*)
echo "***WARNING***: Invalid SoC ID\n\t No postboot settings applied!!\n"
;;
esac

216
proprietary/vendor/bin/init.qcom.class_core.sh vendored Executable file
View File

@@ -0,0 +1,216 @@
#!/vendor/bin/sh
# Copyright (c) 2012-2013, 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:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Set platform variables
target=`getprop ro.board.platform`
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/soc_id ]; then
soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
else
soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
fi
if [ -f /sys/devices/soc0/platform_version ]; then
soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null
else
soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
fi
# Dynamic Memory Managment (DMM) provides a sys file system to the userspace
# that can be used to plug in/out memory that has been configured as unstable.
# This unstable memory can be in Active or In-Active State.
# Each of which the userspace can request by writing to a sys file.
#
# ro.dev.dmm = 1; Indicates that DMM is enabled in the Android User Space. This
# property is set in the Android system properties file.
#
# If ro.dev.dmm.dpd.start_address is set here then the target has a memory
# configuration that supports DynamicMemoryManagement.
init_DMM()
{
block=-1
case "$target" in
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm8960")
;;
*)
return
;;
esac
mem="/sys/devices/system/memory"
op=`cat $mem/movable_start_bytes`
case "$op" in
"0")
log -p i -t DMM DMM Disabled. movable_start_bytes not set: $op
;;
"$mem/movable_start_bytes: No such file or directory ")
log -p i -t DMM DMM Disabled. movable_start_bytes does not exist: $op
;;
*)
log -p i -t DMM DMM available. movable_start_bytes at $op
movable_start_bytes=0x`cat $mem/movable_start_bytes`
block_size_bytes=0x`cat $mem/block_size_bytes`
block=$((#${movable_start_bytes}/${block_size_bytes}))
chown -h system.system $mem/memory$block/state
chown -h system.system $mem/probe
chown -h system.system $mem/active
chown -h system.system $mem/remove
case "$target" in
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
echo $movable_start_bytes > $mem/probe
case "$?" in
"0")
log -p i -t DMM $movable_start_bytes to physical hotplug succeeded.
;;
*)
log -p e -t DMM $movable_start_bytes to physical hotplug failed.
return
;;
esac
echo online > $mem/memory$block/state
case "$?" in
"0")
log -p i -t DMM \'echo online\' to logical hotplug succeeded.
;;
*)
log -p e -t DMM \'echo online\' to logical hotplug failed.
return
;;
esac
;;
esac
setprop ro.dev.dmm.dpd.start_address $movable_start_bytes
setprop ro.dev.dmm.dpd.block $block
;;
esac
case "$target" in
"msm8960")
return
;;
esac
# For 7X30 targets:
# ro.dev.dmm.dpd.start_address is set when the target has a 2x256Mb memory
# configuration. This is also used to indicate that the target is capable of
# setting EBI-1 to Deep Power Down or Self Refresh.
op=`cat $mem/low_power_memory_start_bytes`
case "$op" in
"0")
log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes not set:$op
;;
"$mem/low_power_memory_start_bytes No such file or directory ")
log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes does not exist:$op
;;
*)
log -p i -t DMM Self-Refresh-Only available. low_power_memory_start_bytes at $op
;;
esac
}
#
# For controlling console and shell on console on 8960 - perist.serial.enable 8960
# On other target use default ro.debuggable property.
#
serial=`getprop persist.serial.enable`
dserial=`getprop ro.debuggable`
case "$target" in
"msm8960")
case "$serial" in
"0")
echo 0 > /sys/devices/platform/msm_serial_hsl.0/console
;;
"1")
echo 1 > /sys/devices/platform/msm_serial_hsl.0/console
start console
;;
*)
case "$dserial" in
"1")
start console
;;
esac
;;
esac
;;
"msm8610" | "msm8974" | "msm8226")
case "$serial" in
"0")
echo 0 > /sys/devices/f991f000.serial/console
;;
"1")
echo 1 > /sys/devices/f991f000.serial/console
start console
;;
*)
case "$dserial" in
"1")
start console
;;
esac
;;
esac
;;
*)
case "$dserial" in
"1")
start console
;;
esac
;;
esac
case "$target" in
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
insmod /system/lib/modules/ss_mfcinit.ko
insmod /system/lib/modules/ss_vencoder.ko
insmod /system/lib/modules/ss_vdecoder.ko
chmod -h 0666 /dev/ss_mfc_reg
chmod -h 0666 /dev/ss_vdec
chmod -h 0666 /dev/ss_venc
init_DMM
;;
"msm8960")
init_DMM
;;
esac

40
proprietary/vendor/bin/init.qti.kernel.sh vendored Executable file
View File

@@ -0,0 +1,40 @@
#! /vendor/bin/sh
#=============================================================================
# Copyright (c) 2019-2020 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
#
# 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:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
start_msm_irqbalance()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
start vendor.msm_irqbalance
fi
}
start_msm_irqbalance

108
proprietary/vendor/bin/init.qti.media.sh vendored Executable file
View File

@@ -0,0 +1,108 @@
#! /vendor/bin/sh
#==============================================================================
# init.qti.media.sh
#
# Copyright (c) 2020-2022, Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
#
# Copyright (c) 2020, 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:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#===============================================================================
build_codename=`getprop vendor.media.system.build_codename`
if [ -f /sys/devices/soc0/soc_id ]; then
soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
else
soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
fi
target=`getprop ro.board.platform`
case "$target" in
"anorak")
setprop vendor.mm.target.enable.qcom_parser 0
setprop vendor.media.target_variant "_anorak"
;;
"kalama")
setprop vendor.mm.target.enable.qcom_parser 0
setprop vendor.media.target_variant "_kalama"
;;
"pineapple")
setprop vendor.mm.target.enable.qcom_parser 0
case "$soc_hwid" in
614|632)
setprop vendor.media.target_variant "_cliffs_v0"
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc/sku_version` 2> /dev/null
if [ $sku_ver -eq 1 ]; then
setprop vendor.media.target_variant "_cliffs_v1"
fi
;;
*)
setprop vendor.media.target_variant "_pineapple"
if [ $build_codename -le "14" ]; then
setprop vendor.netflix.bsp_rev "Q8650-37577-1"
fi
;;
esac
;;
"taro")
setprop vendor.mm.target.enable.qcom_parser 1040479
case "$soc_hwid" in
530|531|540)
setprop vendor.media.target_variant "_cape"
;;
*)
setprop vendor.media.target_variant "_taro"
;;
esac
;;
"lahaina")
case "$soc_hwid" in
450)
setprop vendor.media.target_variant "_shima_v3"
setprop vendor.netflix.bsp_rev ""
sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc/sku_version` 2> /dev/null
if [ $sku_ver -eq 1 ]; then
setprop vendor.media.target_variant "_shima_v1"
elif [ $sku_ver -eq 2 ]; then
setprop vendor.media.target_variant "_shima_v2"
fi
;;
*)
setprop vendor.media.target_variant "_lahaina"
setprop vendor.netflix.bsp_rev "Q875-32408-1"
;;
esac
;;
"holi")
setprop vendor.media.target_variant "_holi"
;;
"msmnile")
setprop vendor.media.target_variant "_msmnile"
;;
esac

88
proprietary/vendor/bin/init.qti.qcv.sh vendored Executable file
View File

@@ -0,0 +1,88 @@
#! /vendor/bin/sh
#=============================================================================
# Copyright (c) 2020, 2021 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
#=============================================================================
soc_id=`cat /sys/devices/soc0/soc_id` 2> /dev/null
# Store soc_id in ro.vendor.qti.soc_id
setprop ro.vendor.qti.soc_id $soc_id
# For chipsets in QCV family, convert soc_id to soc_name
# and store it in ro.vendor.qti.soc_name.
if [ "$soc_id" -eq 618 ]; then
setprop ro.vendor.qti.soc_name sun
setprop ro.vendor.qti.soc_model SM8750
setprop ro.vendor.media_performance_class 34
elif [ "$soc_id" -eq 507 ] || [ "$soc_id" -eq 565 ]; then
setprop ro.vendor.qti.soc_name blair
setprop ro.vendor.qti.soc_model SM6375
elif [ "$soc_id" -eq 578 ]; then
setprop ro.vendor.qti.soc_name blair
setprop ro.vendor.qti.soc_model SM4375
elif [ "$soc_id" -eq 454 ]; then
setprop ro.vendor.qti.soc_name holi
setprop ro.vendor.qti.soc_model SM4350
elif [ "$soc_id" -eq 472 ]; then
setprop ro.vendor.qti.soc_name holi
setprop ro.vendor.qti.soc_model SM6325
elif [ "$soc_id" -eq 557 ] || [ "$soc_id" -eq 577 ]; then
setprop ro.vendor.qti.soc_name pineapple
setprop ro.vendor.qti.soc_model SM8650
# setprop ro.vendor.media_performance_class 34
elif [ "$soc_id" -eq 632 ]; then
setprop ro.vendor.qti.soc_name cliffs
setprop ro.vendor.qti.soc_model SM7675
elif [ "$soc_id" -eq 614 ]; then
setprop ro.vendor.qti.soc_name cliffs
setprop ro.vendor.qti.soc_model SM8635
elif [ "$soc_id" -eq 519 ] || [ "$soc_id" -eq 536 ] || [ "$soc_id" -eq 600 ] || [ "$soc_id" -eq 601 ]; then
setprop ro.vendor.qti.soc_name kalama
setprop ro.vendor.qti.soc_model SM8550
setprop ro.vendor.media_performance_class 33
elif [ "$soc_id" -eq 608 ]; then
setprop ro.vendor.qti.soc_name crow
setprop ro.vendor.qti.soc_model SM7550
elif [ "$soc_id" -eq 457 ] || [ "$soc_id" -eq 482 ] || [ "$soc_id" -eq 552 ]; then
setprop ro.vendor.qti.soc_name taro
setprop ro.vendor.qti.soc_model SM8450
setprop ro.vendor.media_performance_class 31
elif [ "$soc_id" -eq 537 ] || [ "$soc_id" -eq 583 ]; then
setprop ro.vendor.qti.soc_name parrot
setprop ro.vendor.qti.soc_model SM6450
elif [ "$soc_id" -eq 613 ]; then
setprop ro.vendor.qti.soc_name parrot
setprop ro.vendor.qti.soc_model SM7435
elif [ "$soc_id" -eq 568 ] || [ "$soc_id" -eq 602 ]; then
setprop ro.vendor.qti.soc_name ravelin
setprop ro.vendor.qti.soc_model SM4450
elif [ "$soc_id" -eq 581 ]; then
setprop ro.vendor.qti.soc_name ravelin
setprop ro.vendor.qti.soc_model QCM4490
elif [ "$soc_id" -eq 582 ]; then
setprop ro.vendor.qti.soc_name ravelin
setprop ro.vendor.qti.soc_model QCS4490
elif [ "$soc_id" -eq 506 ] || [ "$soc_id" -eq 547 ] || [ "$soc_id" -eq 564 ]; then
setprop ro.vendor.qti.soc_name diwali
setprop ro.vendor.qti.soc_model SM7450
elif [ "$soc_id" -eq 591 ]; then
setprop ro.vendor.qti.soc_name ukee
setprop ro.vendor.qti.soc_model SM7475
elif [ "$soc_id" -eq 530 ] || [ "$soc_id" -eq 531 ] || [ "$soc_id" -eq 540 ]; then
setprop ro.vendor.qti.soc_name cape
setprop ro.vendor.qti.soc_model SM8475
setprop ro.vendor.media_performance_class 31
elif [ "$soc_id" -eq 415 ] || [ "$soc_id" -eq 439 ] || [ "$soc_id" -eq 456 ] ||
[ "$soc_id" -eq 501 ] || [ "$soc_id" -eq 502 ]; then
setprop ro.vendor.qti.soc_name lahaina
setprop ro.vendor.qti.soc_model SM8350
elif [ "$soc_id" -eq 450 ]; then
setprop ro.vendor.qti.soc_name shima
setprop ro.vendor.qti.soc_model SM7350
elif [ "$soc_id" -eq 475 ] || [ "$soc_id" -eq 499 ] || [ "$soc_id" -eq 497 ] ||
[ "$soc_id" -eq 498 ] || [ "$soc_id" -eq 515 ]; then
setprop ro.vendor.qti.soc_name yupik
setprop ro.vendor.qti.soc_model SM7325
fi

View File

@@ -0,0 +1,23 @@
#! /vendor/bin/sh
LOG_HEAD="[time-services]"
current_time=$(date +%s)
echo "${LOG_HEAD} current time : ${current_time}" > /dev/kmsg
# if time-service initialization is required
if [ "$1" != "1" ]; then
#FIXME : date cmd could return 0 without broadcasting SET_TIME intent, the time diff b/w old & new must be enough
new_time=$((current_time+5))
date -s @${new_time}
ret=$?
# echo "${LOG_HEAD} date return code : ${ret} " > /dev/kmsg
if [ "$ret" -ne 0 ]; then
echo "${LOG_HEAD} failed to exec date cmd : ${current_time} to ${new_time} with ${ret}" > /dev/kmsg
echo c > /proc/sysrq-trigger #it's not working due to selinux
exit 1
else
echo "${LOG_HEAD} initialized : ${current_time} to ${new_time}" > /dev/kmsg
fi
setprop persist.vendor.time_services.init 1
fi

27
proprietary/vendor/bin/init.qti.write.sh vendored Executable file
View File

@@ -0,0 +1,27 @@
#!/vendor/bin/sh
#=============================================================================
# Copyright (c) 2021 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
#=============================================================================
write_with_check() {
local i=60
while [ $i -gt 0 ]
do
if [ -f "$1" ]; then
break
fi
sleep 1
i=$(($i-1))
done
if [ ! -f "$1" ]; then
exit 1
fi
echo $2 > $1
}
write_with_check "$1" "$2"

BIN
proprietary/vendor/bin/irsc_util vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/loadalgo vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/loc_launcher vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/lowi-server vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/pd-mapper vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/pm-proxy vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/pm-service vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/ppd vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/qcc-vendor vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/qcom-system-daemon vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/qdcmss vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/qms vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/qrtr-cfg vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/qrtr-lookup vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/qrtr-ns vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/qseecomd vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/qti vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/qwesd vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/rmt_storage vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/sec_nvm vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/shsusrd vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/spdaemon vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/sscrpcd vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/ssgtzd vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/ssr_diag vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/ssr_setup vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/subsystem_ramdump vendored Executable file

Binary file not shown.

View File

@@ -0,0 +1,42 @@
#! /vendor/bin/sh
#=============================================================================
# Copyright (c) 2022 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
#=============================================================================
SYSTEM_DLKM_DIR="/system_dlkm/lib/modules"
VENDOR_DLKM_DIR="/vendor_dlkm/lib/modules"
MODPROBE="/vendor/bin/modprobe"
for dir in ${SYSTEM_DLKM_DIR} ;
do
if [ ! -e ${dir}/*/modules.load ]; then
continue
fi
if [ -e ${VENDOR_DLKM_DIR}/system_dlkm.modules.blocklist ] && grep -q blocklist ${VENDOR_DLKM_DIR}/system_dlkm.modules.blocklist; then
blocklist_expr="$(sed -n -e 's/blocklist \(.*\)/\1/p' ${VENDOR_DLKM_DIR}/system_dlkm.modules.blocklist | sed -e 's/-/_/g' -e 's/^/-e /')"
else
# Use pattern that won't be found in modules list so that all modules pass through grep below
blocklist_expr="-e %"
fi
# Filter out modules in blocklist - we would see unnecessary errors otherwise
load_modules=$(cat ${dir}/*/modules.load | grep -w -v ${blocklist_expr})
first_module=$(echo ${load_modules} | cut -d " " -f1)
other_modules=$(echo ${load_modules} | cut -d " " -f2-)
if ! ${MODPROBE} -b -s -d ${dir}/*/ -a ${first_module} > /dev/null ; then
continue
fi
# load modules individually in case one of them fails to init
for module in ${other_modules}; do
( ${MODPROBE} -b -s -d ${dir}/*/ -a ${module} > /dev/null ) &
done
wait
setprop odm.system.all.modules.ready 1
exit 0
done
exit 1

BIN
proprietary/vendor/bin/tftp_server vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/time_daemon vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/tlpd vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/trusteduilistener vendored Executable file

Binary file not shown.

BIN
proprietary/vendor/bin/ubwcconvert vendored Executable file

Binary file not shown.

61
proprietary/vendor/bin/vendor_modprobe.sh vendored Executable file
View File

@@ -0,0 +1,61 @@
#! /vendor/bin/sh
#=============================================================================
# Copyright (c) 2019-2022 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.
#=============================================================================
VENDOR_DIR="/vendor/lib/modules"
VENDOR_DLKM_DIR="/vendor_dlkm/lib/modules"
MODPROBE="/vendor/bin/modprobe"
# vendor modules partition could be /vendor/lib/modules or /vendor_dlkm/lib/modules
POSSIBLE_DIRS="${VENDOR_DLKM_DIR} ${VENDOR_DIR}"
audio_arch=`getprop ro.boot.audio`
for dir in ${POSSIBLE_DIRS} ;
do
if [ ! -e ${dir}/modules.load ]; then
continue
fi
if [ "$audio_arch" == "audioreach" ]; then
if [ -e ${dir}/modules.audio.ar.blocklist ]; then
audio_blocklist_expr="$(sed -n -e 's/blocklist \(.*\)/\1/p' ${dir}/modules.audio.ar.blocklist | sed -e 's/-/_/g' -e 's/^/-e /')"
else
audio_blocklist_expr="-e %"
fi
else
if [ -e ${dir}/modules.audio.legacy.blocklist ]; then
audio_blocklist_expr="$(sed -n -e 's/blocklist \(.*\)/\1/p' ${dir}/modules.audio.legacy.blocklist | sed -e 's/-/_/g' -e 's/^/-e /')"
else
audio_blocklist_expr="-e %"
fi
fi
if [ -e ${dir}/modules.blocklist ]; then
blocklist_expr="$(sed -n -e 's/blocklist \(.*\)/\1/p' ${dir}/modules.blocklist | sed -e 's/-/_/g' -e 's/^/-e /')"
else
# Use pattern that won't be found in modules list so that all modules pass through grep below
blocklist_expr="-e %"
fi
# Filter out modules in blocklist - we would see unnecessary errors otherwise
load_modules=$(sed = ${dir}/modules.load | sed 'N;s/\n/\t/' | sort -uk2 | sort -nk1 | cut -f2- | grep -w -v ${blocklist_expr} | grep -w -v ${audio_blocklist_expr})
first_module=$(echo ${load_modules} | cut -d " " -f1)
other_modules=$(echo ${load_modules} | cut -d " " -f2-)
if ! ${MODPROBE} -b -s -d ${dir} -a ${first_module} > /dev/null ; then
continue
fi
# load modules individually in case one of them fails to init
for module in ${other_modules}; do
( ${MODPROBE} -b -d ${dir} -a ${module} > /dev/null ) &
done
wait
setprop vendor.all.modules.ready 1
exit 0
done
exit 1

BIN
proprietary/vendor/bin/xtra-daemon vendored Executable file

Binary file not shown.