From 3d3349607e0b16dca115c573bad913dcadc65a80 Mon Sep 17 00:00:00 2001 From: Stricted Date: Sun, 23 Sep 2018 02:35:44 +0200 Subject: [PATCH] s5neolte: import device specific ramdisk Change-Id: I703f52c105c489c1cca7594b55afa5e39560609c --- device.mk | 4 +++ ramdisk/Android.mk | 12 ++++++++ ramdisk/etc/init.target.rc | 62 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 ramdisk/Android.mk create mode 100644 ramdisk/etc/init.target.rc diff --git a/device.mk b/device.mk index 356e0a8..d0b80c7 100644 --- a/device.mk +++ b/device.mk @@ -18,5 +18,9 @@ LOCAL_PATH := device/samsung/s5neolte $(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk) +# Ramdisk +PRODUCT_PACKAGES += \ + init.target.rc + # Inherit from universal7580-common $(call inherit-product, device/samsung/universal7580-common/device-common.mk) diff --git a/ramdisk/Android.mk b/ramdisk/Android.mk new file mode 100644 index 0000000..6685b24 --- /dev/null +++ b/ramdisk/Android.mk @@ -0,0 +1,12 @@ +LOCAL_PATH := $(call my-dir) + +# Init scripts + +include $(CLEAR_VARS) +LOCAL_MODULE := init.target.rc +LOCAL_MODULE_TAGS := optional eng +LOCAL_MODULE_CLASS := ETC +LOCAL_SRC_FILES := etc/init.target.rc +LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) +include $(BUILD_PREBUILT) + diff --git a/ramdisk/etc/init.target.rc b/ramdisk/etc/init.target.rc new file mode 100644 index 0000000..080053c --- /dev/null +++ b/ramdisk/etc/init.target.rc @@ -0,0 +1,62 @@ + +on boot + # Ensure all CPUs are online (big cluster) + write /sys/devices/system/cpu/cpu4/online 1 + + # Update cpusets now that processors are up + write /dev/cpuset/foreground/cpus 0-3,4-7 + write /dev/cpuset/foreground/mems 0-3,4-7 + write /dev/cpuset/foreground/boost/cpus 4-7 + write /dev/cpuset/foreground/boost/mems 4-7 + write /dev/cpuset/background/cpus 0 + write /dev/cpuset/background/mems 0 + write /dev/cpuset/system-background/cpus 0-3 + write /dev/cpuset/system-background/mems 0-3 + write /dev/cpuset/top-app/cpus 0-7 + write /dev/cpuset/top-app/mems 0-7 + + # Change permission for nr_possible_cores + chown root system /sys/module/lazyplug/parameters/nr_possible_cores + chmod 0664 /sys/module/lazyplug/parameters/nr_possible_cores + + # Change permission for interactive governor + chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate + chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate + chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_slack + chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_slack + chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time + chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time + chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq + chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq + chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads + chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads + chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load + chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load + chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay + chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay + chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/boost + chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/boost + chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/boostpulse + chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/input_boost + chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/input_boost + chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/boostpulse_duration + chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/boostpulse_duration + chown system system /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy + chmod 0660 /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy + + # Permission for HALL IC + chown system system /sys/class/sec/sec_key/hall_detect + + # Assign TCP buffer thresholds to be ceiling value of technology maximums + # Increased technology maximums should be reflected here. + write /proc/sys/net/core/rmem_max 8388608 + write /proc/sys/net/core/wmem_max 8388608 + +on fs + # Permissions for LCD + chown system radio /sys/class/lcd/panel/mcd_mode + chown system media_rw /sys/class/backlight/panel/weakness_hbm_comp + +on property:sys.boot_completed=1 + write /proc/sys/vm/dirty_bytes 31457280 + write /proc/sys/vm/dirty_background_bytes 15728640 -- 2.20.1