summaryrefslogtreecommitdiff
path: root/init.common.rc
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2016-11-02 16:37:00 +0800
committerDmitry Shmidt <dimitrysh@google.com>2016-12-02 14:13:28 -0800
commitaf628c2c2edba962bcdcf8576af8ee2835545405 (patch)
tree279cb35b5a7ce670030370b8a01a591e230faeda /init.common.rc
parentcff48dd3ba47e8657a7b618723b58325e50ab5af (diff)
downloadhikey-af628c2c2edba962bcdcf8576af8ee2835545405.tar.gz
hikey: restructure hikey device configuration
No functional changes. Just moved around the configuration files and restructured them to support future hikey family devices. Similar to how Marlin and Sailfish devices are configured. Split the board configuration into BoardConfigCommon.mk (for common configuration) and hikey/BoardConfig.mk (for hikey specific configuration e.g. Image sizes and kernel commandline). Similarly split device.mk into device-common.mk and hikey/device-hikey.mk. Updated hikey.mk to include both device-common.mk and hikey/device-hikey.mk. Renamed init.hikey.rc to init.common.rc and modified it to import init.${ro.hardware}.usb.rc and mount fstab.${ro.hardware} instead. Changes to be committed: renamed: BoardConfig.mk => BoardConfigCommon.mk (68%) renamed: hikey.kl => common.kl (100%) renamed: device.mk => device-common.mk (74%) modified: hikey.mk new file: hikey/BoardConfig.mk renamed: board-info.txt => hikey/board-info.txt (100%) new file: hikey/device-hikey.mk renamed: fstab.hikey => hikey/fstab.hikey (100%) renamed: fstab.hikey-4.1 => hikey/fstab.hikey-4.1 (100%) renamed: init.hikey.rc => init.common.rc (97%) renamed: init.hikey.usb.rc => init.common.usb.rc (100%) renamed: ueventd.hikey.rc => ueventd.common.rc (100%) Test: Manual Change-Id: I032323aa8846a3bc144e40b4b5e5348c8f8d11c5 Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'init.common.rc')
-rw-r--r--init.common.rc103
1 files changed, 103 insertions, 0 deletions
diff --git a/init.common.rc b/init.common.rc
new file mode 100644
index 00000000..a13fa3ca
--- /dev/null
+++ b/init.common.rc
@@ -0,0 +1,103 @@
+import init.${ro.hardware}.usb.rc
+
+on init
+ # mount debugfs
+ mount debugfs /sys/kernel/debug /sys/kernel/debug
+
+ # disable transparent huge pages
+ write /sys/kernel/mm/transparent_hugepage/enabled "never"
+
+ # Disabled virtual memory randomization
+ # (if randomization is enabled the AEM-JIT will have a lower cache hit rate)
+ write /proc/sys/kernel/randomize_va_space 0
+
+on fs
+ mount_all /fstab.${ro.hardware}
+ setprop ro.crypto.fuse_sdcard false
+
+on post-fs-data
+ mkdir /data/media 0770 media_rw media_rw
+ mkdir /data/misc/gatord 0700 root root
+ # Set SELinux security contexts for files used by lava.
+ restorecon_recursive /data/local/tmp/lava
+
+on post-fs
+
+ # For legacy support
+ # See storage config details at http://source.android.com/tech/storage/
+ # since /storage is mounted on post-fs in init.rc
+ symlink /sdcard /storage/sdcard0
+
+ # BT LED sysfs entry
+ write /sys/class/leds/bt_active/trigger "hci1rx"
+
+ chmod 0666 /dev/ump
+ chmod 0666 /dev/ion
+ chmod 0666 /dev/graphics/fb0
+
+# fake some battery state
+ setprop status.battery.state Slow
+ setprop status.battery.level 5
+ setprop status.battery.level_raw 50
+ setprop status.battery.level_scale 9
+
+# Set Display density
+ setprop ro.sf.lcd_density 160
+
+# Set supported opengles version
+ setprop ro.opengles.version 196608
+
+ # update cpuset now that processors are up
+ # Foreground should contain most cores (7 is reserved for top-app)
+ write /dev/cpuset/foreground/cpus 0-6
+
+ # top-app gets all cpus (including reserved #7)
+ write /dev/cpuset/top-app/cpus 0-7
+
+ #background contains a small subset (generally one little core)
+ write /dev/cpuset/background/cpus 0
+
+ # add system-background cpuset, a new cpuset for system services
+ # that should not run on larger cores
+ # system-background is for system tasks that should only run on
+ # little cores, not on bigs to be used only by init
+ write /dev/cpuset/system-background/cpus 0-3
+
+ #
+ # EAS stune boosting interfaces
+ #
+ chown system system /dev/stune/foreground/schedtune.boost
+ chown system system /dev/stune/foreground/schedtune.prefer_idle
+ chown system system /dev/stune/schedtune.boost
+ write /dev/stune/foreground/schedtune.boost 10
+ write /dev/stune/foreground/schedtune.prefer_idle 1
+ write /dev/stune/schedtune.boost 0
+
+
+# enable Google-specific location features,
+# like NetworkLocationProvider and LocationCollector
+ setprop ro.com.google.locationfeatures 1
+
+# enable test harness
+ setprop ro.test_harness true
+
+on property:usb_speed.switch=high
+ write /sys/kernel/debug/f72c0000.usb/config "0"
+
+on property:usb_speed.switch=full
+ write /sys/kernel/debug/f72c0000.usb/config "1"
+
+#userspace daemon needed for bluetooth
+service uim /system/bin/uim
+ class main
+ user bluetooth
+ group bluetooth net_bt_admin system
+ oneshot
+
+service wpa_supplicant /system/bin/wpa_supplicant \
+ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
+ -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
+ socket wpa_wlan0 dgram 660 wifi wifi
+ class main
+ disabled
+ oneshot