android_device_xiaomi_sm835.../rootdir/etc/init.target.rc

181 lines
6.4 KiB
Plaintext
Raw Normal View History

2021-09-17 18:59:08 -04:00
# Copyright (c) 2019-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.
#
#
2021-09-17 18:59:08 -04:00
import /vendor/etc/init/hw/init.qti.kernel.rc
import /vendor/etc/init/hw/init.mi_thermald.rc
import /vendor/etc/init/hw/init.batterysecret.rc
on early-init
2021-09-17 18:59:08 -04:00
exec u:r:vendor_modprobe:s0 -- /vendor/bin/vendor_modprobe.sh
wait /sys/devices/soc0/soc_id
on init
2021-09-17 18:59:08 -04:00
# Scheduler uclamp
mkdir /dev/cpuctl/foreground
mkdir /dev/cpuctl/background
mkdir /dev/cpuctl/top-app
mkdir /dev/cpuctl/rt
chown system system /dev/cpuctl
chown system system /dev/cpuctl/foreground
chown system system /dev/cpuctl/background
chown system system /dev/cpuctl/top-app
chown system system /dev/cpuctl/rt
chown system system /dev/cpuctl/tasks
chown system system /dev/cpuctl/foreground/tasks
chown system system /dev/cpuctl/background/tasks
chown system system /dev/cpuctl/top-app/tasks
chown system system /dev/cpuctl/rt/tasks
chmod 0664 /dev/cpuctl/tasks
chmod 0664 /dev/cpuctl/foreground/tasks
chmod 0664 /dev/cpuctl/background/tasks
chmod 0664 /dev/cpuctl/top-app/tasks
chmod 0664 /dev/cpuctl/rt/tasks
write /dev/cpuctl/foreground/cpu.rt_runtime_us 950000
write /dev/cpuctl/background/cpu.rt_runtime_us 950000
write /dev/cpuctl/top-app/cpu.rt_runtime_us 950000
write /dev/cpuctl/rt/cpu.rt_runtime_us 950000
wait /dev/block/platform/soc/${ro.boot.bootdevice}
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
2021-09-17 18:59:08 -04:00
chown system system /sys/devices/platform/soc/1d84000.ufshc/auto_hibern8
chmod 0660 /sys/devices/platform/soc/1d84000.ufshc/auto_hibern8
start logd
on early-fs
start vold
2021-09-17 18:59:08 -04:00
exec_background u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules/ cnss2
on fs
start hwservicemanager
2021-09-17 18:59:08 -04:00
mkdir /mnt/vendor/spunvm 0660 system system
mount_all --early
chown root system /mnt/vendor/persist
chmod 0771 /mnt/vendor/persist
restorecon_recursive /mnt/vendor/persist
mkdir /mnt/vendor/persist/data 0700 system system
mkdir /mnt/vendor/persist/haptics 0755 system system
2021-09-17 18:59:08 -04:00
mkdir /mnt/vendor/persist/audio 0755 system system
on fs && property:ro.boot.product.vendor.sku=lahaina
mkdir /mnt/vendor/spunvm 0660 system system
wait /dev/block/bootdevice/by-name/spunvm
mount vfat /dev/block/bootdevice/by-name/spunvm /mnt/vendor/spunvm rw noatime shortname=lower,uid=1000,gid=1000,dmask=007,fmask=007,context=u:object_r:vendor_spunvm_file:s0
on post-fs
2021-09-17 19:57:51 -04:00
# Set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864
on late-fs
wait_for_prop hwservicemanager.ready true
mount_all --late
on post-fs-data
2021-09-17 18:59:08 -04:00
mkdir /vendor/data/tombstones 0771 system system
chmod 0644 /dev/elliptic0
chmod 0644 /dev/elliptic1
chmod 0660 /dev/ir_spi
chown system system /dev/ir_spi
mkdir /data/vendor/thermal 0771 root system
mkdir /data/vendor/thermal/config 0771 root system
2021-09-17 18:59:08 -04:00
mkdir /data/vendor/wlan_logs 0777 root shell
mkdir /data/vendor/nfc 0777 nfc nfc
on early-boot
# Enable WLAN cold boot calibration
write /sys/devices/platform/soc/b0000000.qcom,cnss-qca6490/fs_ready 1
2021-09-17 19:57:51 -04:00
start vendor.sensors
on boot
2021-09-17 18:59:08 -04:00
chown system system /sys/class/thermal/thermal_message/sconfig
chown system system /sys/class/thermal/thermal_message/balance_mode
chown system system /sys/devices/virtual/touch/tp_dev/double_tap
2021-09-17 19:57:51 -04:00
write /dev/cpuset/audio-app/cpus 1-2
2021-09-17 19:57:51 -04:00
2021-09-17 18:59:08 -04:00
# Add a cpuset for the camera daemon
# We want all cores for camera
mkdir /dev/cpuset/camera-daemon
2021-09-17 18:59:08 -04:00
write /dev/cpuset/camera-daemon/cpus 0-7
write /dev/cpuset/camera-daemon/mems 0
chown cameraserver cameraserver /dev/cpuset/camera-daemon
chown cameraserver cameraserver /dev/cpuset/camera-daemon/tasks
chmod 0660 /dev/cpuset/camera-daemon/tasks
2021-09-17 18:59:08 -04:00
chown system /sys/devices/system/cpu/hyp_core_ctl/enable
chown system /sys/devices/system/cpu/hyp_core_ctl/hcc_min_freq
write /sys/block/sda/queue/wbt_lat_usec 75000
on init && property:ro.boot.mode=charger
2021-09-17 19:57:51 -04:00
mount_all /vendor/etc/charger_fstab.qcom --early
2021-09-17 18:59:08 -04:00
write /sys/kernel/boot_adsp/boot 1
wait /sys/class/power_supply/battery
on charger
start vendor.power_off_alarm
setprop sys.usb.controller a600000.dwc3
setprop sys.usb.configfs 1
write /sys/module/lpm_levels/parameters/sleep_disabled N
service vendor.lowi /vendor/bin/lowirpcd
class core
user system
group system wakelock
capabilities BLOCK_SUSPEND
service vendor.pd_mapper /vendor/bin/pd-mapper
class core
user system
group system
service vendor.per_mgr /vendor/bin/pm-service
class core
user system
group system
ioprio rt 4
service vendor.per_proxy /vendor/bin/pm-proxy
class core
user system
group system
disabled
2021-09-17 18:59:08 -04:00
on property:init.svc.vendor.per_mgr=running
start vendor.per_proxy
2021-09-17 18:59:08 -04:00
on property:sys.shutdown.requested=*
stop vendor.per_proxy
2021-09-17 18:59:08 -04:00
service vendor.nv_mac /vendor/bin/nv_mac
class late_start
user system
group system inet net_admin wifi net_raw
oneshot