Dmitry Shmidt | d711433 | 2015-12-10 10:35:59 -0800 | [diff] [blame] | 1 | import init.hikey.usb.rc |
| 2 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 3 | on init |
| 4 | # mount debugfs |
| 5 | mount debugfs /sys/kernel/debug /sys/kernel/debug |
| 6 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 7 | # disable transparent huge pages |
| 8 | write /sys/kernel/mm/transparent_hugepage/enabled "never" |
| 9 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 10 | # 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 Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 14 | on fs |
| 15 | mount_all /fstab.hikey |
| 16 | setprop ro.crypto.fuse_sdcard false |
| 17 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 18 | on post-fs-data |
| 19 | mkdir /data/media 0770 media_rw media_rw |
| 20 | mkdir /data/misc/gatord 0700 root root |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 21 | # Set SELinux security contexts for files used by lava. |
| 22 | restorecon_recursive /data/local/tmp/lava |
| 23 | |
| 24 | on post-fs |
Yongqin Liu | 962fa60 | 2016-03-23 21:22:57 +0800 | [diff] [blame] | 25 | |
| 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 Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 32 | # 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 Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 37 | 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 Liu | 416a19b | 2016-03-23 21:35:50 +0800 | [diff] [blame] | 51 | # 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 | |
John Stultz | 6a4721f | 2016-08-17 17:48:15 -0700 | [diff] [blame] | 70 | # |
| 71 | # EAS stune boosting interfaces |
| 72 | # |
| 73 | chown system system /sys/fs/cgroup/stune/foreground/schedtune.boost |
| 74 | chown system system /sys/fs/cgroup/stune/schedtune.boost |
| 75 | write /sys/fs/cgroup/stune/foreground/schedtune.boost 10 |
| 76 | write /sys/fs/cgroup/stune/schedtune.boost 0 |
| 77 | |
| 78 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 79 | # enable Google-specific location features, |
| 80 | # like NetworkLocationProvider and LocationCollector |
| 81 | setprop ro.com.google.locationfeatures 1 |
| 82 | |
| 83 | # enable test harness |
| 84 | setprop ro.test_harness true |
| 85 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 86 | on property:usb_speed.switch=high |
| 87 | write /sys/kernel/debug/f72c0000.usb/config "0" |
| 88 | |
| 89 | on property:usb_speed.switch=full |
| 90 | write /sys/kernel/debug/f72c0000.usb/config "1" |
| 91 | |
| 92 | #userspace daemon needed for bluetooth |
| 93 | service uim /system/bin/uim |
| 94 | class main |
Yongqin Liu | 6c1cf5e | 2016-06-16 23:33:50 +0800 | [diff] [blame] | 95 | user bluetooth |
| 96 | group bluetooth net_bt_admin system net_bt_stack |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 97 | oneshot |
| 98 | |
| 99 | service wpa_supplicant /system/bin/wpa_supplicant \ |
| 100 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
| 101 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 |
| 102 | socket wpa_wlan0 dgram 660 wifi wifi |
| 103 | class main |
| 104 | disabled |
| 105 | oneshot |
| 106 | |
Dmitry Shmidt | 4c12384 | 2016-05-18 15:58:08 -0700 | [diff] [blame] | 107 | service dhcpcd_wlan0 /system/bin/dhcpcd -dABKL -f /system/etc/dhcpcd/dhcpcd.conf wlan0 |
Dmitry Shmidt | 43780b1 | 2016-03-17 10:42:10 -0700 | [diff] [blame] | 108 | group dhcp |
| 109 | disabled |
| 110 | oneshot |
| 111 | |
Dmitry Shmidt | 4c12384 | 2016-05-18 15:58:08 -0700 | [diff] [blame] | 112 | service dhcpcd_eth0 /system/bin/dhcpcd -dABKL -f /system/etc/dhcpcd/dhcpcd.conf eth0 |
Dmitry Shmidt | 43780b1 | 2016-03-17 10:42:10 -0700 | [diff] [blame] | 113 | group dhcp |
| 114 | disabled |
| 115 | oneshot |
| 116 | |
Dmitry Shmidt | 4c12384 | 2016-05-18 15:58:08 -0700 | [diff] [blame] | 117 | service dhcpcd_usb0 /system/bin/dhcpcd -dABKL -f /system/etc/dhcpcd/dhcpcd.conf usb0 |
Amit Pundir | d2f8a83 | 2016-04-12 00:29:09 +0530 | [diff] [blame] | 118 | group dhcp |
| 119 | disabled |
| 120 | oneshot |
| 121 | |
Dmitry Shmidt | 4c12384 | 2016-05-18 15:58:08 -0700 | [diff] [blame] | 122 | service iprenew_usb0 /system/bin/dhcpcd -n usb0 |
Amit Pundir | d2f8a83 | 2016-04-12 00:29:09 +0530 | [diff] [blame] | 123 | class main |
| 124 | disabled |
| 125 | oneshot |
| 126 | |
Dmitry Shmidt | 4c12384 | 2016-05-18 15:58:08 -0700 | [diff] [blame] | 127 | service dhcpcd_bt-pan /system/bin/dhcpcd -dABKL -f /system/etc/dhcpcd/dhcpcd.conf bt-pan0 |
Dmitry Shmidt | 43780b1 | 2016-03-17 10:42:10 -0700 | [diff] [blame] | 128 | group dhcp |
| 129 | disabled |
| 130 | oneshot |