summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-05-23 16:01:18 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-05-28 07:30:36 -0700
commit5c924c0c2175d176d34ceccc64deeec8c4d4c92a (patch)
tree404615fa2c85a5a381d165bdbb7fa59e4cf9e8ea
parentfe70db89251961428ab2b83335b152f3311022fa (diff)
downloadchrome-ec-5c924c0c2175d176d34ceccc64deeec8c4d4c92a.tar.gz
hammer: Increase PDU size to 4k
Saves another ~1300 bytes of flash size, as the touchpad hashes can now be computed in blocks of 4K, instead of 1K. This costs 3K of SRAM, which we would not otherwise need on hammer. wand can only fit 2k PDU, so let's stick to that. Also, make sure that util/gen_touchpad_fw is regenerated when the configuration option changes (touchpad FW size, PDU size). Sadly, this will still break bisection from commit after this CL, to before this CL. BRANCH=poppy BUG=b:80167548 TEST=make buildall -j TEST=make BOARD=hammer/staff/wand/whiskers all tests -j TEST=Copy new staff image with old touchpad FW to DUT, verify that FW can be updated. Change-Id: Ic1763684da730dc986bbbcb3312088c8208c84b5 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1070953 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--board/hammer/board.h8
-rw-r--r--util/build.mk2
2 files changed, 10 insertions, 0 deletions
diff --git a/board/hammer/board.h b/board/hammer/board.h
index 013dd4bc68..0f84c53d39 100644
--- a/board/hammer/board.h
+++ b/board/hammer/board.h
@@ -99,6 +99,14 @@
#define CONFIG_STREAM_USB
#define CONFIG_USB_UPDATE
+#undef CONFIG_UPDATE_PDU_SIZE
+#ifdef BOARD_WAND
+/* Wand does not have enough space to fit 4k PDU. */
+#define CONFIG_UPDATE_PDU_SIZE 2048
+#else
+#define CONFIG_UPDATE_PDU_SIZE 4096
+#endif
+
#undef CONFIG_USB_MAXPOWER_MA
#define CONFIG_USB_MAXPOWER_MA 100
diff --git a/util/build.mk b/util/build.mk
index be130c728c..065528a681 100644
--- a/util/build.mk
+++ b/util/build.mk
@@ -69,6 +69,8 @@ OPENSSL_LDFLAGS := $(shell $(PKG_CONFIG) --libs openssl)
$(out)/util/gen_touchpad_hash: BUILD_CFLAGS += $(OPENSSL_CFLAGS)
$(out)/util/gen_touchpad_hash: BUILD_LDFLAGS += $(OPENSSL_LDFLAGS)
+
+deps-y += $(out)/util/gen_touchpad_hash.d
endif # CONFIG_TOUCHPAD_VIRTUAL_OFF
cbi-util-objs=../common/crc8.o ../common/cbi.o