blob: 7f79d750efdadeff1d980170c5b8b28ec1d1ec6b [file] [log] [blame]
Michael Bestas0134c1e2023-08-30 13:51:03 +03001
2# Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
merothh32be6882022-01-03 01:54:57 +05303#
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 Bestas0134c1e2023-08-30 13:51:03 +030031import /vendor/etc/init/hw/init.qti.kernel.rc
32
merothh32be6882022-01-03 01:54:57 +053033on early-init
Michael Bestas0134c1e2023-08-30 13:51:03 +030034 exec u:r:vendor_modprobe:s0 -- /vendor/bin/vendor_modprobe.sh
Michael Bestas9bb5a142024-05-29 00:19:57 +030035 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
merothh32be6882022-01-03 01:54:57 +053036 write /proc/sys/kernel/sched_boost 1
Michael Bestas0134c1e2023-08-30 13:51:03 +030037 wait /sys/devices/soc0/soc_id
Michael Bestas9bb5a142024-05-29 00:19:57 +030038 chmod 666 /sys/bus/i2c/devices/3-0038/fts_wakeup_fp
39 chmod 666 /sys/bus/i2c/devices/3-0038/fts_gesture_mode
merothh32be6882022-01-03 01:54:57 +053040
41on init
Michael Bestas0134c1e2023-08-30 13:51:03 +030042 # 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
merothh32be6882022-01-03 01:54:57 +053067 wait /dev/block/platform/soc/${ro.boot.bootdevice}
68 symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
Michael Bestas0134c1e2023-08-30 13:51:03 +030069 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
merothh32be6882022-01-03 01:54:57 +053072
73on early-fs
74 start vold
75
76on fs
77 start hwservicemanager
Michael Bestas0134c1e2023-08-30 13:51:03 +030078 mkdir /mnt/vendor/spunvm 0660 system system
Michael Bestas9bb5a142024-05-29 00:19:57 +030079 mount_all /vendor/etc/fstab.qcom --early
merothh32be6882022-01-03 01:54:57 +053080 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 Bestas0134c1e2023-08-30 13:51:03 +030084
85on 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
merothh32be6882022-01-03 01:54:57 +053089
90on post-fs
91 # set RLIMIT_MEMLOCK to 64MB
92 setrlimit 8 67108864 67108864
93
94on late-fs
Michael Bestas9bb5a142024-05-29 00:19:57 +030095 mount_all /vendor/etc/fstab.qcom --late
merothh32be6882022-01-03 01:54:57 +053096
97on post-fs-data
98 mkdir /vendor/data/tombstones 0771 system system
Michael Bestas0134c1e2023-08-30 13:51:03 +030099 # Enable WLAN cold boot calibration
100 write /sys/devices/platform/soc/b0000000.qcom,cnss-qca6490/fs_ready 1
101
merothh32be6882022-01-03 01:54:57 +0530102on early-boot
103 start vendor.sensors
104
105on boot
106 write /dev/cpuset/audio-app/cpus 1-2
Michael Bestas0134c1e2023-08-30 13:51:03 +0300107 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
merothh32be6882022-01-03 01:54:57 +0530126 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 Bestas0134c1e2023-08-30 13:51:03 +0300132 #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 Bestas9bb5a142024-05-29 00:19:57 +0300138 # Vibrator calibration
139 chown system system /mnt/vendor/persist/data/cali.txt
140 chmod 0666 /mnt/vendor/persist/data/cali.txt
141
142on property:sys.boot_completed=1
143 start vendor.vibratorcal
merothh32be6882022-01-03 01:54:57 +0530144
145on property:vendor.display.lcd_density=560
146 setprop dalvik.vm.heapgrowthlimit 256m
147
148on property:vendor.display.lcd_density=640
149 setprop dalvik.vm.heapgrowthlimit 512m
150
151on boot && property:persist.vendor.usb.controller.default=*
152 setprop vendor.usb.controller ${persist.vendor.usb.controller.default}
153
Michael Bestas0134c1e2023-08-30 13:51:03 +0300154on 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
merothh32be6882022-01-03 01:54:57 +0530158
159on charger
160 start vendor.power_off_alarm
Michael Bestas0134c1e2023-08-30 13:51:03 +0300161 setprop sys.usb.controller a600000.dwc3
merothh32be6882022-01-03 01:54:57 +0530162 setprop sys.usb.configfs 1
163
Michael Bestas0134c1e2023-08-30 13:51:03 +0300164service vendor.lowi /vendor/bin/lowirpcd
165 class core
166 user system
167 group system wakelock
168 capabilities BLOCK_SUSPEND
169
merothh32be6882022-01-03 01:54:57 +0530170#pd-mapper
171service vendor.pd_mapper /vendor/bin/pd-mapper
172 class core
173 user system
174 group system
175
176#Peripheral manager
177service vendor.per_mgr /vendor/bin/pm-service
178 class core
179 user system
180 group system
181 ioprio rt 4
182
183service vendor.per_proxy /vendor/bin/pm-proxy
184 class core
185 user system
186 group system
187 disabled
188
Michael Bestas0134c1e2023-08-30 13:51:03 +0300189#service vendor.mdm_helper /vendor/bin/mdm_helper
190# class core
191# group system wakelock
192# disabled
merothh32be6882022-01-03 01:54:57 +0530193
194service vendor.mdm_launcher /vendor/bin/sh /vendor/bin/init.mdm.sh
195 class core
196 oneshot
197
198on property:init.svc.vendor.per_mgr=running
199 start vendor.per_proxy
200
201on property:sys.shutdown.requested=*
202 stop vendor.per_proxy
203
204on property:vold.decrypt=trigger_restart_framework
205 start vendor.cnss_diag
206
207service 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 Bestas0134c1e2023-08-30 13:51:03 +0300213#fan-controller
214service fan_control_turn_on /vendor/bin/fan_control 1
merothh32be6882022-01-03 01:54:57 +0530215 class late_start
216 user root
merothh32be6882022-01-03 01:54:57 +0530217 disabled
218 oneshot
219
Michael Bestas0134c1e2023-08-30 13:51:03 +0300220service fan_control_turn_off /vendor/bin/fan_control 0
221 class late_start
222 user root
223 disabled
224 oneshot
225
Michael Bestas9bb5a142024-05-29 00:19:57 +0300226# Vibrator
227service vendor.vibratorcal /vendor/bin/vibratorcal
228 class core
229 user system
230 group system shell everybody
231 oneshot
232 disabled