/
init.system.rpi4.rc
executable file
·56 lines (45 loc) · 1.62 KB
/
init.system.rpi4.rc
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
on post-fs-data
chmod 0660 /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
# gpio
chown system system /dev/gpiochip0
chmod 0666 /dev/gpiochip0
chown system system /dev/gpiochip1
chmod 0666 /dev/gpiochip1
mkdir /data/gpio 0777 system system
# cpufreq tuning
on property:persist.rpi4.cpufreq.governor=*
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ${persist.rpi4.cpufreq.governor}
on property:persist.rpi4.cpufreq.max_freq=*
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq ${persist.rpi4.cpufreq.max_freq}
on property:sys.rpi4.boot_mode=recovery
start switch_boot_recovery
on property:sys.rpi4.boot_mode=rom
start switch_boot_rom
service switch_boot_recovery /system/xbin/switch_boot recovery
user root
group system
disabled
oneshot
service switch_boot_rom /system/xbin/switch_boot rom
user root
group system
disabled
oneshot
on property:persist.rpi4.gpiod.options=* && property:persist.rpi4.gpiod.lines=* && property:sys.boot_completed=1
stop gpiod
start gpiod
service gpiod /system/bin/gpiod ${persist.rpi4.gpiod.options} ${persist.rpi4.gpiod.lines}
user root
group system
disabled
oneshot
on property:persist.rpi4.gpiosetd.options=* && property:persist.rpi4.gpiosetd.values=* && property:sys.boot_completed=1
stop gpiosetd
start gpiosetd
service gpiosetd /system/bin/gpiosetd ${persist.rpi4.gpiosetd.options} ${persist.rpi4.gpiosetd.values}
user system
group system
disabled
oneshot