/init.herring.rc

http://github.com/kyapa/sc02b_initramfs · Windows Resource-Definition Script · 123 lines · 99 code · 24 blank · 0 comment · 0 complexity · cdb54398a41499e24ad956f2673f0f71 MD5 · raw file

  1. on boot
  2. mount debugfs /sys/kernel/debug /sys/kernel/debug
  3. setprop ro.build.product herring
  4. setprop ro.product.device herring
  5. setprop ro.radio.noril yes
  6. setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
  7. # fake some battery state
  8. setprop status.battery.state Slow
  9. setprop status.battery.level 5
  10. setprop status.battery.level_raw 50
  11. setprop status.battery.level_scale 9
  12. # wi-fi
  13. mkdir /data/misc/wifi/sockets 0770 wifi wifi
  14. mkdir /data/misc/dhcp 0770 dhcp dhcp
  15. # phone
  16. setprop ro.telephony.call_ring.multiple 0
  17. # It is useless
  18. #on fs
  19. # mkdir /efs 0775 radio radio
  20. # mount yaffs2 mtd@efs /efs nosuid nodev
  21. # mount ext4 /dev/block/platform/s3c-sdhci.0/by-name/system /system wait ro
  22. # mount ext4 /dev/block/platform/s3c-sdhci.0/by-name/userdata /data wait noatime nosuid nodev
  23. # permissions for bluetooth.
  24. chown bluetooth bluetooth ro.bt.bdaddr_path
  25. chown bluetooth bluetooth /dev/s3c2410_serial0
  26. chmod 0660 /dev/s3c2410_serial0
  27. chmod 0660 /sys/class/rfkill/rfkill0/state
  28. chmod 0660 /sys/class/rfkill/rfkill1/state
  29. chmod 0660 /sys/class/rfkill/rfkill2/state
  30. chmod 0660 /sys/class/rfkill/rfkill3/state
  31. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
  32. chown bluetooth bluetooth /sys/class/rfkill/rfkill1/state
  33. chown bluetooth bluetooth /sys/class/rfkill/rfkill2/state
  34. chown bluetooth bluetooth /sys/class/rfkill/rfkill3/state
  35. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
  36. chown bluetooth bluetooth /sys/class/rfkill/rfkill1/type
  37. chown bluetooth bluetooth /sys/class/rfkill/rfkill2/type
  38. chown bluetooth bluetooth /sys/class/rfkill/rfkill3/type
  39. # We chown/chmod /efs because mount is run as root + defaults
  40. #SEC Device encryption
  41. #chown radio system /efs
  42. chown radio system /efs
  43. chmod 0775 /efs
  44. # permissions for NFC
  45. setprop ro.nfc.port "I2C"
  46. chmod 0600 /dev/pn544
  47. chown nfc nfc /dev/pn544
  48. # Permissions for System Server and daemons.
  49. chown system system /sys/class/backlight/s5p_bl/brightness
  50. # create filesystems if necessary
  51. service setup_fs /system/bin/setup_fs /dev/block/platform/s3c-sdhci.0/by-name/userdata
  52. user root
  53. group root
  54. oneshot
  55. # 3D init
  56. service pvrsrvinit /system/vendor/bin/pvrsrvinit
  57. user root
  58. group root
  59. oneshot
  60. service wpa_supplicant /system/bin/wpa_supplicant -Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf
  61. socket wpa_eth0 dgram 0660 wifi wifi
  62. disabled
  63. oneshot
  64. service dhcpcd /system/bin/dhcpcd
  65. disabled
  66. oneshot
  67. service btld /system/bin/logwrapper /system/bin/btld -hb 3000000 -hp /dev/s3c2410_serial0 -lpm 1
  68. user root
  69. group bluetooth net_bt_admin
  70. disabled
  71. oneshot
  72. # start btld if soft_onoff is enabled
  73. on property:service.brcm.bt.soft_onoff=1
  74. start btld
  75. # stop btld if soft_onoff is disabled
  76. on property:service.brcm.bt.soft_onoff=0
  77. stop btld
  78. #STOPSHIP: Remove logwrapper and -d option before production
  79. service bluetoothd /system/bin/logwrapper /system/bin/bluetoothd -d -n
  80. socket bluetooth stream 660 bluetooth bluetooth
  81. socket dbus_bluetooth stream 660 bluetooth bluetooth
  82. # init.rc does not yet support applying capabilities, so run as root and
  83. # let bluetoothd drop uid to bluetooth with the right linux capabilities
  84. group bluetooth net_bt_admin misc
  85. disabled
  86. service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
  87. --baudrate 3000000 --patchram /vendor/firmware/bcm4329.hcd /dev/s3c2410_serial0
  88. user bluetooth
  89. group bluetooth net_bt_admin
  90. disabled
  91. oneshot
  92. # bugreport is triggered by holding down volume down, volume up and power
  93. service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
  94. disabled
  95. oneshot
  96. keycodes 114 115 116
  97. service tvout /system/bin/tvoutserver
  98. user system
  99. group graphics