summaryrefslogtreecommitdiffstats
path: root/rootdir/init.target.rc
blob: 55c7369901d67b7a817fa58d1ec6f4e12c6797a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
on init
    export LD_SHIM_LIBS /system/lib/libsec-ril.so|libsamsung_symbols.so
# ko files for FM Radio
    insmod /system/lib/modules/Si4709_driver.ko
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/boost_freq
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/boost_lock_time
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/boost_mincpus
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_freq
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_down_rate
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_up_freq
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpu_up_rate
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/cpucore_table
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/down_differential
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/dvfs_debug
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/freq_step
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_1_1
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_0
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_2_1
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_3_0
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_3_1
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_freq_4_0
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_lock
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_1_1
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_0
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_2_1
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_3_0
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_3_1
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/hotplug_rq_4_0
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/ignore_nice_load
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/io_is_busy
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/up_threshold
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/min_cpu_lock
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/max_cpu_lock
    chown system system /sys/devices/system/cpu/cpufreq/pegasusq/sampling_rate

on boot
    # Flash storage isn't a good entropy source, and only causes
    # locking overhead in the kernel. Turn it off.
    write /sys/block/mmcblk0/queue/add_random 0
    write /sys/block/mmcblk1/queue/add_random 0

    # KSM
    write /sys/kernel/mm/ksm/deferred_timer 1
    write /sys/kernel/mm/ksm/pages_to_scan 100
    write /sys/kernel/mm/ksm/sleep_millisecs 500
    write /sys/kernel/mm/ksm/run 0

    # Swapping 1 page at a time is ok
    write /proc/sys/vm/page-cluster 0

    write /proc/sys/vm/swappiness 100

    # increase read-ahead value to 256 kb
    write /sys/block/mmcblk0/queue/read_ahead_kb 256

on post-fs-data
# icd
    exec icd_check
    chown system system /dev/icd
    chmod 0644 /dev/icd
    write /dev/icdr 0
    chown system system /dev/icdr
    chmod 0644 /dev/icdr
    chown system system /dev/tzic

# make param block device link for SysScope
    symlink /dev/block/mmcblk0p4 /dev/block/param

# Restorecon
    restorecon_recursive /efs

# GPS init
    mkdir /data/gps
    chown gps system /data/gps
    chmod 1770 /data/gps
    write /sys/class/sec/gps/GPS_PWR_EN/export 162
    write /sys/class/sec/gps/GPS_PWR_EN/value 0
    write /sys/class/sec/gps/GPS_PWR_EN/direction out
    chown gps system /sys/class/sec/gps/GPS_PWR_EN/value
    chmod 0664 /sys/class/sec/gps/GPS_PWR_EN/value
    chown gps system /dev/ttySAC1
    chmod 0660 /dev/ttySAC1
    restorecon /sys/class/sec/gps/export
    restorecon /sys/class/sec/gps/GPS_PWR_EN/value
    restorecon /sys/class/sec/gps/GPS_PWR_EN/direction

    write /data/.cid.info 0
    restorecon /data/.cid.info
    restorecon /data/ISP_CV

on fs
    # zram
    swapon_all /fstab.smdk4x12

on boot
# cbd
service cpboot-daemon /sbin/cbd -d
    class main
    user root
    group radio cache inet misc audio sdcard_rw log
    seclabel u:r:cpboot-daemon:s0


# Start GPS daemon
service gps-daemon /system/bin/sh /system/bin/gps_daemon.sh
    class main
    socket gps seqpacket 0660 gps system
    user gps
    group system inet sdcard_rw gps
    seclabel u:r:glgps:s0