blob: 42ecb9f4e0b03492c0bbff85161383b5ab050109 [file] [log] [blame]
ReStranger3d63ad72025-09-30 04:05:06 +03001# Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
2#
3# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions are
5# met:
6# * Redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer.
8# * Redistributions in binary form must reproduce the above
9# copyright notice, this list of conditions and the following
10# disclaimer in the documentation and/or other materials provided
11# with the distribution.
12# * Neither the name of The Linux Foundation nor the names of its
13# contributors may be used to endorse or promote products derived
14# from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27#
28# Changes from Qualcomm Innovation Center are provided under the following license:
29#
30# Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
31# SPDX-License-Identifier: BSD-3-Clause-Clear
32#
33#
34
35import /vendor/etc/init/hw/init.qti.kernel.rc
36
37on early-init
38 write /proc/sys/kernel/sched_boost 1
39 exec u:r:vendor_qti_init_shell:s0 -- /vendor/bin/init.qti.early_init.sh
40 setprop ro.soc.model ${ro.vendor.qti.soc_model}
41
42on init
43 write /dev/stune/foreground/schedtune.sched_boost_no_override 1
44 write /dev/stune/top-app/schedtune.sched_boost_no_override 1
45 write /dev/stune/schedtune.colocate 0
46 write /dev/stune/background/schedtune.colocate 0
47 write /dev/stune/system-background/schedtune.colocate 0
48 write /dev/stune/foreground/schedtune.colocate 0
49 write /dev/stune/top-app/schedtune.colocate 1
50 #Moving to init as this is needed for qseecomd
51 wait /dev/block/platform/soc/${ro.boot.bootdevice}
52 symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
53 start vendor.qseecomd
54 start keymaster-4-0
55
56on early-fs
57 start vold
58
59on fs
60 start hwservicemanager
61 mount_all --early
62 chown root system /mnt/vendor/persist
63 chmod 0771 /mnt/vendor/persist
64 restorecon_recursive /mnt/vendor/persist
65 mkdir /mnt/vendor/persist/data 0700 system system
66
67on post-fs
68 # set RLIMIT_MEMLOCK to 64MB
69 setrlimit 8 67108864 67108864
70
71on late-fs
72 wait_for_prop hwservicemanager.ready true
73 exec_start wait_for_keymaster
74 mount_all --late
75
76on post-fs-data
77 mkdir /vendor/data/tombstones 0771 system system
78
79on early-boot
80 start vendor.sensors
81
82on boot
83 write /dev/cpuset/audio-app/cpus 1-2
84#USB controller configuration
85 setprop vendor.usb.rndis.func.name "gsi"
86 setprop vendor.usb.rmnet.func.name "gsi"
87 setprop vendor.usb.rmnet.inst.name "rmnet"
88 setprop vendor.usb.dpl.inst.name "dpl"
89 setprop vendor.usb.qdss.inst.name "qdss_sw"
90 setprop vendor.usb.controller 4e00000.dwc3
91
92on boot && property:persist.vendor.usb.controller.default=*
93 setprop vendor.usb.controller ${persist.vendor.usb.controller.default}
94
95on property:vendor.usb.controller=*
96 setprop sys.usb.controller ${vendor.usb.controller}
97
98on charger
99 start vendor.power_off_alarm
100 setprop vendor.usb.controller 4e00000.dwc3
101 setprop sys.usb.configfs 1
102
103#pd-mapper
104service vendor.pd_mapper /vendor/bin/pd-mapper
105 class core
106 user system
107 group system
108
109#Peripheral manager
110service vendor.per_mgr /vendor/bin/pm-service
111 class core
112 user system
113 group system
114 ioprio rt 4
115
116service vendor.per_proxy /vendor/bin/pm-proxy
117 class core
118 user system
119 group system
120 disabled
121
122service vendor.mdm_helper /vendor/bin/mdm_helper
123 class core
124 group system wakelock
125 disabled
126
127service vendor.mdm_launcher /vendor/bin/sh /vendor/bin/init.mdm.sh
128 class core
129 oneshot
130
131on property:init.svc.vendor.per_mgr=running
132 start vendor.per_proxy
133
134on property:sys.shutdown.requested=*
135 stop vendor.per_proxy
136
137on property:vold.decrypt=trigger_restart_framework
138 start vendor.cnss_diag
139
140service vendor.cnss_diag /system/vendor/bin/cnss_diag -q -f -t HELIUM
141 class main
142 user system
143 group system wifi inet sdcard_rw media_rw diag
144 oneshot
145
146service dcvs-sh /vendor/bin/init.qti.dcvs.sh
147 class late_start
148 user root
149 group root system
150 disabled
151 oneshot
152
153on property:vendor.dcvs.prop=1
154 start dcvs-sh