summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2017-08-15 15:53:30 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-09-15 03:08:26 -0700
commit94279fc38fae533e86425102082e0c681d98d259 (patch)
tree2012cd0153497e193fa417d2ce71941b0264a408 /Makefile
parente18d9dd5300d5e1693ec3d4c72dd105efcff4393 (diff)
downloadchrome-ec-94279fc38fae533e86425102082e0c681d98d259.tar.gz
Makefile: Generate hashes for the touchpad FW
Based on the passed TOUCHPAD_FW parameter to the make command, the build system generates hashes for the touchpad FW. To generate the hashes, gen_touchpad_hash splits the touchpad FW in blocks of CONFIG_UPDATE_PDU_SIZE, that are hashed individually (SHA-256), and then stored in the EC image. This will allow the USB updater code to verify the integrity of the touchpad firmware being flashed. When no FW is provided, zeros are output, which do not match any valid data. BRANCH=none BUG=b:63993173 TEST=make TOUCHPAD_FW=SA459C-1211_ForGoogleHammer_3.0.bin \ BOARD=hammer -j TEST=Using variations of make TOUCHPAD_FW=SA459C-1211_ForGoogleHammer_3.0.bin \ BOARD=hammer -j make TOUCHPAD_FW=SA459C-1211_ForGoogleHammer_4.0.bin \ BOARD=hammer -j make BOARD=hammer -j Check that TPHASH touchpad_fw_hash.h is only regenerated when the parameter changes. Change-Id: Ie347270aa9c00342de13489c9422e45e681b94c2 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/615321 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 92fd15a12f..feb72fcfed 100644
--- a/Makefile
+++ b/Makefile
@@ -36,6 +36,10 @@ config=$(out)/.config
# If no key file is provided, use the default dev key
PEM ?= $(BDIR)/dev_key.pem
+# If CONFIG_TOUCHPAD_HASH_FW is set, include hashes of a touchpad firmware in
+# the EC image (if no touchpad firmware is provided, just output blank hashes).
+TOUCHPAD_FW ?=
+
include Makefile.toolchain
# Define the traditional first target. The dependencies of this are near the