init.recovery.qcom.rc 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright (c) 2017-2018,2020-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 met:
  5. # * Redistributions of source code must retain the above copyright
  6. # notice, this list of conditions and the following disclaimer.
  7. # * Redistributions in binary form must reproduce the above copyright
  8. # notice, this list of conditions and the following disclaimer in the
  9. # documentation and/or other materials provided with the distribution.
  10. # * Neither the name of The Linux Foundation nor
  11. # the names of its contributors may be used to endorse or promote
  12. # products derived from this software without specific prior written
  13. # permission.
  14. #
  15. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  16. # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  17. # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  18. # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  19. # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  20. # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  21. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  22. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  23. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  24. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  25. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. #
  27. on early-init
  28. write /proc/sys/kernel/firmware_config/force_sysfs_fallback 1
  29. on init
  30. write /sys/class/backlight/panel0-backlight/brightness 200
  31. setprop sys.usb.configfs 1
  32. on property:ro.boot.usbcontroller=*
  33. setprop sys.usb.controller ${ro.boot.usbcontroller}
  34. wait /sys/bus/platform/devices/${ro.boot.usb.dwc3_msm:-a600000.ssusb}/mode
  35. write /sys/bus/platform/devices/${ro.boot.usb.dwc3_msm:-a600000.ssusb}/mode peripheral
  36. wait /sys/class/udc/${ro.boot.usbcontroller} 1
  37. on fs
  38. wait /dev/block/platform/soc/${ro.boot.bootdevice}
  39. symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
  40. # Load ADSP firmware for PMIC
  41. mkdir /firmware
  42. mount vfat /dev/block/bootdevice/by-name/modem${ro.boot.slot_suffix} /firmware ro context=u:object_r:firmware_file:s0
  43. on property:dev.mnt.blk.firmware=*
  44. write /sys/kernel/boot_adsp/boot 1