diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2017-08-30 15:02:48 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-15 10:50:27 -0700 |
commit | 82e0892fc39a107285474b6f3ae3d1eb3901d82c (patch) | |
tree | 4518487f58bc27ace356e610db55266610eb9a3e /common/update_fw.c | |
parent | 4fdccb6de5131475fb6ccd3402812e008091afa3 (diff) | |
download | chrome-ec-82e0892fc39a107285474b6f3ae3d1eb3901d82c.tar.gz |
update_fw: Store complete touchpad FW hash
This will be used by the updater to first check that the touchpad
FW on AP side matches the one for which we stored hashes on EC
side.
This guarantee that we do not accidentally try to flash an
incorrect FW, which would render the touchpad non-functional.
BRANCH=none
BUG=b:63993173
TEST=make TOUCHPAD_FW=SA459C-1211_ForGoogleHammer_3.0.bin \
BOARD=hammer -j
TEST=./usb_updater2 -t
includes output of
sha256sum A459C-1211_ForGoogleHammer_3.0.bin
Change-Id: Id30ab2d7c7d7e2d0f25cc893f685d218c44c022e
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/641736
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common/update_fw.c')
-rw-r--r-- | common/update_fw.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/update_fw.c b/common/update_fw.c index 3d331472dc..2501f29934 100644 --- a/common/update_fw.c +++ b/common/update_fw.c @@ -27,6 +27,8 @@ BUILD_ASSERT(sizeof(touchpad_fw_hashes) == (CONFIG_TOUCHPAD_FW_CHUNKS * SHA256_DIGEST_SIZE)); BUILD_ASSERT(sizeof(touchpad_fw_hashes[0]) == SHA256_DIGEST_SIZE); + +BUILD_ASSERT(sizeof(touchpad_fw_full_hash) == SHA256_DIGEST_SIZE); #endif #define CPRINTF(format, args...) cprintf(CC_USB, format, ## args) |