Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 1 | |
| 2 | # Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 3 | # |
| 4 | # Redistribution and use in source and binary forms, with or without |
| 5 | # modification, are permitted provided that the following conditions are |
| 6 | # met: |
| 7 | # * Redistributions of source code must retain the above copyright |
| 8 | # notice, this list of conditions and the following disclaimer. |
| 9 | # * Redistributions in binary form must reproduce the above |
| 10 | # copyright notice, this list of conditions and the following |
| 11 | # disclaimer in the documentation and/or other materials provided |
| 12 | # with the distribution. |
| 13 | # * Neither the name of The Linux Foundation nor the names of its |
| 14 | # contributors may be used to endorse or promote products derived |
| 15 | # from this software without specific prior written permission. |
| 16 | # |
| 17 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 18 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 19 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 21 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 24 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 26 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 27 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | # |
| 29 | # |
| 30 | |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 31 | import /vendor/etc/init/hw/init.qti.kernel.rc |
| 32 | |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 33 | on early-init |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 34 | exec u:r:vendor_modprobe:s0 -- /vendor/bin/vendor_modprobe.sh |
Michael Bestas | 9bb5a14 | 2024-05-29 00:19:57 +0300 | [diff] [blame] | 35 | exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules q6_pdr_dlkm q6_notifier_dlkm snd_event_dlkm apr_dlkm adsp_loader_dlkm q6_dlkm native_dlkm pinctrl_wcd_dlkm pinctrl_lpi_dlkm swr_dlkm platform_dlkm hdmi_dlkm stub_dlkm wcd_core_dlkm wsa883x_dlkm bolero_cdc_dlkm wsa_macro_dlkm va_macro_dlkm rx_macro_dlkm tx_macro_dlkm bt_fm_slim wcd938x_dlkm wcd938x_slave_dlkm wcd937x_dlkm wcd937x_slave_dlkm swr_dmic_dlkm swr_haptics_dlkm machine_dlkm radio-i2c-rtc6226-qca cdsprm tasdevice_dlkm |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 36 | write /proc/sys/kernel/sched_boost 1 |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 37 | wait /sys/devices/soc0/soc_id |
Michael Bestas | 9bb5a14 | 2024-05-29 00:19:57 +0300 | [diff] [blame] | 38 | chmod 666 /sys/bus/i2c/devices/3-0038/fts_wakeup_fp |
| 39 | chmod 666 /sys/bus/i2c/devices/3-0038/fts_gesture_mode |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 40 | |
| 41 | on init |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 42 | # Scheduler uclamp |
| 43 | mkdir /dev/cpuctl/foreground |
| 44 | mkdir /dev/cpuctl/background |
| 45 | mkdir /dev/cpuctl/top-app |
| 46 | mkdir /dev/cpuctl/rt |
| 47 | chown system system /dev/cpuctl |
| 48 | chown system system /dev/cpuctl/foreground |
| 49 | chown system system /dev/cpuctl/background |
| 50 | chown system system /dev/cpuctl/top-app |
| 51 | chown system system /dev/cpuctl/rt |
| 52 | chown system system /dev/cpuctl/tasks |
| 53 | chown system system /dev/cpuctl/foreground/tasks |
| 54 | chown system system /dev/cpuctl/background/tasks |
| 55 | chown system system /dev/cpuctl/top-app/tasks |
| 56 | chown system system /dev/cpuctl/rt/tasks |
| 57 | chmod 0664 /dev/cpuctl/tasks |
| 58 | chmod 0664 /dev/cpuctl/foreground/tasks |
| 59 | chmod 0664 /dev/cpuctl/background/tasks |
| 60 | chmod 0664 /dev/cpuctl/top-app/tasks |
| 61 | chmod 0664 /dev/cpuctl/rt/tasks |
| 62 | write /dev/cpuctl/foreground/cpu.rt_runtime_us 950000 |
| 63 | write /dev/cpuctl/background/cpu.rt_runtime_us 950000 |
| 64 | write /dev/cpuctl/top-app/cpu.rt_runtime_us 950000 |
| 65 | write /dev/cpuctl/rt/cpu.rt_runtime_us 950000 |
| 66 | |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 67 | wait /dev/block/platform/soc/${ro.boot.bootdevice} |
| 68 | symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 69 | chown system system /sys/devices/platform/soc/1d84000.ufshc/auto_hibern8 |
| 70 | chmod 0660 /sys/devices/platform/soc/1d84000.ufshc/auto_hibern8 |
| 71 | start logd |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 72 | |
| 73 | on early-fs |
| 74 | start vold |
| 75 | |
| 76 | on fs |
| 77 | start hwservicemanager |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 78 | mkdir /mnt/vendor/spunvm 0660 system system |
Michael Bestas | 9bb5a14 | 2024-05-29 00:19:57 +0300 | [diff] [blame] | 79 | mount_all /vendor/etc/fstab.qcom --early |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 80 | chown root system /mnt/vendor/persist |
| 81 | chmod 0771 /mnt/vendor/persist |
| 82 | restorecon_recursive /mnt/vendor/persist |
| 83 | mkdir /mnt/vendor/persist/data 0700 system system |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 84 | |
| 85 | on fs && property:ro.boot.product.vendor.sku=lahaina |
| 86 | mkdir /mnt/vendor/spunvm 0660 system system |
| 87 | wait /dev/block/bootdevice/by-name/spunvm |
| 88 | 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 |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 89 | |
| 90 | on post-fs |
| 91 | # set RLIMIT_MEMLOCK to 64MB |
| 92 | setrlimit 8 67108864 67108864 |
| 93 | |
| 94 | on late-fs |
Michael Bestas | 9bb5a14 | 2024-05-29 00:19:57 +0300 | [diff] [blame] | 95 | mount_all /vendor/etc/fstab.qcom --late |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 96 | |
| 97 | on post-fs-data |
| 98 | mkdir /vendor/data/tombstones 0771 system system |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 99 | # Enable WLAN cold boot calibration |
| 100 | write /sys/devices/platform/soc/b0000000.qcom,cnss-qca6490/fs_ready 1 |
| 101 | |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 102 | on early-boot |
| 103 | start vendor.sensors |
| 104 | |
| 105 | on boot |
| 106 | write /dev/cpuset/audio-app/cpus 1-2 |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 107 | chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0049/trusted_touch_enable |
| 108 | chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0049/trusted_touch_enable |
| 109 | chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_enable |
| 110 | chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_enable |
| 111 | chown system /sys/devices/platform/soc/988000.i2c/i2c-1/1-0038/trusted_touch_enable |
| 112 | chmod 0660 /sys/devices/platform/soc/988000.i2c/i2c-1/1-0038/trusted_touch_enable |
| 113 | chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0049/trusted_touch_event |
| 114 | chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0049/trusted_touch_event |
| 115 | chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_event |
| 116 | chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_event |
| 117 | chown system /sys/devices/platform/soc/988000.i2c/i2c-1/1-0038/trusted_touch_event |
| 118 | chmod 0660 /sys/devices/platform/soc/988000.i2c/i2c-1/1-0038/trusted_touch_event |
| 119 | chown system /sys/devices/platform/soc/a94000.i2c/i2c-2/2-0062/trusted_touch_enable |
| 120 | chmod 0660 /sys/devices/platform/soc/a94000.i2c/i2c-2/2-0062/trusted_touch_enable |
| 121 | chown system /sys/devices/platform/soc/a94000.i2c/i2c-2/2-0062/trusted_touch_event |
| 122 | chmod 0660 /sys/devices/platform/soc/a94000.i2c/i2c-2/2-0062/trusted_touch_event |
| 123 | chown system /sys/devices/system/cpu/hyp_core_ctl/enable |
| 124 | chown system /sys/devices/system/cpu/hyp_core_ctl/hcc_min_freq |
| 125 | #USB controller configuration |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 126 | setprop vendor.usb.rndis.func.name "gsi" |
| 127 | setprop vendor.usb.rmnet.func.name "gsi" |
| 128 | setprop vendor.usb.rmnet.inst.name "rmnet" |
| 129 | setprop vendor.usb.dpl.inst.name "dpl" |
| 130 | setprop vendor.usb.qdss.inst.name "qdss_mdm" |
| 131 | setprop vendor.usb.controller a600000.dwc3 |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 132 | #Load WLAN driver |
| 133 | exec_background u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules/ qca_cld3_wlan qca_cld3_qca6750 qca_cld3_qca6390 |
| 134 | exec_background u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules/5.4-gki qca_cld3_wlan qca_cld3_qca6750 qca_cld3_qca6390 |
| 135 | #Allow access to memory hotplug device attributes |
| 136 | chown system system /sys/kernel/mem-offline/anon_migrate |
| 137 | |
Michael Bestas | 9bb5a14 | 2024-05-29 00:19:57 +0300 | [diff] [blame] | 138 | # Vibrator calibration |
| 139 | chown system system /mnt/vendor/persist/data/cali.txt |
| 140 | chmod 0666 /mnt/vendor/persist/data/cali.txt |
| 141 | |
| 142 | on property:sys.boot_completed=1 |
| 143 | start vendor.vibratorcal |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 144 | |
| 145 | on property:vendor.display.lcd_density=560 |
| 146 | setprop dalvik.vm.heapgrowthlimit 256m |
| 147 | |
| 148 | on property:vendor.display.lcd_density=640 |
| 149 | setprop dalvik.vm.heapgrowthlimit 512m |
| 150 | |
| 151 | on boot && property:persist.vendor.usb.controller.default=* |
| 152 | setprop vendor.usb.controller ${persist.vendor.usb.controller.default} |
| 153 | |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 154 | on init && property:ro.boot.mode=charger |
| 155 | mount_all /vendor/etc/charger_fw_fstab.qti --early |
| 156 | write /sys/kernel/boot_adsp/boot 1 |
| 157 | wait /sys/class/power_supply/battery |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 158 | |
| 159 | on charger |
| 160 | start vendor.power_off_alarm |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 161 | setprop sys.usb.controller a600000.dwc3 |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 162 | setprop sys.usb.configfs 1 |
| 163 | |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 164 | service vendor.lowi /vendor/bin/lowirpcd |
| 165 | class core |
| 166 | user system |
| 167 | group system wakelock |
| 168 | capabilities BLOCK_SUSPEND |
| 169 | |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 170 | #pd-mapper |
| 171 | service vendor.pd_mapper /vendor/bin/pd-mapper |
| 172 | class core |
| 173 | user system |
| 174 | group system |
| 175 | |
| 176 | #Peripheral manager |
| 177 | service vendor.per_mgr /vendor/bin/pm-service |
| 178 | class core |
| 179 | user system |
| 180 | group system |
| 181 | ioprio rt 4 |
| 182 | |
| 183 | service vendor.per_proxy /vendor/bin/pm-proxy |
| 184 | class core |
| 185 | user system |
| 186 | group system |
| 187 | disabled |
| 188 | |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 189 | #service vendor.mdm_helper /vendor/bin/mdm_helper |
| 190 | # class core |
| 191 | # group system wakelock |
| 192 | # disabled |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 193 | |
| 194 | service vendor.mdm_launcher /vendor/bin/sh /vendor/bin/init.mdm.sh |
| 195 | class core |
| 196 | oneshot |
| 197 | |
| 198 | on property:init.svc.vendor.per_mgr=running |
| 199 | start vendor.per_proxy |
| 200 | |
| 201 | on property:sys.shutdown.requested=* |
| 202 | stop vendor.per_proxy |
| 203 | |
| 204 | on property:vold.decrypt=trigger_restart_framework |
| 205 | start vendor.cnss_diag |
| 206 | |
| 207 | service vendor.cnss_diag /system/vendor/bin/cnss_diag -q -f -t HELIUM |
| 208 | class main |
| 209 | user system |
| 210 | group system wifi inet sdcard_rw media_rw diag |
| 211 | oneshot |
| 212 | |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 213 | #fan-controller |
| 214 | service fan_control_turn_on /vendor/bin/fan_control 1 |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 215 | class late_start |
| 216 | user root |
merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame] | 217 | disabled |
| 218 | oneshot |
| 219 | |
Michael Bestas | 0134c1e | 2023-08-30 13:51:03 +0300 | [diff] [blame] | 220 | service fan_control_turn_off /vendor/bin/fan_control 0 |
| 221 | class late_start |
| 222 | user root |
| 223 | disabled |
| 224 | oneshot |
| 225 | |
Michael Bestas | 9bb5a14 | 2024-05-29 00:19:57 +0300 | [diff] [blame] | 226 | # Vibrator |
| 227 | service vendor.vibratorcal /vendor/bin/vibratorcal |
| 228 | class core |
| 229 | user system |
| 230 | group system shell everybody |
| 231 | oneshot |
| 232 | disabled |