s5neolte: import device specific ramdisk
authorStricted <info@stricted.net>
Sun, 23 Sep 2018 00:35:44 +0000 (02:35 +0200)
committerJan Altensen <info@stricted.net>
Mon, 12 Aug 2019 07:19:00 +0000 (09:19 +0200)
Change-Id: I703f52c105c489c1cca7594b55afa5e39560609c

device.mk
ramdisk/Android.mk [new file with mode: 0644]
ramdisk/etc/init.target.rc [new file with mode: 0644]

index 356e0a86c5f28a226cdefd81fd9b4752c0c91987..d0b80c7cd272f439e3328525437ba1381cea8bfd 100644 (file)
--- 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 (file)
index 0000000..6685b24
--- /dev/null
@@ -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 (file)
index 0000000..080053c
--- /dev/null
@@ -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