summaryrefstree
path: root/aosp-device-tree/rootdir/etc/init.rk356x.rc
blob: 575f3dbd7433590b6620419efc819903a05cdab9 (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
on property:sys.boot_completed=1
    chown system system /sys/class/devfreq/ff400000.gpu/governor
    chown system system /sys/class/devfreq/ff400000.gpu/min_freq
    chown system system /sys/class/devfreq/ff400000.gpu/max_freq

    chmod 0664 /sys/class/devfreq/ff400000.gpu/governor
    chmod 0664 /sys/class/devfreq/ff400000.gpu/min_freq
    chmod 0664 /sys/class/devfreq/ff400000.gpu/max_freq

    write /sys/devices/system/cpu/cpufreq/policy0/interactive/target_loads 65

on boot
    chown system system /sys/class/thermal/thermal_zone0/policy
    chown system system /sys/class/thermal/thermal_zone1/policy
    chown system system /sys/class/thermal/thermal_zone2/policy

    write /dev/cpuset/foreground/cpus 0-3
    write /dev/cpuset/foreground/boost/cpus 0-3
    write /dev/cpuset/background/cpus 0-2
    write /dev/cpuset/system-background/cpus 0-2
    write /dev/cpuset/top-app/cpus 0-3

    # reduce schedul time to improve io performance
    write /sys/kernel/debug/sched_features NO_ENERGY_AWARE
    #start naner_interface

#enable ZRAM
on property:sys.boot_completed=1
    write /proc/sys/vm/swappiness 150
    write /proc/sys/vm/page-cluster  0
    write /sys/block/zram0/max_comp_streams 7
    write /sys/block/zram0/comp_algorithm lz4
    # Clean writeback file.
    # exec /system/bin/dd  if=/dev/zero of=/data/per_boot/zram_swap bs=1024 count=262144
    swapon_all /vendor/etc/fstab.enableswap
    start preset_data_copy
    

on init
    chown system system /sys/system_monitor/system_status
    chmod 0666 /sys/system_monitor/system_status

    chown system system /sys/class/devfreq/dmc/system_status
    chmod 0666 /sys/class/devfreq/dmc/system_status

    chown system system /sys/class/rtc/rtc0/wakealarm
    chmod 0666 /sys/class/rtc/rtc0/wakealarm

    chmod 0775 /vendor/bin/naner_interface.sh

    chmod 0775 /vendor/bin/preset_data_copy.sh

on property:cts_gts.status=true
    setprop vendor.hwc.compose_policy 2

on early-init
    mkdir /mnt/vendor/reserved 0775 system root

service vendor.restart_cameraserver  /vendor/bin/restart_cameraserver.sh
    class main
    user root
    group root system
    disabled
    oneshot

on property:persist.vendor.disablecamera=true
    start vendor.restart_cameraserver

#preset_data_copy set
service preset_data_copy /vendor/bin/preset_data_copy.sh
	class main
	user root
	group root
	disabled
	oneshot