summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Chen <ddchen@chromium.org>2014-06-06 14:49:48 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-06-12 01:44:31 +0000
commitbc50751dbe3c9aa86e4ea1a186e6602171349f93 (patch)
treefd3a8ddf4eaeda239c1bad49b51cf29096293d1c
parentdbb55cb1f4322cd78d180c25ceeda43439766e40 (diff)
downloadchrome-ec-bc50751dbe3c9aa86e4ea1a186e6602171349f93.tar.gz
flash: add config option to exclude building console commands by default
some commands, e.g. flashwrite, are never used on the final product and also increase the size of the flash image. BRANCH=none BUG=none TEST=make buildall Change-Id: I2a2a0a749b8eee16db5bae6a1dc92c430570e928 Signed-off-by: Dominic Chen <ddchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/202993 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--common/flash.c2
-rw-r--r--include/config.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/common/flash.c b/common/flash.c
index 09b773b809..770609e42d 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -349,6 +349,7 @@ DECLARE_CONSOLE_COMMAND(flashinfo, command_flash_info,
"Print flash info",
NULL);
+#ifdef CONFIG_CMD_FLASH
static int command_flash_erase(int argc, char **argv)
{
int offset = -1;
@@ -412,6 +413,7 @@ DECLARE_CONSOLE_COMMAND(flashwrite, command_flash_write,
"offset [size]",
"Write pattern to flash",
NULL);
+#endif
static int command_flash_wp(int argc, char **argv)
{
diff --git a/include/config.h b/include/config.h
index 1e9826f0a7..2b5e8afadc 100644
--- a/include/config.h
+++ b/include/config.h
@@ -295,6 +295,7 @@
#undef CONFIG_CMD_CLOCKGATES
#undef CONFIG_CMD_COMXTEST
#undef CONFIG_CMD_ECTEMP
+#undef CONFIG_CMD_FLASH
#undef CONFIG_CMD_GSV
#undef CONFIG_CMD_ILIM
#undef CONFIG_CMD_JUMPTAGS