merothh | 32be688 | 2022-01-03 01:54:57 +0530 | [diff] [blame^] | 1 | # Copyright (c) 2018-2020, 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 | # |
| 29 | |
| 30 | on early-init |
| 31 | exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules audio_q6_pdr audio_q6_notifier audio_snd_event audio_apr audio_adsp_loader audio_q6 audio_native audio_usf audio_pinctrl_lpi audio_swr audio_platform audio_hdmi audio_stub audio_wcd_core audio_wsa881x audio_wsa883x audio_bolero_cdc audio_wsa_macro audio_va_macro audio_rx_macro audio_tx_macro audio_wcd938x audio_wcd938x_slave audio_wcd937x audio_wcd937x_slave audio_machine_lito |
| 32 | write /proc/sys/kernel/sched_boost 1 |
| 33 | |
| 34 | on init |
| 35 | write /dev/stune/foreground/schedtune.sched_boost_no_override 1 |
| 36 | write /dev/stune/top-app/schedtune.sched_boost_no_override 1 |
| 37 | write /dev/stune/schedtune.colocate 0 |
| 38 | write /dev/stune/background/schedtune.colocate 0 |
| 39 | write /dev/stune/system-background/schedtune.colocate 0 |
| 40 | write /dev/stune/foreground/schedtune.colocate 0 |
| 41 | write /dev/stune/top-app/schedtune.colocate 1 |
| 42 | #Moving to init as this is needed for qseecomd |
| 43 | wait /dev/block/platform/soc/${ro.boot.bootdevice} |
| 44 | symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice |
| 45 | start vendor.qseecomd |
| 46 | start keymaster-4-0 |
| 47 | |
| 48 | on early-fs |
| 49 | start vold |
| 50 | |
| 51 | on fs |
| 52 | start hwservicemanager |
| 53 | mount_all --early |
| 54 | chown root system /mnt/vendor/persist |
| 55 | chmod 0771 /mnt/vendor/persist |
| 56 | restorecon_recursive /mnt/vendor/persist |
| 57 | mkdir /mnt/vendor/persist/data 0700 system system |
| 58 | |
| 59 | on post-fs |
| 60 | # set RLIMIT_MEMLOCK to 64MB |
| 61 | setrlimit 8 67108864 67108864 |
| 62 | |
| 63 | on late-fs |
| 64 | wait_for_prop hwservicemanager.ready true |
| 65 | exec_start wait_for_keymaster |
| 66 | mount_all --late |
| 67 | |
| 68 | on post-fs-data |
| 69 | mkdir /vendor/data/tombstones 0771 system system |
| 70 | |
| 71 | on early-boot |
| 72 | start vendor.sensors |
| 73 | |
| 74 | on boot |
| 75 | write /dev/cpuset/audio-app/cpus 1-2 |
| 76 | # Add a cpuset for the camera daemon |
| 77 | # We want all cores for camera |
| 78 | mkdir /dev/cpuset/camera-daemon |
| 79 | write /dev/cpuset/camera-daemon/cpus 0-7 |
| 80 | write /dev/cpuset/camera-daemon/mems 0 |
| 81 | chown cameraserver cameraserver /dev/cpuset/camera-daemon |
| 82 | chown cameraserver cameraserver /dev/cpuset/camera-daemon/tasks |
| 83 | chmod 0660 /dev/cpuset/camera-daemon/tasks |
| 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_mdm" |
| 90 | setprop vendor.usb.controller a600000.dwc3 |
| 91 | #Load WLAN driver |
| 92 | insmod /vendor/lib/modules/qca_cld3_wlan.ko |
| 93 | |
| 94 | on property:vendor.display.lcd_density=560 |
| 95 | setprop dalvik.vm.heapgrowthlimit 256m |
| 96 | |
| 97 | on property:vendor.display.lcd_density=640 |
| 98 | setprop dalvik.vm.heapgrowthlimit 512m |
| 99 | |
| 100 | on boot && property:persist.vendor.usb.controller.default=* |
| 101 | setprop vendor.usb.controller ${persist.vendor.usb.controller.default} |
| 102 | |
| 103 | on property:vendor.usb.controller=* |
| 104 | setprop sys.usb.controller ${vendor.usb.controller} |
| 105 | |
| 106 | on charger |
| 107 | start vendor.power_off_alarm |
| 108 | setprop vendor.usb.controller a600000.dwc3 |
| 109 | setprop sys.usb.configfs 1 |
| 110 | |
| 111 | #pd-mapper |
| 112 | service vendor.pd_mapper /vendor/bin/pd-mapper |
| 113 | class core |
| 114 | user system |
| 115 | group system |
| 116 | |
| 117 | #Peripheral manager |
| 118 | service vendor.per_mgr /vendor/bin/pm-service |
| 119 | class core |
| 120 | user system |
| 121 | group system |
| 122 | ioprio rt 4 |
| 123 | |
| 124 | service vendor.per_proxy /vendor/bin/pm-proxy |
| 125 | class core |
| 126 | user system |
| 127 | group system |
| 128 | disabled |
| 129 | |
| 130 | service vendor.mdm_helper /vendor/bin/mdm_helper |
| 131 | class core |
| 132 | group system wakelock |
| 133 | disabled |
| 134 | |
| 135 | service vendor.mdm_launcher /vendor/bin/sh /vendor/bin/init.mdm.sh |
| 136 | class core |
| 137 | oneshot |
| 138 | |
| 139 | on property:init.svc.vendor.per_mgr=running |
| 140 | start vendor.per_proxy |
| 141 | |
| 142 | on property:sys.shutdown.requested=* |
| 143 | stop vendor.per_proxy |
| 144 | |
| 145 | on property:vold.decrypt=trigger_restart_framework |
| 146 | start vendor.cnss_diag |
| 147 | |
| 148 | service vendor.cnss_diag /system/vendor/bin/cnss_diag -q -f -t HELIUM |
| 149 | class main |
| 150 | user system |
| 151 | group system wifi inet sdcard_rw media_rw diag |
| 152 | oneshot |
| 153 | |
| 154 | service dcvs-sh /vendor/bin/init.qti.dcvs.sh |
| 155 | class late_start |
| 156 | user root |
| 157 | group root system |
| 158 | disabled |
| 159 | oneshot |
| 160 | |
| 161 | on property:vendor.dcvs.prop=1 |
| 162 | start dcvs-sh |