blob: a144ca6b39c1a3d54165d15aa6fef3c530665f30 [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
Yongqin Liu05ba0862016-03-23 21:22:57 +080029 symlink /sdcard /storage/sdcard0
30
Vishal Bhoje72c9202015-10-23 18:10:21 +010031 # BT LED sysfs entry
32 write /sys/devices/leds/leds/bt_active/trigger "hci1rx"
33
34 chmod 0666 /dev/ump
35 chmod 0666 /dev/ion
Vishal Bhoje72c9202015-10-23 18:10:21 +010036 chmod 0666 /dev/graphics/fb0
37
38# fake some battery state
39 setprop status.battery.state Slow
40 setprop status.battery.level 5
41 setprop status.battery.level_raw 50
42 setprop status.battery.level_scale 9
43
44# Set Display density
45 setprop ro.sf.lcd_density 160
46
47# Set supported opengles version
48 setprop ro.opengles.version 196608
49
50# change permissions for process groups
51# https://bugs.launchpad.net/bugs/1037611
52 chmod 0660 /dev/cpuctl
53
Yongqin Liu16c8b0a2016-03-23 21:35:50 +080054 # update cpuset now that processors are up
55 # Foreground should contain all cores
56 write /dev/cpuset/foreground/cpus 0-7
57
58 # Add foreground/boost cpuset, it is used for app launches,
59 # and maybe other high priority tasks in the future.
60 # It's to be set to whatever cores should be used
61 # for short term high-priority tasks.
62 write /dev/cpuset/foreground/boost/cpus 0-7
63
64 #background contains a small subset (generally one little core)
65 write /dev/cpuset/background/cpus 0
66
67 # add system-background cpuset, a new cpuset for system services
68 # that should not run on larger cores
69 # system-background is for system tasks that should only run on
70 # little cores, not on bigs to be used only by init
71 write /dev/cpuset/system-background/cpus 0-4
72
Vishal Bhoje72c9202015-10-23 18:10:21 +010073# enable Google-specific location features,
74# like NetworkLocationProvider and LocationCollector
75 setprop ro.com.google.locationfeatures 1
76
77# enable test harness
78 setprop ro.test_harness true
79
Vishal Bhoje72c9202015-10-23 18:10:21 +010080on property:usb_speed.switch=high
81 write /sys/kernel/debug/f72c0000.usb/config "0"
82
83on property:usb_speed.switch=full
84 write /sys/kernel/debug/f72c0000.usb/config "1"
85
86#userspace daemon needed for bluetooth
87service uim /system/bin/uim
88 class main
89 user root
90 oneshot
91
92service wpa_supplicant /system/bin/wpa_supplicant \
93 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
94 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
95 socket wpa_wlan0 dgram 660 wifi wifi
96 class main
97 disabled
98 oneshot
99