diff options
author | Raul E Rangel <rrangel@chromium.org> | 2018-06-26 16:28:43 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-06-28 09:55:39 -0700 |
commit | 0fa6368a995418eb0298e63f3ed13501912c12ef (patch) | |
tree | 253671349a60dea51e19a522dca50f8e996b4da8 | |
parent | 8e2765c4208dc86077ee7932d4e414aa79c3e354 (diff) | |
download | chrome-ec-0fa6368a995418eb0298e63f3ed13501912c12ef.tar.gz |
flash_ec: respect SERVOD_PORT
If the SERVOD_PORT variable is set, servod will use it as its default
port. This makes flash_ec also respect the variable.
BUG=none
TEST=SERVOD_PORT=9000 flash_ec --board=grunt
BRANCH=none
Change-Id: Ic4ae28b3632faa326b81be85bf807c39dac1cf7c
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1116865
Reviewed-by: Jett Rink <jettrink@chromium.org>
-rwxr-xr-x | util/flash_ec | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/flash_ec b/util/flash_ec index aec4c90ff7..f6e143acda 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -179,6 +179,8 @@ declare -A VALID_CHIP_COMBO VALID_CHIP_COMBO["grunt.npcx_uut"]="ccd_cr50" VALID_CHIP_COMBO["grunt.npcx_spi"]="servo" +DEFAULT_PORT="${SERVOD_PORT:-9999}" + # Flags DEFINE_string board "${DEFAULT_BOARD}" \ "The board to run debugger on." @@ -190,7 +192,7 @@ DEFINE_integer timeout 600 \ "Timeout for flashing the EC, measured in seconds." DEFINE_string offset "0" \ "Offset where to program the image from." -DEFINE_integer port 9999 \ +DEFINE_integer port "${DEFAULT_PORT}" \ "Port to communicate to servo on." DEFINE_boolean raiden "${FLAGS_FALSE}" \ "Use raiden_debug_spi programmer" |