init.target.rc 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. # Copyright (c) 2019-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
  29. # license:
  30. #
  31. # Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
  32. #
  33. # Redistribution and use in source and binary forms, with or without
  34. # modification, are permitted (subject to the limitations in the
  35. # disclaimer below) provided that the following conditions are met:
  36. #
  37. # * Redistributions of source code must retain the above copyright
  38. # notice, this list of conditions and the following disclaimer.
  39. #
  40. # * Redistributions in binary form must reproduce the above
  41. # copyright notice, this list of conditions and the following
  42. # disclaimer in the documentation and/or other materials provided
  43. # with the distribution.
  44. #
  45. # * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
  46. # contributors may be used to endorse or promote products derived
  47. # from this software without specific prior written permission.
  48. #
  49. # NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
  50. # GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
  51. # HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
  52. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  53. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  54. # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  55. # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  56. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  57. # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  58. # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
  59. # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  60. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  61. # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  62. #
  63. import /vendor/etc/init/hw/init.qti.kernel.rc
  64. on early-init
  65. write /proc/sys/kernel/printk_devkmsg ratelimited
  66. export MEMTAG_OPTIONS off
  67. on init
  68. wait /dev/block/platform/soc/${ro.boot.bootdevice}
  69. symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
  70. chown system system /sys/devices/platform/soc/1d84000.ufshc/auto_hibern8
  71. chmod 0660 /sys/devices/platform/soc/1d84000.ufshc/auto_hibern8
  72. start logd
  73. on early-fs
  74. start vold
  75. on fs
  76. start hwservicemanager
  77. mount_all /vendor/etc/fstab.qcom --early
  78. chown root system /mnt/vendor/persist
  79. chmod 0771 /mnt/vendor/persist
  80. restorecon_recursive /mnt/vendor/persist
  81. mkdir /mnt/vendor/persist/data 0700 system system
  82. on post-fs
  83. # set RLIMIT_MEMLOCK to 64MB
  84. setrlimit 8 67108864 67108864
  85. on late-fs
  86. mount_all /vendor/etc/fstab.qcom --late
  87. on post-fs-data
  88. mkdir /vendor/data/tombstones 0771 system system
  89. # Enable WLAN cold boot calibration
  90. write /sys/kernel/cnss/fs_ready 1
  91. on early-boot
  92. start vendor.sensors
  93. verity_update_state
  94. on boot
  95. write /dev/cpuset/audio-app/cpus 1-2
  96. chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_enable
  97. chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_enable
  98. chown system /sys/devices/platform/soc/990000.spi/spi_master/spi0/spi0.0/trusted_touch_enable
  99. chmod 0660 /sys/devices/platform/soc/990000.spi/spi_master/spi0/spi0.0/trusted_touch_enable
  100. chown system /sys/devices/platform/soc/980000.i2c/i2c-0/0-0062/trusted_touch_enable
  101. chmod 0660 /sys/devices/platform/soc/980000.i2c/i2c-0/0-0062/trusted_touch_enable
  102. chown system /sys/devices/platform/soc/980000.i2c/i2c-0/0-0062/trusted_touch_event
  103. chmod 0660 /sys/devices/platform/soc/980000.i2c/i2c-0/0-0062/trusted_touch_event
  104. chown system /sys/devices/system/cpu/hyp_core_ctl/enable
  105. chown system /sys/devices/system/cpu/hyp_core_ctl/hcc_min_freq
  106. #USB controller configuration
  107. setprop vendor.usb.controller a600000.dwc3
  108. on property:vendor.display.lcd_density=560
  109. setprop dalvik.vm.heapgrowthlimit 256m
  110. on property:vendor.display.lcd_density=640
  111. setprop dalvik.vm.heapgrowthlimit 512m
  112. on init && property:ro.boot.mode=charger
  113. wait_for_prop vendor.all.modules.ready 1
  114. mount_all /vendor/etc/charger_fw_fstab.qti --early
  115. wait /sys/kernel/boot_adsp/boot
  116. write /sys/kernel/boot_adsp/boot 1
  117. on charger
  118. start vendor.power_off_alarm
  119. setprop sys.usb.controller a600000.dwc3
  120. wait /sys/class/udc/${sys.usb.controller}
  121. write /sys/kernel/cnss/charger_mode 1
  122. #service vendor.lowi /vendor/bin/sscrpcd
  123. # class core
  124. # user system
  125. # group system wakelock
  126. # capabilities BLOCK_SUSPEND
  127. #pd-mapper
  128. service vendor.pd_mapper /vendor/bin/pd-mapper
  129. class core
  130. user system
  131. group system
  132. #Peripheral manager
  133. service vendor.per_mgr /vendor/bin/pm-service
  134. class core
  135. user system
  136. group system
  137. ioprio rt 4
  138. service vendor.per_proxy /vendor/bin/pm-proxy
  139. class core
  140. user system
  141. group system
  142. disabled
  143. service vendor.mdm_helper /vendor/bin/mdm_helper
  144. class core
  145. group system wakelock
  146. disabled
  147. service vendor.mdm_launcher /vendor/bin/sh /vendor/bin/init.mdm.sh
  148. class core
  149. oneshot
  150. on property:init.svc.vendor.per_mgr=running
  151. start vendor.per_proxy
  152. on property:sys.shutdown.requested=*
  153. write /sys/kernel/qcom_rproc/shutdown_in_progress 1
  154. stop vendor.per_proxy
  155. on property:vold.decrypt=trigger_restart_framework
  156. start vendor.cnss_diag
  157. service vendor.cnss_diag /system/vendor/bin/cnss_diag -q -f -t HELIUM
  158. class main
  159. user system
  160. group system wifi inet sdcard_rw media_rw diag
  161. oneshot
  162. on early-boot && property:persist.vendor.pcie.boot_option=*
  163. write /sys/bus/platform/devices/1c00000.qcom,pcie/debug/boot_option ${persist.vendor.pcie.boot_option}
  164. write /sys/bus/platform/devices/1c08000.qcom,pcie/debug/boot_option ${persist.vendor.pcie.boot_option}
  165. on property:sys.boot_completed=1
  166. enable vendor.qvirtmgr
  167. start vendor.qvirtmgr
  168. # STOP EATING MY BATTERY AFTER 100H OF UPTIME FUCK YOU
  169. stop statsd