diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2021-03-11 13:17:35 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-05 20:50:07 +0000 |
commit | 362e02845295c56a3c1fbb4c5fd39b318a45253c (patch) | |
tree | e87d8533d0d27ce8513d407320ea9de58f353f86 /util/build.mk | |
parent | a801f6505a207ff5f0787cfb89e1810eacf4a1db (diff) | |
download | chrome-ec-362e02845295c56a3c1fbb4c5fd39b318a45253c.tar.gz |
PCHG: Support firmware update
This patch adds EC_CMD_PCHG_UPDATE, which allows the host to update
firmware of ctn730 via I2C.
An updater (e.g. ectool) is expected to issue EC_PCHG_UPDATE_CMD_OPEN,
multiple EC_PCHG_UPDATE_CMD_WRITEs, then EC_PCHG_UPDATE_CLOSE. Each
sub-command completion is notified to the host via EC_MKBP_EVENT_PCHG.
An updater is supposed to wait for the previous sub-command to
complete before proceeding to the next.
Example:
localhost ~ # ectool pchg 0
State: DOWNLOAD (6)
FW Version: 0x104
localhost ~ # ectool pchg 0 update 0x207000 0x105 /path/to/image.bin
Update file /path/to/image.bin (85632 bytes) is opened.
Writing firmware (port=0 ver=0x105 addr=0x207000 bsize=128):
**********************************************************************
FW update session closed (CRC32=0x7bd5c66f).
localhost ~ # ectool pchg 0 reset
Reset port 0 complete
localhost ~ # ectool pchg 0
State: ENABLED (2)
FW Version: 0x105
BUG=b:182600604, b:173235954
BRANCH=trogdor
TEST=ectool pchg 0 update 0x201200 0x105 /tmp/user_ee_X0.1_V1.5.bin
TEST=ectool pchg 0 reset
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I9c62f1714dd69428ab5870c443cb4eb77881a6c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2757099
Diffstat (limited to 'util/build.mk')
-rw-r--r-- | util/build.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/util/build.mk b/util/build.mk index e868e32eff..9f9430a3b4 100644 --- a/util/build.mk +++ b/util/build.mk @@ -30,6 +30,7 @@ comm-objs+=comm-lpc.o comm-i2c.o misc_util.o iteflash-objs = iteflash.o usb_if.o ectool-objs=ectool.o ectool_keyscan.o ec_flash.o ec_panicinfo.o $(comm-objs) +ectool-objs+=../common/crc.o ectool_servo-objs=$(ectool-objs) comm-servo-spi.o ec_sb_firmware_update-objs=ec_sb_firmware_update.o $(comm-objs) misc_util.o ec_sb_firmware_update-objs+=powerd_lock.o |