diff options
author | Ting Shen <phoenixshen@google.com> | 2022-01-20 23:28:05 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-01-21 07:09:21 +0000 |
commit | b41d5a853cb0fd56e5fb9528d79577e21cfe49a1 (patch) | |
tree | 05b1e0c37c2e7d583896ba8f3da5caec653173ec | |
parent | fec9c95402d5892251720a8e7eb78c70df8522ce (diff) | |
download | chrome-ec-b41d5a853cb0fd56e5fb9528d79577e21cfe49a1.tar.gz |
flash_ec: add error message for missing i2c-pseudo module
Missing i2c-pseudo is a FAQ for people not familiar with ite devices.
Add this to the error message to unblock their work.
BUG=none
TEST=1) Unload module, remove /lib/modules/*/extra/i2c-pseudo.ko.
run flash_ec. Verify that error message is displayed.
2) Install i2c-pseudo, verify that flash_ec still works.
BRANCH=asurada,cherry
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I936b06b1c69c7448c39b92ed40e320609589292b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3404352
Tested-by: Ting Shen <phoenixshen@chromium.org>
Auto-Submit: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Commit-Queue: Eric Yilun Lin <yllin@google.com>
(cherry picked from commit 5b65df181b1016bd16059c5dfa4f984f450ced75)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3405647
-rwxr-xr-x | util/flash_ec | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/flash_ec b/util/flash_ec index a2c2a7feaf..612a389ef5 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -1243,6 +1243,14 @@ function dut_i2c_dev() { return fi + 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 "Please follow https://chromium.googlesource.com/chromiumos/platform/ec/+/HEAD/util/iteflash.md#i2c-pseudo" + die "to install i2c-pseudo module." + fi + local adap_num= adap_num="$(dut_control_get_or_die \ "${ACTIVE_DEVICE}_i2c_pseudo_adapter_num")" |