blob: bf16d918b0aa0aa9d2f03356ded8a7b47b74c01a [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 Liu962fa602016-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 # BT LED sysfs entry
33 write /sys/devices/leds/leds/bt_active/trigger "hci1rx"
34
35 chmod 0666 /dev/ump
36 chmod 0666 /dev/ion
Vishal Bhoje72c9202015-10-23 18:10:21 +010037 chmod 0666 /dev/graphics/fb0
38
39# fake some battery state
40 setprop status.battery.state Slow
41 setprop status.battery.level 5
42 setprop status.battery.level_raw 50
43 setprop status.battery.level_scale 9
44
45# Set Display density
46 setprop ro.sf.lcd_density 160
47
48# Set supported opengles version
49 setprop ro.opengles.version 196608
50
Yongqin Liu416a19b2016-03-23 21:35:50 +080051 # update cpuset now that processors are up
52 # Foreground should contain all cores
53 write /dev/cpuset/foreground/cpus 0-7
54
55 # Add foreground/boost cpuset, it is used for app launches,
56 # and maybe other high priority tasks in the future.
57 # It's to be set to whatever cores should be used
58 # for short term high-priority tasks.
59 write /dev/cpuset/foreground/boost/cpus 0-7
60
61 #background contains a small subset (generally one little core)
62 write /dev/cpuset/background/cpus 0
63
64 # add system-background cpuset, a new cpuset for system services
65 # that should not run on larger cores
66 # system-background is for system tasks that should only run on
67 # little cores, not on bigs to be used only by init
68 write /dev/cpuset/system-background/cpus 0-4
69
Vishal Bhoje72c9202015-10-23 18:10:21 +010070# enable Google-specific location features,
71# like NetworkLocationProvider and LocationCollector
72 setprop ro.com.google.locationfeatures 1
73
74# enable test harness
75 setprop ro.test_harness true
76
Vishal Bhoje72c9202015-10-23 18:10:21 +010077on property:usb_speed.switch=high
78 write /sys/kernel/debug/f72c0000.usb/config "0"
79
80on property:usb_speed.switch=full
81 write /sys/kernel/debug/f72c0000.usb/config "1"
82
83#userspace daemon needed for bluetooth
84service uim /system/bin/uim
85 class main
Yongqin Liu6c1cf5e2016-06-16 23:33:50 +080086 user bluetooth
87 group bluetooth net_bt_admin system net_bt_stack
Vishal Bhoje72c9202015-10-23 18:10:21 +010088 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 Shmidt4c123842016-05-18 15:58:08 -070098service dhcpcd_wlan0 /system/bin/dhcpcd -dABKL -f /system/etc/dhcpcd/dhcpcd.conf wlan0
Dmitry Shmidt43780b12016-03-17 10:42:10 -070099 group dhcp
100 disabled
101 oneshot
102
Dmitry Shmidt4c123842016-05-18 15:58:08 -0700103service dhcpcd_eth0 /system/bin/dhcpcd -dABKL -f /system/etc/dhcpcd/dhcpcd.conf eth0
Dmitry Shmidt43780b12016-03-17 10:42:10 -0700104 group dhcp
105 disabled
106 oneshot
107
Dmitry Shmidt4c123842016-05-18 15:58:08 -0700108service dhcpcd_usb0 /system/bin/dhcpcd -dABKL -f /system/etc/dhcpcd/dhcpcd.conf usb0
Amit Pundird2f8a832016-04-12 00:29:09 +0530109 group dhcp
110 disabled
111 oneshot
112
Dmitry Shmidt4c123842016-05-18 15:58:08 -0700113service iprenew_usb0 /system/bin/dhcpcd -n usb0
Amit Pundird2f8a832016-04-12 00:29:09 +0530114 class main
115 disabled
116 oneshot
117
Dmitry Shmidt4c123842016-05-18 15:58:08 -0700118service dhcpcd_bt-pan /system/bin/dhcpcd -dABKL -f /system/etc/dhcpcd/dhcpcd.conf bt-pan0
Dmitry Shmidt43780b12016-03-17 10:42:10 -0700119 group dhcp
120 disabled
121 oneshot