summaryrefslogtreecommitdiff
path: root/util/flash_ec
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2022-06-22 12:00:57 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-22 21:21:26 +0000
commitd733c6b1359b81465493c4b9414ff7ae4f470b32 (patch)
tree38cea669e065049f4df2e5ccd2359acc581d8962 /util/flash_ec
parentf5dfa5378ab30df20ccc40d1a30d3bf635432d48 (diff)
downloadchrome-ec-d733c6b1359b81465493c4b9414ff7ae4f470b32.tar.gz
flash_ec: improve diagnostics output and stop earlier on gsc servo errors
In case there is a problem for servod connecting over CCD the script keeps going using 'neither' as the CCD device type, which makes no sense. Quit the script as soon as the device type is reported as 'neither', also show the device type in the log when connection is successful. BUG=none TEST=verified that the script exits early and properly reports the device type problem when servod fails to properly connect over CCd. Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Change-Id: I52d227d98a434ff9ddbd0c7aad3111a391feb1fe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3718839 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'util/flash_ec')
-rwxr-xr-xutil/flash_ec5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/flash_ec b/util/flash_ec
index 7cb4ebcda8..7b46353c81 100755
--- a/util/flash_ec
+++ b/util/flash_ec
@@ -399,6 +399,9 @@ SERVO_TYPE="$(dut_control_get servo_type || :)"
if [[ "${SERVO_TYPE}" =~ ^servo_v4(p1)?_with_.*$ ]]; then
ACTIVE_DEVICE="$(dut_control_get active_dut_controller)"
+ if [[ ${ACTIVE_DEVICE} == neither ]]; then
+ die "Could not determine servo V4 active device"
+ fi
else
ACTIVE_DEVICE="${SERVO_TYPE}"
fi
@@ -1260,7 +1263,7 @@ function dut_i2c_dev() {
local has_i2c_pseudo="$(dut_control_get_or_die \
"${ACTIVE_DEVICE}_i2c_pseudo_is_running")"
if [[ "${has_i2c_pseudo}" == False ]]; then
- error "i2c-pseudo module is not running."
+ error "i2c-pseudo module is not running on ${ACTIVE_DEVICE}."
error "Please follow https://chromium.googlesource.com/chromiumos/platform/ec/+/HEAD/util/iteflash.md#i2c-pseudo"
die "to install i2c-pseudo module."
fi