blob: 67b392b22ab6a64cf65704322f564af919b4b575 [file] [log] [blame]
Dmitry Shmidtd7114332015-12-10 10:35:59 -08001import init.hikey.usb.rc
2
Vishal Bhoje72c9202015-10-23 18:10:21 +01003on init
4 # mount debugfs
5 mount debugfs /sys/kernel/debug /sys/kernel/debug
6
Vishal Bhoje72c9202015-10-23 18:10:21 +01007 # disable transparent huge pages
8 write /sys/kernel/mm/transparent_hugepage/enabled "never"
9
Vishal Bhoje72c9202015-10-23 18:10:21 +010010 # Disabled virtual memory randomization
11 # (if randomization is enabled the AEM-JIT will have a lower cache hit rate)
12 write /proc/sys/kernel/randomize_va_space 0
13
14#bluetooth
15 #UART device
16 chmod 0660 /dev/ttyAMA1
17 chown bluetooth net_bt_stack /dev/ttyAMA1
18
19on fs
20 mount_all /fstab.hikey
21 setprop ro.crypto.fuse_sdcard false
22
Vishal Bhoje72c9202015-10-23 18:10:21 +010023on post-fs-data
24 mkdir /data/media 0770 media_rw media_rw
25 mkdir /data/misc/gatord 0700 root root
Vishal Bhoje72c9202015-10-23 18:10:21 +010026 # Set SELinux security contexts for files used by lava.
27 restorecon_recursive /data/local/tmp/lava
28
29on post-fs
Yongqin Liu962fa602016-03-23 21:22:57 +080030
31 # For legacy support
32 # See storage config details at http://source.android.com/tech/storage/
33 # since /storage is mounted on post-fs in init.rc
34 symlink /sdcard /mnt/sdcard
35 symlink /sdcard /storage/sdcard0
36
Vishal Bhoje72c9202015-10-23 18:10:21 +010037 # insert WiFi Modules
38 insmod /system/modules/rfkill.ko
39 insmod /system/modules/wifi/compat.ko
40 insmod /system/modules/wifi/cfg80211.ko
41 insmod /system/modules/wifi/mac80211.ko
42 insmod /system/modules/wifi/wlcore.ko
43 insmod /system/modules/wifi/wl18xx.ko
44 insmod /system/modules/wifi/wlcore_sdio.ko
45
46 # BT LED sysfs entry
47 write /sys/devices/leds/leds/bt_active/trigger "hci1rx"
48
49 chmod 0666 /dev/ump
50 chmod 0666 /dev/ion
51 chmod 0666 /dev/mali
52 chown system.graphics /dev/mali
53 chmod 0666 /dev/graphics/fb0
54
55# fake some battery state
56 setprop status.battery.state Slow
57 setprop status.battery.level 5
58 setprop status.battery.level_raw 50
59 setprop status.battery.level_scale 9
60
61# Set Display density
62 setprop ro.sf.lcd_density 160
63
64# Set supported opengles version
65 setprop ro.opengles.version 196608
66
67# change permissions for process groups
68# https://bugs.launchpad.net/bugs/1037611
69 chmod 0660 /dev/cpuctl
70
71# enable Google-specific location features,
72# like NetworkLocationProvider and LocationCollector
73 setprop ro.com.google.locationfeatures 1
74
75# enable test harness
76 setprop ro.test_harness true
77
Vishal Bhoje72c9202015-10-23 18:10:21 +010078on property:usb_speed.switch=high
79 write /sys/kernel/debug/f72c0000.usb/config "0"
80
81on property:usb_speed.switch=full
82 write /sys/kernel/debug/f72c0000.usb/config "1"
83
84#userspace daemon needed for bluetooth
85service uim /system/bin/uim
86 class main
87 user root
88 oneshot
89
90service wpa_supplicant /system/bin/wpa_supplicant \
91 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
92 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
93 socket wpa_wlan0 dgram 660 wifi wifi
94 class main
95 disabled
96 oneshot
97
Dmitry Shmidt43780b12016-03-17 10:42:10 -070098service dhcpcd_wlan0 /system/bin/dhcpcd -dABKL
99 group dhcp
100 disabled
101 oneshot
102
103service dhcpcd_eth0 /system/bin/dhcpcd -dABKL
104 group dhcp
105 disabled
106 oneshot
107
108service dhcpcd_bt-pan /system/bin/dhcpcd -dABKL
109 group dhcp
110 disabled
111 oneshot