forked from radxa/device-rockchip-common
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.rockchip.rc
executable file
·198 lines (157 loc) · 5.62 KB
/
init.rockchip.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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
import init.${ro.hardware}.usb.rc
import init.${ro.hardware}.environment.rc
import /init.debug.rc
on early-init
mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755
mount tracefs /sys/kernel/debug/tracing /sys/kernel/debug/tracing mode=755
chown system root /sys/kernel/debug/tracing
# Set up kernel tracing, but disable it by default
chmod 0222 /sys/kernel/debug/tracing/trace_marker
write /sys/kernel/debug/tracing/tracing_on 0
restorecon /sys/kernel/debug/tracing/trace_marker
restorecon_recursive /sys/kernel/debug/tracing/
on init
# start watchdogd
mkdir /metadata 0770 root root
# for adobe reader mobile
export RK_ADOBE_DE_MOBILE 1
export EBOOK_PAGE_VISIBLE_NUMBER 2
export RK_ADEPT_DEVICE_TYPE mobile
export RK_ADOBE_DE_DOC_FOLDER "/mnt/sdcard/Digital Editions"
export RK_ADEPT_ACTIVATION_FILE /mnt/sdcard/.adobe-digital-editions/activation.xml
export RK_ADEPT_DEVICE_FILE /mnt/sdcard/.adobe-digital-editions/device.xml
export RK_ADEPT_DEVICE_SALT_FILE /mnt/sdcard/.adobe-digital-editions/devicesalt
export ADOBE_FONTS_DIR /system/fonts/adobefonts/
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell/emulated 0700 shell shell
symlink /sdcard /mnt/sdcard
on post-fs
# Swap in only 1 page at a time
write /proc/sys/vm/page-cluster 0
on post-fs-data
# for optee data storage
mkdir /data/tee 0700 root root
# Now that are booted all the way and out of mount panics, ensure that we panic on later errors.
# This is a hack to work around the fact that we can't recover from all errors that would lead to a panic
# during the initial mount (http://b/17382778), yet we need to panic on emmc errors (http://b/17640053)
# For a remount only the flags and the target mount point are relevant.
mount dummy dummy /data remount nosuid nodev noatime rw seclabel,background_gc=on,user_xattr,acl,errors=panic
# we will remap this as /mnt/sdcard with the sdcard fuse tool
mkdir /data/media 0770 media_rw media_rw
chown media_rw media_rw /data/media
mkdir /data/camera 0775 media camera
setprop vold.post_fs_data_done 1
mkdir /data/system/gps 0775 root system
on boot
setprop UserVolumeLabel "RockChips"
# bluetooth
# change back to bluetooth from system
chown bluetooth net_bt_stack /data/misc/bluetooth
# power down interface
# write /sys/class/rfkill/rfkill0/state 0
service charger /charger
class charger
seclabel u:r:healthd:s0
# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
service watchdogd /sbin/watchdogd 10 20
class core
disabled
seclabel u:r:watchdogd:s0
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/dumpstate -d -p -B \
-o /data/data/com.android.shell/files/bugreports/bugreport
class late_start
disabled
oneshot
keycodes 114 115 116
service wfd /system/bin/wfd
class main
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service dhcpcd_bt-pan /system/bin/dhcpcd -aABDKL
class main
disabled
oneshot
service dhcpcd_eth0 /system/bin/dhcpcd -aABDKL
class late_start
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n
class late_start
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_bt-pan /system/bin/dhcpcd -n
class main
disabled
oneshot
on property:ro.factory.hasUMS=false
mount rootfs rootfs / ro remount
on property:ro.factory.hasUMS=cdrom
mount rootfs rootfs / ro remount
on property:ro.factory.hasUMS=true
mount rootfs rootfs / ro remount
stop sdcard
on property:ro.boot.charger.emmc=1
mount ext4 /dev/block/platform/emmc/by-name/system /system wait ro noatime nodiratime
start console
mount ext4 /dev/block/platform/emmc/by-name/metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc,discard
start charger
on property:ro.boot.charger.emmc=0
insmod /rk30xxnand_ko.ko
mount ext4 mtd@system /system wait ro noatime nodiratime noauto_da_alloc
start console
mount ext4 mtd@metadata /metadata wait noatime nodiratime nosuid nodev noauto_da_alloc
start charger
on charger
setprop ro.boot.charger.emmc 0
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /vendor/lib:/system/lib
setprop sys.usb.config adb
service akmd /system/bin/akmd
class main
user system
group system
oneshot
seclabel u:r:akmd:s0
on property:sys.gmali.performance=ui
start pat_ui
service pat_ui /system/bin/performance ui
disabled
oneshot
on property:sys.gmali.performance=video
start pat_video
service pat_video /system/bin/performance video
disabled
oneshot
#factory
on property:ro.factory.tool=1
write /sys/class/gsensor_class/orientation gsensor={-1,0,0,0,0,1,0,-1,0}
write /sys/devices/platform/rk29-keypad/rk29key {menu:MENU,home:HOME,vol+:VOLUP,vol-:VOLDOWN,play:PLAY,esc:ESC,sensor:CAMERA}
write /sys/devices/platform/rk29_backlight/rk29backlight 100
#on property:ro.rk.btchip=broadcom.bplus
# start gpsd
service gpsd /system/bin/glgps -c /system/etc/gps/gpsconfig.xml
class main
disabled
user gps
group system
#stresstest
service getbootmode /system/bin/getbootmode.sh
disabled
oneshot