diff options
author | anbranci <alexandru.n.branciog@intel.com> | 2016-02-23 08:54:57 +0200 |
---|---|---|
committer | Bruce J Beare <bruce.j.beare@intel.com> | 2016-02-24 19:26:04 +0000 |
commit | 5e43112fa1597386e9f8ef393b4507a25895546e (patch) | |
tree | 5bbda8273513b53c88e862e8693f480cfbd57ae7 | |
parent | 7c58f45a094ddb0d4f8c9eef988c1b12e48322f0 (diff) | |
download | minnowboard-5e43112fa1597386e9f8ef393b4507a25895546e.tar.gz |
minnowboard: have provision-device over TCP behave identically to USB
provision-device can be used with no argument if ANDROID_SERIAL is set.
Otherwise the "-s" option can now be used for TCP similarly to USB.
BUG=None
Change-Id: Id021248f791a1ccb9cc769a38898432633a42c58
-rwxr-xr-x | flash_tools/brillo-flashall.sh | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/flash_tools/brillo-flashall.sh b/flash_tools/brillo-flashall.sh index b89b0b4..4cb0c14 100755 --- a/flash_tools/brillo-flashall.sh +++ b/flash_tools/brillo-flashall.sh @@ -36,10 +36,10 @@ function dir_with_file() { LOCAL_DIR=$(dirname "${0}") BASE_NAME=$(basename "${0}") -IP="${1}" -if [ "$IP" == "" ]; then - echo "Usage: ${BASE_NAME} <MinnowBoard Board IP address>" - exit 0 +if [ -z $ANDROID_SERIAL ] && [ $# == 0 ]; then + echo "Set ANDROID_SERIAL or specify the device with -s option" >&2 + echo "Usage: ${BASE_NAME} -s tcp:<MinnowBoard IP address>" >&2 + exit 1 fi # Location of where the Brillo OS image is built. @@ -55,22 +55,16 @@ VENDOR=$(dir_with_file bootloader \ "${ANDROID_BUILD_TOP}/vendor/bsp/intel/minnowboard/boot_binaries") -if [ -x ./fastboot ]; then - FASTBOOT=./fastboot -else - FASTBOOT=fastboot -fi - -$FASTBOOT -s tcp:$IP flash gpt "${VENDOR}"/gpt.ini -$FASTBOOT -s tcp:$IP flash bootloader "${VENDOR}"/bootloader -$FASTBOOT -s tcp:$IP flash boot_a "${OS}"/boot.img -$FASTBOOT -s tcp:$IP flash boot_b "${OS}"/boot.img -$FASTBOOT -s tcp:$IP flash system_a "${OS}"/system.img -$FASTBOOT -s tcp:$IP flash system_b "${OS}"/system.img -$FASTBOOT -s tcp:$IP flash userdata "${OS}"/userdata.img -$FASTBOOT -s tcp:$IP flash oemvars "${VENDOR}"/oemvars.txt -$FASTBOOT -s tcp:$IP oem set_active 0 +fastboot flash gpt "${VENDOR}"/gpt.ini \ + flash bootloader "${VENDOR}"/bootloader \ + flash boot_a "${OS}"/boot.img \ + flash boot_b "${OS}"/boot.img \ + flash system_a "${OS}"/system.img \ + flash system_b "${OS}"/system.img \ + flash userdata "${OS}"/userdata.img \ + flash oemvars "${VENDOR}"/oemvars.txt \ + oem set_active 0 "$@" echo "Please run the following command to restart your MinnowBoard" -echo " $FASTBOOT -s tcp:$IP reboot" +echo " fastboot $@ reboot" echo |