Advertisement
goroh_kun

Sony Tablet Pのinit.nbx02.rc

Feb 11th, 2012
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.42 KB | None | 0 0
  1. on early-init
  2. mount debugfs debugfs /sys/kernel/debug
  3.  
  4. export EXTERNAL_STORAGE /mnt/sdcard
  5. mkdir /mnt/sdcard 0000 system system
  6. # for backwards compatibility
  7. symlink /mnt/sdcard /sdcard
  8.  
  9. #mkdir /mnt/sdcard2 0000 system system
  10.  
  11. ## create directory for mounting usb drives
  12. #mkdir /mnt/usbdrive 0666 system system
  13. #symlink /mnt/usbdrive /usbdrive
  14.  
  15. # ST-UID
  16. insmod /sbin/stuid.ko
  17.  
  18. # mount configs
  19. mkdir /configs 0500 root root
  20. mount ext2 /dev/block/mmcblk0p1 /configs nosuid nodev wait
  21. chmod 111 /configs
  22. chown root system /configs
  23. mount ext2 /dev/block/mmcblk0p1 /configs ro remount
  24.  
  25. on fs
  26. wait /dev/block/mmcblk0p2
  27. setprop ro.crypto.tmpfs_options size=128m,mode=0771,uid=1000,gid=1000
  28. wait /dev/block/mmcblk0p3
  29. wait /dev/block/mmcblk0p7
  30. exec /sbin/sysmount ext4 /dev/block/mmcblk0p2 /dev/block/mmcblk0p3 /system ro
  31. setprop ro.crypto.state unsupported
  32. mount ext4 /dev/block/mmcblk0p10 /data wait noatime nosuid nodev
  33. mount ext4 /dev/block/mmcblk0p4 /cache wait noatime nosuid nodev
  34.  
  35. # mount log
  36. mkdir /log 0770 log log
  37. mount ext4 /dev/block/mmcblk0p9 /log wait noatime nosuid nodev
  38. chown log log /log
  39. chmod 0770 /log
  40.  
  41. on post-fs-data
  42. mkdir /data/misc/wifi 0770 wifi wifi
  43. mkdir /data/misc/wifi/sockets 0770 wifi wifi
  44. mkdir /data/misc/dhcp 0770 dhcp dhcp
  45. chown dhcp dhcp /data/misc/dhcp
  46.  
  47. # we will remap this as /mnt/sdcard with the sdcard fuse tool
  48. # mkdir /data/media 0775 media_rw media_rw
  49. # chown media_rw media_rw /data/media
  50.  
  51. # Set indication (checked by vold) that we have finished this action
  52. setprop vold.post_fs_data_done 1
  53.  
  54. # make local.prop visible
  55. symlink /configs/local.prop /data/local.prop
  56.  
  57. on boot
  58. # bluetooth
  59. # UART device
  60. chmod 0660 /dev/ttyHS2
  61. chown bluetooth bluetooth /dev/ttyHS2
  62. # power up/down interface
  63. chmod 0660 /sys/class/rfkill/rfkill0/state
  64. chmod 0660 /sys/class/rfkill/rfkill0/type
  65. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
  66. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
  67. write /sys/class/rfkill/rfkill0/state 0
  68.  
  69. # bluetooth MAC address programming
  70. #chown bluetooth bluetooth ro.bt.bdaddr_path
  71. #chown bluetooth bluetooth /system/etc/bluetooth
  72. #setprop ro.bt.bdaddr_path "/system/etc/bluetooth/bdaddr"
  73.  
  74. # backlight
  75. chown system system /sys/class/backlight/nbx02_backlight/brightness
  76. chmod 0664 /sys/class/backlight/nbx02_backlight/brightness
  77.  
  78. # led
  79. chown system system /sys/class/leds/info:red/brightness
  80. chown system system /sys/class/leds/info:green/brightness
  81. chown system system /sys/class/leds/info:blue/brightness
  82. chown system system /sys/class/leds/info:blink/delay_on
  83. chown system system /sys/class/leds/info:blink/delay_off
  84.  
  85. # EC
  86. chown system system /sys/firmware/ec/version
  87. chmod 444 /sys/firmware/ec/version
  88.  
  89. # Sensor
  90. chmod 666 /dev/nvhost-ctrl
  91. chmod 666 /dev/nvhost-display
  92. chmod 666 /dev/nvhost-dsi
  93. chmod 666 /dev/nvhost-gr2d
  94. chmod 666 /dev/nvhost-gr3d
  95. chmod 666 /dev/nvhost-isp
  96. chmod 666 /dev/nvhost-mpe
  97. chmod 666 /dev/nvhost-vi
  98. chmod 664 /sys/bus/iio/devices/device0/lux
  99. chmod 664 /sys/bus/iio/devices/device0/proxim_ir
  100.  
  101. wait /dev/nbx_accelerometer
  102. wait /dev/nbx_magnetometer
  103. wait /dev/nbx_gyroscope
  104. wait /dev/nbx_lightsensor
  105.  
  106. chmod 0660 /dev/nbx_accelerometer
  107. chown system system /dev/nbx_accelerometer
  108. chmod 0660 /dev/nbx_magnetometer
  109. chown system system /dev/nbx_magnetometer
  110. chmod 0660 /dev/nbx_gyroscope
  111. chown system system /dev/nbx_gyroscope
  112. chmod 0660 /dev/nbx_lightsensor
  113. chown system system /dev/nbx_lightsensor
  114.  
  115. # Power management settings
  116. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 216000
  117. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1000000
  118. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
  119. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 216000
  120. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1000000
  121. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
  122. write /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load 80
  123.  
  124. # GPS
  125. write /sys/class/gpio/export 203
  126. write /sys/class/gpio/gpio203/value 0
  127. write /sys/class/gpio/gpio203/direction out
  128. chown system system /sys/power/gps/notifier
  129. chmod 0600 /sys/power/gps/notifier
  130.  
  131. # WWAN
  132. chown radio radio /sys/power/ril/notifier
  133. chmod 0600 /sys/power/ril/notifier
  134.  
  135. # [HWENABLE-43]
  136. # write /sys/power/wake_lock 1
  137.  
  138. # [AOS-1441] (Updater)
  139. chown root system /dev/block/mmcblk0p5
  140. chown root system /dev/block/mmcblk0p7
  141. chmod 0660 /dev/block/mmcblk0p5
  142. chmod 0660 /dev/block/mmcblk0p7
  143.  
  144. mkdir /cache/recovery
  145. chown system system /cache/recovery
  146. chmod 0700 /cache/recovery
  147.  
  148. service wpa_supplicant /system/bin/wpa_supplicant \
  149. -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -W
  150. # we will start as root and wpa_supplicant will switch to user wifi
  151. # after setting up the capabilities required for WEXT
  152. # user wifi
  153. # group wifi inet keystore
  154. class main
  155. socket wpa_wlan0 dgram 660 wifi wifi
  156. disabled
  157. oneshot
  158.  
  159. service dhcpcd_wlan0 /system/bin/dhcpcd -BL
  160. class main
  161. disabled
  162. oneshot
  163.  
  164. service dhcpcd_eth0 /system/bin/dhcpcd -ABKL -f/system/etc/dhcpcd/dhcpcd.conf
  165. class main
  166. disabled
  167. oneshot
  168.  
  169. service iprenew_wlan0 /system/bin/dhcpcd -n
  170. disabled
  171. oneshot
  172.  
  173. service iprenew_eth0 /system/bin/dhcpcd -n
  174. disabled
  175. oneshot
  176.  
  177.  
  178. # Atheros +++
  179. on post-fs-data
  180. # Create the directories used by the Wireless subsystem
  181. mkdir /data/misc/wifi 0770 wifi system
  182. mkdir /data/misc/wifi/wapi_certificate 0770 wifi system
  183. chown wifi wifi /system/etc/wifi/wpa_supplicant.conf
  184. chmod 0660 /system/etc/wifi/wpa_supplicant.conf
  185. mkdir /data/misc/dhcp 0777 system system
  186. mkdir /data/misc/wifi/sockets 0777 system system
  187. mkdir /data/system 0777 system system
  188. mkdir /data/system/wpa_supplicant 0777 wifi wifi
  189.  
  190. # wlan_tool is not used
  191. #service wpa_supplicant /system/bin/wlan_tool wpa_supplicant
  192. # disabled
  193. # oneshot
  194.  
  195. # wlan_tool is not used
  196. #service dhcpcd /system/bin/wlan_tool dhcpcd
  197. # disabled
  198. # oneshot
  199.  
  200. service wlan_tool /system/bin/wlan_tool
  201. oneshot
  202.  
  203. # wlan_tool is not used
  204. #service abtfilt /system/bin/wlan_tool abtfilt
  205. # disabled
  206. # oneshot
  207.  
  208. # hostapd is disabled for nbx03
  209. #service hostapd /system/bin/hostapd /data/misc/wifi/hostapd.conf
  210. # socket hostapd_wlan1 dgram 660 root wifi
  211. # user system
  212. # group wifi system inet net_admin net_raw keystore
  213. # oneshot
  214. # disabled
  215. # Atheros ---
  216.  
  217. # create virtual SD card at /mnt/sdcard, based on the /data/media directory
  218. # deamon will drop to user/group system/media_rw after initializing
  219. # underlying files in /data/media wil be created with user and group media_rw (1023)
  220. #service sdcard /system/bin/sdcard /data/media 1023 1023
  221. # class late_start
  222.  
  223. # bugreport is triggered by the VOLUME-DOWN and VOLUME-UP keys
  224. service bugreport /system/bin/dumpstate -d -v -o /data/storage/bugreports/bugreport
  225. class main
  226. disabled
  227. oneshot
  228. keycodes 115 114
  229.  
  230. #BCM
  231. #service hciattach /system/bin/brcm_patchram_plus --enable_hci \
  232. # --baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd --pcm_role slave \
  233. # --enable_lpm /dev/ttyHS2
  234. # class main
  235. # user bluetooth
  236. # group bluetooth net_bt_admin
  237. # disabled
  238.  
  239. ##CSR
  240. service abtfilt /system/bin/abtfilt -d -z -n -v -s
  241. class main
  242. user system
  243. group system wifi bluetooth inet net_admin net_bt_admin net_raw misc
  244. oneshot
  245. disabled
  246.  
  247. service hciattach /system/bin/nv_hciattach -n -t 100 -s 921600 ttyHS2 csr_tegra 3500000 flow
  248. class main
  249. user bluetooth
  250. group system bluetooth net_bt_admin misc
  251. oneshot
  252. disabled
  253.  
  254. # Start GPS daemon
  255. service gps-daemon /system/bin/glgps_nvidiaTegra2android -c /system/etc/gps/gpsconfig.xml
  256. class late_start
  257. user root
  258. group root
  259.  
  260. ## Mount usb drives as /usbdrive. Generally usb drives are formatted with FAT
  261. ## filesystem, so we support FAT as of now.
  262. #on device-added-/sys/block/sda
  263. # mount vfat /dev/block/sda /mnt/usbdrive
  264. #
  265. #on device-removed-/sys/block/sda
  266. # umount /mnt/usbdrive
  267.  
  268. #Prepare TF service
  269. service tf_daemon /system/bin/tf_daemon -storageDir /data/tf -d
  270. disabled
  271. class main
  272. user root
  273. group shell
  274. oneshot
  275.  
  276. #Create data directory and start service
  277. on property:tf.enable=y
  278. mkdir /data/tf
  279. start tf_daemon
  280.  
  281. # Disable autosuspend for ehci.2 host and root-hub
  282. on boot
  283. write /sys/devices/platform/tegra-ehci.2/usb1/power/control on
  284. write /sys/devices/platform/tegra-ehci.2/usb1/1-0:1.0/power/control on
  285.  
  286. # Create symlink for wdm driver
  287. symlink /dev/bus/usb/002/049 /dev/cdc-wdm0
  288. symlink /dev/bus/usb/002/050 /dev/cdc-wdm1
  289.  
  290. # quick_tp insmod
  291. on boot
  292. insmod /system/lib/modules/quick_tp.ko
  293.  
  294. # Start LogService
  295. service nfx_log_service /system/bin/nfx_log_service
  296. class core
  297. user root
  298. group root
  299.  
  300. # volume limitation
  301. on property:ro.sony.volume_limit=1
  302. write /sys/class/sound/vol_limit/state 1
  303.  
  304. on property:ro.sony.volume_limit=0
  305. write /sys/class/sound/vol_limit/state 0
  306.  
  307. #start here
  308. on boot
  309. class_start core
  310. class_start main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement