Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Side by Side Diff: platform_tools/android/bin/android_setup.sh

Issue 263673004: Support unknown Android target devices via environment variables. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # Fail-fast if anything in the script fails. 5 # Fail-fast if anything in the script fails.
6 set -e 6 set -e
7 7
8 BUILDTYPE=${BUILDTYPE-Debug} 8 BUILDTYPE=${BUILDTYPE-Debug}
9 9
10 while (( "$#" )); do 10 while (( "$#" )); do
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 arm_thumb) 127 arm_thumb)
128 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=1" 128 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=1"
129 ANDROID_ARCH="arm" 129 ANDROID_ARCH="arm"
130 ;; 130 ;;
131 mips) 131 mips)
132 DEFINES="${DEFINES} skia_arch_type=mips skia_arch_width=32" 132 DEFINES="${DEFINES} skia_arch_type=mips skia_arch_width=32"
133 DEFINES="${DEFINES} skia_resource_cache_mb_limit=32" 133 DEFINES="${DEFINES} skia_resource_cache_mb_limit=32"
134 ANDROID_ARCH="mips" 134 ANDROID_ARCH="mips"
135 ;; 135 ;;
136 *) 136 *)
137 echo "ERROR: unknown device $TARGET_DEVICE" 137 if [ -z "$ANDROID_IGNORE_UNKNOWN_DEVICE" ]; then
138 exit 1 138 echo "ERROR: unknown device $TARGET_DEVICE"
139 exit 1
140 fi
141 # If ANDROID_IGNORE_UNKNOWN_DEVICE is set, then ANDROID_TOOLCHAIN
142 # or ANDROID_ARCH should be set; Otherwise, ANDROID_ARCH
143 # defaults to 'arm' and the default ARM toolchain is used.
144 DEFINES="${DEFINES} skia_arch_type=${ANDROID_ARCH-arm}"
145 # If ANDROID_IGNORE_UNKNOWN_DEVICE is set, extra gyp defines can be
146 # added via ANDROID_GYP_DEFINES
147 DEFINES="${DEFINES} ${ANDROID_GYP_DEFINES}"
139 ;; 148 ;;
140 esac 149 esac
141 150
142 verbose "The build is targeting the device: $TARGET_DEVICE" 151 verbose "The build is targeting the device: $TARGET_DEVICE"
143 exportVar DEVICE_ID $TARGET_DEVICE 152 exportVar DEVICE_ID $TARGET_DEVICE
144 153
145 # setup the appropriate cross compiling toolchains 154 # setup the appropriate cross compiling toolchains
146 source $SCRIPT_DIR/utils/setup_toolchain.sh 155 source $SCRIPT_DIR/utils/setup_toolchain.sh
147 156
148 DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}" 157 DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST 228 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST
220 fi 229 fi
221 else 230 else
222 echo -n "$ANDROID_DST " 231 echo -n "$ANDROID_DST "
223 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" 232 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")"
224 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST 233 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST
225 fi 234 fi
226 } 235 }
227 236
228 setup_device "${DEVICE_ID}" 237 setup_device "${DEVICE_ID}"
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698