summaryrefslogtreecommitdiff
path: root/common/update_fw.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/update_fw.c')
-rw-r--r--common/update_fw.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/common/update_fw.c b/common/update_fw.c
index 93206f4066..b7128583fe 100644
--- a/common/update_fw.c
+++ b/common/update_fw.c
@@ -18,6 +18,17 @@
#include "util.h"
#include "vb21_struct.h"
+#if defined(CONFIG_TOUCHPAD_VIRTUAL_OFF) && defined(CONFIG_TOUCHPAD_HASH_FW)
+#define CONFIG_TOUCHPAD_FW_CHUNKS \
+ (CONFIG_TOUCHPAD_VIRTUAL_SIZE / CONFIG_UPDATE_PDU_SIZE)
+
+#include "touchpad_fw_hash.h"
+
+BUILD_ASSERT(sizeof(touchpad_fw_hashes) ==
+ (CONFIG_TOUCHPAD_FW_CHUNKS * SHA256_DIGEST_SIZE));
+BUILD_ASSERT(sizeof(touchpad_fw_hashes[0]) == SHA256_DIGEST_SIZE);
+#endif
+
#define CPRINTF(format, args...) cprintf(CC_USB, format, ## args)
/* Section to be updated (i.e. not the current section). */