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 | 05ba086 | 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 |
Yongqin Liu | 05ba086 | 2016-03-23 21:22:57 +0800 | [diff] [blame] | 29 | symlink /sdcard /storage/sdcard0 |
| 30 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 31 | # 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 Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 36 | 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 | |
Yongqin Liu | 16c8b0a | 2016-03-23 21:35:50 +0800 | [diff] [blame] | 50 | # update cpuset now that processors are up |
John Stultz | 2d63a36 | 2016-08-23 10:56:20 -0700 | [diff] [blame] | 51 | # Foreground should contain most cores (7 is reserved for top-app) |
| 52 | write /dev/cpuset/foreground/cpus 0-6 |
Yongqin Liu | 16c8b0a | 2016-03-23 21:35:50 +0800 | [diff] [blame] | 53 | |
John Stultz | 2d63a36 | 2016-08-23 10:56:20 -0700 | [diff] [blame] | 54 | # top-app gets all cpus (including reserved #7) |
| 55 | write /dev/cpuset/top-app/cpus 0-7 |
Yongqin Liu | 16c8b0a | 2016-03-23 21:35:50 +0800 | [diff] [blame] | 56 | |
| 57 | #background contains a small subset (generally one little core) |
| 58 | write /dev/cpuset/background/cpus 0 |
| 59 | |
| 60 | # add system-background cpuset, a new cpuset for system services |
| 61 | # that should not run on larger cores |
| 62 | # system-background is for system tasks that should only run on |
| 63 | # little cores, not on bigs to be used only by init |
John Stultz | 2d63a36 | 2016-08-23 10:56:20 -0700 | [diff] [blame] | 64 | write /dev/cpuset/system-background/cpus 0-3 |
Yongqin Liu | 16c8b0a | 2016-03-23 21:35:50 +0800 | [diff] [blame] | 65 | |
John Stultz | 6a4721f | 2016-08-17 17:48:15 -0700 | [diff] [blame] | 66 | # |
| 67 | # EAS stune boosting interfaces |
| 68 | # |
John Stultz | 884c713 | 2016-08-24 20:19:35 -0700 | [diff] [blame] | 69 | chown system system /dev/stune/foreground/schedtune.boost |
| 70 | chown system system /dev/stune/schedtune.boost |
| 71 | write /dev/stune/foreground/schedtune.boost 10 |
| 72 | write /dev/stune/schedtune.boost 0 |
John Stultz | 6a4721f | 2016-08-17 17:48:15 -0700 | [diff] [blame] | 73 | |
| 74 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 75 | # enable Google-specific location features, |
| 76 | # like NetworkLocationProvider and LocationCollector |
| 77 | setprop ro.com.google.locationfeatures 1 |
| 78 | |
| 79 | # enable test harness |
| 80 | setprop ro.test_harness true |
| 81 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 82 | on property:usb_speed.switch=high |
| 83 | write /sys/kernel/debug/f72c0000.usb/config "0" |
| 84 | |
| 85 | on property:usb_speed.switch=full |
| 86 | write /sys/kernel/debug/f72c0000.usb/config "1" |
| 87 | |
| 88 | #userspace daemon needed for bluetooth |
| 89 | service uim /system/bin/uim |
| 90 | class main |
Yongqin Liu | 6c1cf5e | 2016-06-16 23:33:50 +0800 | [diff] [blame] | 91 | user bluetooth |
| 92 | group bluetooth net_bt_admin system net_bt_stack |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 93 | oneshot |
| 94 | |
| 95 | service wpa_supplicant /system/bin/wpa_supplicant \ |
| 96 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
| 97 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 |
| 98 | socket wpa_wlan0 dgram 660 wifi wifi |
| 99 | class main |
| 100 | disabled |
| 101 | oneshot |