diff options
author | Todd Broch <tbroch@chromium.org> | 2013-02-13 10:53:22 -0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-02-13 13:00:59 -0800 |
commit | 6fd61fa6f17eb06041b0492766d59c67ec4b961d (patch) | |
tree | cb4ef995aff6bf2e964cc2d9156b55b7f596b0e0 /util | |
parent | 154c73f32d2625d2cfbe2fa9be4e15b4f382a917 (diff) | |
download | chrome-ec-6fd61fa6f17eb06041b0492766d59c67ec4b961d.tar.gz |
Allow flashing of EC binary from host with multiple servod invocations.
Adds argument --port to provide ability to flash from host that has
multiple servos running.
BRANCH=none
BUG=none
TEST=manual,
./util/flash_ec --board spring
- device connected to servod @ port 9999 is successfully flashed
./util/flash_ec --board spring --port 9902
- device connected to servod @ port 9902 is successfully flashed
Signed-off-by: Todd Broch <tbroch@chromium.org>
Change-Id: Iecc4b8df51236a1f21be5feca8bb87f5a1d03e97
Reviewed-on: https://gerrit.chromium.org/gerrit/43182
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-x | util/flash_ec | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/util/flash_ec b/util/flash_ec index 4031250fd3..192b3efee2 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -12,10 +12,12 @@ DEFINE_string board "${DEFAULT_BOARD}" \ "The board to run debugger on." DEFINE_string image "" \ "Full pathname of the EC firmware image to flash." -DEFINE_boolean ro "${FLAGS_FALSE}" \ - "Write only the read-only partition" DEFINE_string offset "0" \ "Offset where to program the image from." +DEFINE_integer port 9999 \ + "Port to communicate to servo on." +DEFINE_boolean ro "${FLAGS_FALSE}" \ + "Write only the read-only partition" DEFINE_boolean unprotect "${FLAGS_FALSE}" \ "Clear the protect flag." @@ -76,7 +78,8 @@ function ec_image() { # Find the EC UART on the servo v2 function ec_uart() { SERVOD_FAIL="Cannot communicate with servo. is servod running ?" - (dut-control uart1_pty || die "${SERVOD_FAIL}") | cut -d: -f2 + (dut-control --port=${FLAGS_port} uart1_pty || \ + die "${SERVOD_FAIL}") | cut -d: -f2 } # Servo variables management @@ -85,7 +88,7 @@ SERVO_VARS="uart1_en uart1_parity uart1_baudrate \ jtag_buf_on_flex_en jtag_buf_en spi1_vref" function dut_control() { - dut-control "$1" >/dev/null + dut-control --port=${FLAGS_port} "$1" >/dev/null } function servo_save() { |