OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # android_setup.sh: Sets environment variables used by other Android scripts. | 3 # android_setup.sh: Sets environment variables used by other Android scripts. |
4 | 4 |
5 # Parse the arguments for a DEVICE_ID. | 5 # Parse the arguments for a DEVICE_ID. |
6 DEVICE_ID="" | 6 DEVICE_ID="" |
7 DEVICE_SERIAL="" | 7 DEVICE_SERIAL="" |
8 while (( "$#" )); do | 8 while (( "$#" )); do |
9 if [[ $(echo "$1" | grep "^-d$") != "" ]]; | 9 if [[ $(echo "$1" | grep "^-d$") != "" ]]; |
10 then | 10 then |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 verbose "INFO: no target device was specified so using the device (${TARGE
T_DEVICE}) from the most recent build" | 172 verbose "INFO: no target device was specified so using the device (${TARGE
T_DEVICE}) from the most recent build" |
173 else | 173 else |
174 TARGET_DEVICE="arm_v7_thumb" | 174 TARGET_DEVICE="arm_v7_thumb" |
175 verbose "INFO: no target device type was specified so using the default '$
{TARGET_DEVICE}'" | 175 verbose "INFO: no target device type was specified so using the default '$
{TARGET_DEVICE}'" |
176 fi | 176 fi |
177 fi | 177 fi |
178 | 178 |
179 case $TARGET_DEVICE in | 179 case $TARGET_DEVICE in |
180 nexus_s) | 180 nexus_s) |
181 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb=
1" | 181 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb=
1" |
182 DEFINES="${DEFINES} skia_texture_cache_mb_limit=24" | 182 DEFINES="${DEFINES} skia_resource_cache_mb_limit=24" |
183 ANDROID_ARCH="arm" | 183 ANDROID_ARCH="arm" |
184 ;; | 184 ;; |
185 nexus_4 | nexus_7 | nexus_10) | 185 nexus_4 | nexus_7 | nexus_10) |
186 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb=
1" | 186 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb=
1" |
187 ANDROID_ARCH="arm" | 187 ANDROID_ARCH="arm" |
188 ;; | 188 ;; |
189 xoom) | 189 xoom) |
190 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_version=7 arm_thumb=
1" | 190 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_version=7 arm_thumb=
1" |
191 ANDROID_ARCH="arm" | 191 ANDROID_ARCH="arm" |
192 ;; | 192 ;; |
193 galaxy_nexus) | 193 galaxy_nexus) |
194 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb=
1" | 194 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb=
1" |
195 DEFINES="${DEFINES} skia_texture_cache_mb_limit=32" | 195 DEFINES="${DEFINES} skia_resource_cache_mb_limit=32" |
196 ANDROID_ARCH="arm" | 196 ANDROID_ARCH="arm" |
197 ;; | 197 ;; |
198 intel_rhb) | 198 intel_rhb) |
199 DEFINES="${DEFINES} skia_arch_type=x86 skia_arch_width=32" | 199 DEFINES="${DEFINES} skia_arch_type=x86 skia_arch_width=32" |
200 DEFINES="${DEFINES} skia_texture_cache_mb_limit=32" | 200 DEFINES="${DEFINES} skia_resource_cache_mb_limit=32" |
201 ANDROID_ARCH="x86" | 201 ANDROID_ARCH="x86" |
202 ;; | 202 ;; |
203 razr_i) | 203 razr_i) |
204 DEFINES="${DEFINES} skia_arch_type=x86 skia_arch_width=32" | 204 DEFINES="${DEFINES} skia_arch_type=x86 skia_arch_width=32" |
205 DEFINES="${DEFINES} skia_texture_cache_mb_limit=32" | 205 DEFINES="${DEFINES} skia_resource_cache_mb_limit=32" |
206 ANDROID_ARCH="x86" | 206 ANDROID_ARCH="x86" |
207 ;; | 207 ;; |
208 arm_v7) | 208 arm_v7) |
209 DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7 a
rm_thumb=0" | 209 DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7 a
rm_thumb=0" |
210 ANDROID_ARCH="arm" | 210 ANDROID_ARCH="arm" |
211 ;; | 211 ;; |
212 arm_v7_thumb) | 212 arm_v7_thumb) |
213 DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7 a
rm_thumb=1" | 213 DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7 a
rm_thumb=1" |
214 ANDROID_ARCH="arm" | 214 ANDROID_ARCH="arm" |
215 ;; | 215 ;; |
216 arm) | 216 arm) |
217 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=0" | 217 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=0" |
218 ANDROID_ARCH="arm" | 218 ANDROID_ARCH="arm" |
219 ;; | 219 ;; |
220 arm_thumb) | 220 arm_thumb) |
221 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=1" | 221 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=1" |
222 ANDROID_ARCH="arm" | 222 ANDROID_ARCH="arm" |
223 ;; | 223 ;; |
224 x86) | 224 x86) |
225 DEFINES="${DEFINES} skia_arch_type=x86 skia_arch_width=32" | 225 DEFINES="${DEFINES} skia_arch_type=x86 skia_arch_width=32" |
226 DEFINES="${DEFINES} skia_texture_cache_mb_limit=32" | 226 DEFINES="${DEFINES} skia_resource_cache_mb_limit=32" |
227 ANDROID_ARCH="x86" | 227 ANDROID_ARCH="x86" |
228 ;; | 228 ;; |
229 *) | 229 *) |
230 echo -n "ERROR: unknown device specified ($TARGET_DEVICE), valid values: " | 230 echo -n "ERROR: unknown device specified ($TARGET_DEVICE), valid values: " |
231 echo "nexus_[s,4,7,10] xoom galaxy_nexus razr_i arm arm_thumb arm_v7 arm_v
7_thumb x86" | 231 echo "nexus_[s,4,7,10] xoom galaxy_nexus razr_i arm arm_thumb arm_v7 arm_v
7_thumb x86" |
232 return 1; | 232 return 1; |
233 ;; | 233 ;; |
234 esac | 234 esac |
235 | 235 |
236 verbose "The build is targeting the device: $TARGET_DEVICE" | 236 verbose "The build is targeting the device: $TARGET_DEVICE" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 else | 323 else |
324 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 324 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
325 fi | 325 fi |
326 } | 326 } |
327 | 327 |
328 # Set up the device. | 328 # Set up the device. |
329 setup_device "${DEVICE_ID}" | 329 setup_device "${DEVICE_ID}" |
330 if [[ "$?" != "0" ]]; then | 330 if [[ "$?" != "0" ]]; then |
331 exit 1 | 331 exit 1 |
332 fi | 332 fi |
OLD | NEW |