# 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. # # 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 exec u:r:vendor_modprobe:s0 -- /vendor/bin/vendor_modprobe.sh wait /sys/devices/soc0/soc_id on init # 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/1d84000.ufshc symlink /dev/block/platform/soc/1d84000.ufshc /dev/block/bootdevice 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 exec_background u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules/ cnss2 on fs start hwservicemanager mkdir /mnt/vendor/spunvm 0660 system system mount_all /vendor/etc/fstab.qcom --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 mkdir /mnt/vendor/persist/audio 0755 system system on post-fs # Set RLIMIT_MEMLOCK to 64MB setrlimit 8 67108864 67108864 write /dev/ipa 1 on late-fs wait_for_prop hwservicemanager.ready true start console mount_all /vendor/etc/fstab.qcom --late on post-fs-data 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 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 start vendor.sensors on boot 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 write /dev/cpuset/audio-app/cpus 1-2 # Add a cpuset for the camera daemon # We want all cores for camera mkdir /dev/cpuset/camera-daemon 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 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 mount_all /vendor/etc/charger_fstab.qcom --early 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 on property:init.svc.vendor.per_mgr=running start vendor.per_proxy on property:sys.shutdown.requested=* stop vendor.per_proxy service vendor.nv_mac /vendor/bin/nv_mac class late_start user system group system inet net_admin wifi net_raw oneshot