From 82e0892fc39a107285474b6f3ae3d1eb3901d82c Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Wed, 30 Aug 2017 15:02:48 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/641736 Reviewed-by: Vincent Palatin --- common/update_fw.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/update_fw.c') 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) -- cgit v1.2.1