summaryrefstree
path: root/aosp-device-tree/rootdir/etc/init.rk30board.rc
blob: 0ca317d0640452f4565eedd940a04a212fad1fbf (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
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
import /vendor/etc/init/hw/init.rockchip.rc
import /vendor/etc/init/hw/init.connectivity.rc
import /vendor/etc/init/hw/init.box.samba.rc
import /vendor/etc/init/hw/init.${ro.board.platform}.rc
import /vendor/etc/init/hw/init.${ro.target.product}.rc
import /vendor/etc/init/hw/init.car.rc
import /vendor/etc/init/hw/init.optee.rc

on post-fs-data
    chmod 664 /sys/class/display/HDMI/color


    chmod 0666 /dev/opteearmtz00
    chmod 0666 /dev/tee0
    chmod 0666 /dev/teepriv0

    mkdir /data/vendor/logs 0755 root shell
    mkdir /data/vendor/audio 0755 system system

on early-init
    write /sys/devices/system/cpu/cpufreq/policy0/scaling_governor performance
    write /sys/class/devfreq/dmc/governor performance

on init
    # set temperature control policy as normal mode
    write /sys/module/rockchip_pm/parameters/policy 1
    chmod 0666 /dev/opteearmtz00
    chmod 0666 /dev/tee0
    chmod 0666 /dev/teepriv0
    chown system system /sys/system_monitor/system_status
    chmod 0666 /sys/system_monitor/system_status
    #eink
    chown root system /dev/ebc
    chmod 0666 /dev/ebc
    chown root system /dev/waveform
    chmod 0666 /dev/waveform
	# @jason add for uiot 485
	chmod 0666 /sys/devices/platform/io_control/zigbee_reset
	chown system system /sys/devices/platform/io_control/zigbee_reset
	chown system system /proc/vendor/485_tx_mode
	chown system system /proc/vendor/relay_first
	chown system system /proc/vendor/relay_second
    chown system system /proc/vendor/relay_third
    chown system system /proc/vendor/relay_forth
	chown system system /proc/vendor/touch_ctrl
	chown system system /proc/vendor/aux_mode
	chown system system /proc/vendor/horn_mode
	chown system system /proc/vendor/mute_manual
	chown system system /proc/vendor/mute_mode
	chown system system /proc/vendor/power_on
	chown system system /proc/vendor/led_ctrl
    chown system system /proc/vendor/lcd_ctrl
    chown system system /proc/vendor/sfq_ctrl
    chown system system /proc/vendor/sfq2_ctrl
    chown system system /proc/vendor/ymh_ctrl
    chown system system /dev/graphics/fb0
    chmod 0777 /dev/graphics/fb0

on boot
    chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
    chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_slack
    chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
    chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
    chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/target_loads
    chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
    chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
    chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
    chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
    chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
    chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
    chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy

    # Assume SMP uses shared cpufreq policy for all CPUs
    chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
    chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
    chown system system  /sys/devices/ffa30000.gpu/dvfs
    chmod 0777 /sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu/governor

    # Adjust governor for rk3126c gpu
    chown system system /sys/devices/platform/10091000.gpu/devfreq/10091000.gpu/governor
    chmod 0664 /sys/devices/platform/10091000.gpu/devfreq/10091000.gpu/governor

    chown system system /sys/devices/system/cpu/cpu0/online
    chmod 0660 /sys/devices/system/cpu/cpu0/online

    chown system system /sys/devices/system/cpu/cpu1/online
    chmod 0660 /sys/devices/system/cpu/cpu1/online

    chown system system /sys/devices/system/cpu/cpu2/online
    chmod 0660 /sys/devices/system/cpu/cpu2/online

    chown system system /sys/devices/system/cpu/cpu3/online
    chmod 0660 /sys/devices/system/cpu/cpu3/online

    chown system system /sys/devices/system/cpu/cpu4/online
    chmod 0660 /sys/devices/system/cpu/cpu4/online

    chown system system /sys/devices/system/cpu/cpu5/online
    chmod 0660 /sys/devices/system/cpu/cpu5/online

    chown system system /sys/devices/system/cpu/cpu6/online
    chmod 0660 /sys/devices/system/cpu/cpu6/online

    chown system system /sys/devices/system/cpu/cpu7/online
    chmod 0660 /sys/devices/system/cpu/cpu7/online

    chown system system /sys/module/rockchip_pm/parameters/policy
    chmod 0660 /sys/module/rockchip_pm/parameters/policy

    # Vop bandwidth for ddr dvfs
    chown system system /sys/class/devfreq/dmc/vop_bandwidth
    chmod 0660 /sys/class/devfreq/dmc/vop_bandwidth

    # hdmi status
    chown system system /sys/devices/platform/display-subsystem/drm/card0/card0-HDMI-A-1/status
    chown system system /d/dw-hdmi/status
    chmod 0660 /d/dw-hdmi/status

    #dp status
    chown system system /sys/devices/platform/display-subsystem/drm/card0/card0-DP-1/status

    # b/13568411: make lazy vfree flush thresholds match flush_tlb_range
    write /proc/sys/vm/lazy_vfree_tlb_flush_all_threshold 524288

    chown wifi wifi /sys/class/rkwifi/driver 
    chown wifi wifi /sys/class/rkwifi/power
    chown wifi wifi /sys/class/rkwifi/chip
    chown wifi wifi /sys/class/rkwifi/preload

    write /proc/sys/net/core/rmem_max 1048576
    write /proc/sys/net/core/wmem_max 1048576

    # backlight
    chown system system /sys/class/backlight/rk28_bl/brightness
    chown system system /sys/class/backlight/backlight/brightness
    
    # for hdmi
    chown root system /sys/class/display/HDMI/enable
    chown root system /sys/class/display/HDMI/mode
    chown root system /sys/class/display/HDMI/scale
    chown root system /sys/class/display/HDMI/3dmode
    chmod 0664 /sys/class/display/HDMI/mode
    chmod 0664 /sys/class/display/HDMI/3dmode

    chown root system /sys/class/graphics/fb0/bcsh
    chown root system /sys/class/graphics/fb0/dsp_lut
    chmod 0664 /sys/class/graphics/fb0/bcsh
    chmod 0664 /sys/class/graphics/fb0/dsp_lut

	chown system graphics /sys/class/graphics/fb0/scale
	chmod 0664 /sys/class/graphics/fb0/scale

    chown system system /sys/mali400_utility/utility
    chmod 0664 /sys/mali400_utility/utility

    chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
     
    chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
    chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
  
    chown system system /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
    chmod 0664 /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
     
    chown system system /sys/devices/system/cpu/cpu4/cpufreq/scaling_setspeed
    chmod 0664 /sys/devices/system/cpu/cpu4/cpufreq/scaling_setspeed
   
    #add for usb otg by lly
    chown system system /sys/bus/platform/drivers/usb20_otg/force_usb_mode
    chmod 0664 /sys/bus/platform/drivers/usb20_otg/force_usb_mode

    #add for wakeup to reboot by huangjc
    chown system system /sys/devices/virtual/resume_reboot/resume_reboot/resume_reboot
    chmod 0664 /sys/devices/virtual/resume_reboot/resume_reboot/resume_reboot

    #add for leds by huangjc
    chown system system /sys/class/leds/net-green/brightness
    chmod 0664 /sys/class/leds/net-green/brightness
    chown system system /sys/class/leds/net-red/brightness
    chmod 0664 /sys/class/leds/net-red/brightness
    chown system system /sys/class/leds/led_r/brightness
    chown system system /sys/class/leds/led_r/trigger
    chown system system /sys/class/leds/led_r/timer
    chmod 0664 /sys/class/leds/led_r/brightness
    chmod 0664 /sys/class/leds/led_r/trigger
    chmod 0664 /sys/class/leds/led_r/timer
    chown system system /sys/class/leds/led_g/brightness
    chown system system /sys/class/leds/led_g/trigger
    chown system system /sys/class/leds/led_g/timer
    chmod 0664 /sys/class/leds/led_g/brightness
    chmod 0664 /sys/class/leds/led_g/trigger
    chmod 0664 /sys/class/leds/led_g/timer
    chown system system /sys/class/leds/led_b/brightness
    chown system system /sys/class/leds/led_b/trigger
    chown system system /sys/class/leds/led_b/timer
    chmod 0664 /sys/class/leds/led_b/brightness
    chmod 0664 /sys/class/leds/led_b/trigger
    chmod 0664 /sys/class/leds/led_b/timer

    chown root system /sys/class/graphics/fb0/map
    chmod 0664 /sys/class/graphics/fb0/map

    #add for mid change hdmi mode
    chmod 0664 /sys/devices/virtual/display/HDMI/enable
    chmod 0664 /sys/devices/virtual/display/HDMI/mode
    chmod 0664 /sys/devices/virtual/display/HDMI/scale

    #add for cts
    chmod 0660 /sys/bus/platform/drivers/usb20_otg/dwc_otg_conn_en
    chmod 0660 /sys/bus/platform/drivers/usb20_otg/force_usb_mode
    chmod 0660 /sys/bus/platform/drivers/usb20_otg/vbus_status
    chmod 0660 /sys/devices/platform/fb/graphics/fb5/enable
    chmod 0660 /sys/devices/platform/fb/graphics/fb6/cursor
    chmod 0660 /sys/devices/platform/fb/graphics/fb6/enable
    chmod 0660 /sys/devices/platform/fb/graphics/fb7/enable
    chmod 0660 /sys/devices/platform/fb/graphics/fb8/enable
    chmod 0660 /sys/devices/platform/fb/graphics/fb9/enable
    chmod 0660 /sys/devices/platform/fb/graphics/fb9/bits_per_pixel
    chmod 0660 /sys/devices/platform/fb/graphics/fb9/win_property

    restorecon_recursive /dev/block/by-name/
    #for tee
    restorecon /vendor/bin/tee-supplicant

    #for WV keybox provision
    restorecon /vendor/bin/rk_store_keybox
    # for bd
    mkdir /mnt/iso 0660 system system
    chmod 0666 /dev/opteearmtz00

    chmod 0666 /dev/tee0
    chmod 0666 /dev/teepriv0
    chmod 0444 /proc/pagetypeinfo

on property:sys.boot_completed=1
    write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 0
    write /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq 0
    write /sys/devices/system/cpu/cpufreq/policy0/scaling_governor interactive
    write /sys/class/devfreq/dmc/governor dmc_ondemand
    setprop persist.sys.first_booting false
    # if data is encrypt, when start gps too early, gpsd crashed
    start gpsd
    trigger sys-boot-completed-set
    setprop vendor.boot_completed 1
	write /sys/power/wake_lock noSuspend

# We want one opportunity per boot to enable zram, so we
# use a trigger we fire from the above stanza. If
# persist.sys.zram_enabled becomes true after boot,
# we don't want to run swapon_all at that time.
on sys-boot-completed-set && property:persist.sys.zram_enabled=1
    swapon_all /vendor/etc/fstab.${ro.hardware}

# for Internet adb
on property:persist.internet_adb_enable=1
    setprop service.adb.tcp.port 5555
    restart adbd

# for Internet adb
on property:persist.internet_adb_enable=0
    setprop service.adb.tcp.port 0
    restart adbd

# for telephony function
on property:ro.boot.noril=true
    setprop ro.radio.noril true
    stop ril-daemon

# set ro.serialno
on property:vendor.serialno=*
    setprop ro.serialno ${vendor.serialno}
    restart adbd

on property:vendor.cts_gts.status=true
    restart vendor.media.omx
    restart media

# Android bug collector
service abc /vendor/bin/abc
    class main
    disabled
    oneshot

on property:persist.abc_switch=1
    start abc
on property:persist.abc_switch=0
    stop abc

##$_rbox_$_modify_$_shenzhenyi_20160312
##$_rbox_$_modify_$_begin
service displayd /system/bin/displayd
    class core
    socket displayd stream 0760 system system
##$_rbox_$_modify_$_end

##$_rbox_$_modify_$_chenzhi_20120309
##$_rbox_$_modify_$_begin
service pppoe_setup /system/bin/pppoe-setup
    disabled
    oneshot

service pppoe_start /system/bin/pppoe-start
    disabled
    oneshot

service bplus_helper  /system/bin/bplus_helper
    class main
    oneshot

service pppoe_stop /system/bin/pppoe-stop
    disabled
    oneshot
##$_rbox_$_modify_$_end

service up_eth0 /system/bin/busybox ifconfig eth0 up
    class main
    oneshot

service shutdownanim /system/bin/bootanimation shutdown
    class core
    user graphics
    group graphics audio
    disabled
    oneshot

service rk_store_keybox /vendor/bin/rk_store_keybox
    class main
    oneshot		

#vts audio property
on property:vts.native_server.on=1
    setprop vendor.vts_test true

# For Control Adb in Booting
on property:persist.sys.adb_enable=1
    restart adbd

on property:persist.sys.adb_enable=0
    stop adbd

service flash_img /vendor/bin/flash_img.sh
    class main
    oneshot
    disabled

on property:persist.sys.read_pcie_info=1
    start read_pcie_info
    setprop persist.sys.read_pcie_info 0

# For Devicetest APK
service read_pcie_info /vendor/bin/read_pcie_info.sh /mnt/sdcard/pcieInfo.tmp
    class main
    user root
    group root
    oneshot
    disabled

on property:vendor.flash.success=2
    start flash_img

on property:flash.success=1
   setprop vendor.flash.success 1