blob: 93e40ed53489f796f24d625077ae9b96a718f9c4 [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
Vishal Bhoje72c9202015-10-23 18:10:21 +010014on fs
15 mount_all /fstab.hikey
16 setprop ro.crypto.fuse_sdcard false
17
Vishal Bhoje72c9202015-10-23 18:10:21 +010018on post-fs-data
19 mkdir /data/media 0770 media_rw media_rw
20 mkdir /data/misc/gatord 0700 root root
Vishal Bhoje72c9202015-10-23 18:10:21 +010021 # Set SELinux security contexts for files used by lava.
22 restorecon_recursive /data/local/tmp/lava
23
24on post-fs
Yongqin Liu05ba0862016-03-23 21:22:57 +080025
26 # For legacy support
27 # See storage config details at http://source.android.com/tech/storage/
28 # since /storage is mounted on post-fs in init.rc
29 symlink /sdcard /mnt/sdcard
30 symlink /sdcard /storage/sdcard0
31
Vishal Bhoje72c9202015-10-23 18:10:21 +010032 # insert WiFi Modules
33 insmod /system/modules/rfkill.ko
34 insmod /system/modules/wifi/compat.ko
35 insmod /system/modules/wifi/cfg80211.ko
36 insmod /system/modules/wifi/mac80211.ko
37 insmod /system/modules/wifi/wlcore.ko
38 insmod /system/modules/wifi/wl18xx.ko
39 insmod /system/modules/wifi/wlcore_sdio.ko
40
41 # BT LED sysfs entry
42 write /sys/devices/leds/leds/bt_active/trigger "hci1rx"
43
44 chmod 0666 /dev/ump
45 chmod 0666 /dev/ion
Vishal Bhoje72c9202015-10-23 18:10:21 +010046 chmod 0666 /dev/graphics/fb0
47
48# fake some battery state
49 setprop status.battery.state Slow
50 setprop status.battery.level 5
51 setprop status.battery.level_raw 50
52 setprop status.battery.level_scale 9
53
54# Set Display density
55 setprop ro.sf.lcd_density 160
56
57# Set supported opengles version
58 setprop ro.opengles.version 196608
59
60# change permissions for process groups
61# https://bugs.launchpad.net/bugs/1037611
62 chmod 0660 /dev/cpuctl
63
64# enable Google-specific location features,
65# like NetworkLocationProvider and LocationCollector
66 setprop ro.com.google.locationfeatures 1
67
68# enable test harness
69 setprop ro.test_harness true
70
Vishal Bhoje72c9202015-10-23 18:10:21 +010071on property:usb_speed.switch=high
72 write /sys/kernel/debug/f72c0000.usb/config "0"
73
74on property:usb_speed.switch=full
75 write /sys/kernel/debug/f72c0000.usb/config "1"
76
77#userspace daemon needed for bluetooth
78service uim /system/bin/uim
79 class main
80 user root
81 oneshot
82
83service wpa_supplicant /system/bin/wpa_supplicant \
84 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
85 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
86 socket wpa_wlan0 dgram 660 wifi wifi
87 class main
88 disabled
89 oneshot
90
Dmitry Shmidt43780b12016-03-17 10:42:10 -070091service dhcpcd_wlan0 /system/bin/dhcpcd -dABKL
92 group dhcp
93 disabled
94 oneshot
95
96service dhcpcd_eth0 /system/bin/dhcpcd -dABKL
97 group dhcp
98 disabled
99 oneshot
100
101service dhcpcd_bt-pan /system/bin/dhcpcd -dABKL
102 group dhcp
103 disabled
104 oneshot