-
Notifications
You must be signed in to change notification settings - Fork 38
/
init.omap4430.rc
211 lines (172 loc) · 8.23 KB
/
init.omap4430.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
199
200
201
202
203
204
205
206
207
208
209
210
211
import init.omap4430.usb.rc
on init
# mount debugfs
mount debugfs /sys/kernel/debug /sys/kernel/debug
export EXTERNAL_STORAGE /mnt/sdcard
mkdir /mnt/sdcard 0000 system system
# for backwards compatibility
symlink /mnt/sdcard /sdcard
# power management
# Enable off mode by default
write /sys/kernel/debug/pm_debug/enable_off_mode 1
# Enable Smart Reflex in debugfs
write /sys/kernel/debug/pm_debug/smartreflex/sr_core/autocomp 1
write /sys/kernel/debug/pm_debug/smartreflex/sr_iva/autocomp 1
write /sys/kernel/debug/pm_debug/smartreflex/sr_mpu/autocomp 1
on boot
setprop ro.radio.noril yes
chmod 0666 /dev/pvrsrvkm
# fake some battery state
setprop status.battery.state Slow
setprop status.battery.level 5
setprop status.battery.level_raw 50
setprop status.battery.level_scale 9
# wi-fi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
# We chown/chmod /data again so because mount is run as root + defaults
chown system system /data
chmod 0771 /data
chmod 777 /sys/class/leds/backlight/brightness
chown media media /system/bin/syslink_daemon.out
chown media media /data/base_image_sys_m3.xem3
chown media media /data/base_image_app_m3.xem3
chmod 750 /system/bin/syslink_daemon.out
chmod 640 /data/base_image_sys_m3.xem3
chmod 640 /data/base_image_app_m3.xem3
# change permissions for alsa nodes
chmod 0777 /dev/snd/pcmC0D0c
chmod 0777 /dev/snd/pcmC0D0p
chmod 0777 /dev/snd/controlC0
chmod 0777 /dev/snd/timer
#change permissions for alsa nodes for audio modem
chmod 0777 /dev/snd/pcmC0D5c
chmod 0777 /dev/snd/pcmC0D5p
#change permissions for alsa nodes for HDMI
chmod 777 /dev/snd/pcmC0D7p
# change permissions for modem
chmod 0660 /dev/ttyS0
chown radio radio /dev/ttyS0
# change permissions for Camera
chmod 0777 /dev/video5
chmod 0777 /dev/video0
# change permissions for Sensors
chown system system /sys/devices/virtual/input/input0/mode
chmod 0770 /sys/devices/virtual/input/input0/mode
chown system system /sys/devices/virtual/input/input0/delay
chmod 0770 /sys/devices/virtual/input/input0/delay
# change permissions for Thermal sensor TMP105
chmod 0777 /sys/class/hwmon/hwmon0/device/temp1_max
chmod 0777 /sys/class/hwmon/hwmon0/device/temp1_max_hyst
chown system system /system/bin/omapconf
chown root root /system/bin/omapconf2
# change permissions for Overlay
chown system system /dev/video1
chown system system /dev/video2
chown system system /dev/video3
# change permissions for overlay managers and display devices
chown system system /sys/devices/platform/omapdss/display0/enabled
chown system system /sys/devices/platform/omapdss/display1/enabled
chown system system /sys/devices/platform/omapdss/display2/enabled
chown system system /sys/devices/platform/omapdss/display3/enabled
chown system system /sys/devices/platform/omapdss/display0/name
chown system system /sys/devices/platform/omapdss/display1/name
chown system system /sys/devices/platform/omapdss/display2/name
chown system system /sys/devices/platform/omapdss/display3/name
chown system system /sys/devices/platform/omapdss/overlay0/manager
chown system system /sys/devices/platform/omapdss/overlay1/manager
chown system system /sys/devices/platform/omapdss/overlay2/manager
chown system system /sys/devices/platform/omapdss/overlay3/manager
chown system system /sys/devices/platform/omapdss/overlay0/zorder
chown system system /sys/devices/platform/omapdss/overlay1/zorder
chown system system /sys/devices/platform/omapdss/overlay2/zorder
chown system system /sys/devices/platform/omapdss/overlay3/zorder
# change permissions for manager tranparency parameters
chown system system /sys/devices/platform/omapdss/manager0/name
chown system system /sys/devices/platform/omapdss/manager0/display
chown system system /sys/devices/platform/omapdss/manager1/name
chown system system /sys/devices/platform/omapdss/manager1/display
chown system system /sys/devices/platform/omapdss/manager2/name
chown system system /sys/devices/platform/omapdss/manager2/display
chown system system /sys/devices/platform/omapdss/overlay0/enabled
chown system system /sys/devices/platform/omapdss/overlay1/enabled
chown system system /sys/devices/platform/omapdss/overlay2/enabled
chown system system /sys/devices/platform/omapdss/overlay3/enabled
# change permissions for display timings to get the resolutions
chown system system /sys/devices/platform/omapdss/display0/timings
chown system system /sys/devices/platform/omapdss/display1/timings
chown system system /sys/devices/platform/omapdss/display2/timings
chown system system /sys/devices/platform/omapdss/display3/timings
chown system system /sys/devices/platform/omapdss/display2/code
# change permissions for Tiler driver
chown media media /dev/tiler
chmod 0666 /dev/tiler
chmod 0666 /dev/dmm
# Revert the boost_timeout to the default value of 3 sec. Note this won't affect the prev boost
# request for boot time reduction
write /sys/devices/system/cpu/cpufreq/hotplug/boost_timeout 3000000
# Enable hotplug detection for HDMI
# write /sys/devices/platform/omapdss/display2/hpd_enabled 1
# Change permissions for FB overlays for HDMI UI Cloning
chown system system /sys/class/graphics/fb0/overlays
chown system system /sys/class/graphics/fb0/fit_to_screen
chown system system /sys/class/graphics/fb1/overlays
# Enable UI-Cloning Service in SystemServer
setprop tv.hdmi.uicloning.enable true
# Keypad permissions
chmod 0444 /system/usr/keychars/omap-keypad.kcm.bin
chmod 0444 /system/usr/keychars/qwerty.kcm.bin
# Set current permissions for charge protection
chown system system /sys/class/power_supply/usb/device/charge_command
chown system system /sys/class/power_supply/usb/device/charge_current
chown system system /sys/class/power_supply/usb/device/float_voltage
chown system system /sys/class/power_supply/usb/device/bad_battery
on property:persist.service.adb.enable=1
start adbd
on property:persist.service.adb.enable=0
stop adbd
on fs
mount ext4 /dev/block/platform/mmci-omap-hs.1/by-name/system /system wait ro
mount ext4 /dev/block/platform/mmci-omap-hs.1/by-name/userdata /data wait noatime nosuid nodev errors=continue
mount ext4 /dev/block/platform/mmci-omap-hs.1/by-name/cache /cache wait noatime nosuid nodev errors=continue
mount ext4 /dev/block/platform/mmci-omap-hs.1/by-name/splash /dropbox wait noatime nosuid nodev errors=continue
mount vfat /dev/block/platform/mmci-omap-hs.1/by-name/media /mnt/sdcard wait noatime nosuid nodev errors=continue
# switch CPUfreq from performance to hotplug
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
write /sys/devices/system/cpu/cpufreq/hotplug/down_threshold 30
#Give system ownership and permission to boost clock for specified timeout
#Note boost_timeout cannot be changed from application because of dynamic sysfs creation. It will have default value of 3 sec.
chown system system /sys/devices/system/cpu/cpu0/cpufreq/boost_cpufreq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/boost_cpufreq
# Boost the CPU for 60 sec for boot optimization
write /sys/devices/system/cpu/cpufreq/hotplug/boost_timeout 60000000
write /sys/devices/system/cpu/cpu0/cpufreq/boost_cpufreq 1
# Initialize the SGX driver
service pvrsrvinit /system/bin/pvrsrvinit
class core
user root
group root
oneshot
#Load IVA firmware
service baseimage /system/bin/syslink_daemon.out -f /system/lib/ducati/base_image_sys_m3.xem3 /system/lib/ducati/base_image_app_m3.xem3
critical
user media
group media
# WLAN Related services
sservice wpa_supplicant /system/bin/wpa_supplicant -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
disabled
oneshot
service watchdog /sbin/watchdog
user root
oneshot
on property:sys.boot_completed=1
start printboottime
start touch_firmware
start adobe_air