diff options
author | Todd Broch <tbroch@chromium.org> | 2015-01-05 13:36:47 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-06 04:45:53 +0000 |
commit | efb28cc783b116d393a939cdd34d69557c29dd22 (patch) | |
tree | 28c9944e0729dd5d17de3d2936588cc5b9b9d3f7 | |
parent | c3adc315b3ba724bccafe7c97e2c1b8ab6120cf9 (diff) | |
download | chrome-ec-efb28cc783b116d393a939cdd34d69557c29dd22.tar.gz |
Add CONFIG_CMD_HASH to optionally remove 'hash' console command.
Create optional config to remove 'hash' console command and undef it
for a few space-constrained boards (ryu*, samus_pd).
Signed-off-by: Todd Broch <tbroch@chromium.org>
BRANCH=samus
BUG=chrome-os-partner:34489
TEST=manual,
- compile for ryu, samus_pd and save ~400bytes
- 'hash' command no longer appears as a console command
Change-Id: I054fd4473911dd362c2c1d171ee7aaad859d893a
Reviewed-on: https://chromium-review.googlesource.com/238433
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
-rw-r--r-- | board/ryu/board.h | 1 | ||||
-rw-r--r-- | board/ryu_p1/board.h | 1 | ||||
-rw-r--r-- | board/samus_pd/board.h | 1 | ||||
-rw-r--r-- | common/vboot_hash.c | 4 | ||||
-rw-r--r-- | include/config.h | 1 |
5 files changed, 6 insertions, 2 deletions
diff --git a/board/ryu/board.h b/board/ryu/board.h index 49aeca9f3d..6c44054aac 100644 --- a/board/ryu/board.h +++ b/board/ryu/board.h @@ -19,6 +19,7 @@ #define CC_DEFAULT (CC_ALL & ~CC_MASK(CC_USBPD)) /* Optional features */ +#undef CONFIG_CMD_HASH #define CONFIG_FORCE_CONSOLE_RESUME #define CONFIG_STM_HWTIMER32 #define CONFIG_USB_POWER_DELIVERY diff --git a/board/ryu_p1/board.h b/board/ryu_p1/board.h index abfc0fb2e7..07a12e9bdf 100644 --- a/board/ryu_p1/board.h +++ b/board/ryu_p1/board.h @@ -19,6 +19,7 @@ #define CC_DEFAULT (CC_ALL & ~CC_MASK(CC_USBPD)) /* Optional features */ +#undef CONFIG_CMD_HASH #define CONFIG_COMMON_GPIO_SHORTNAMES #define CONFIG_STM_HWTIMER32 #define CONFIG_USB_POWER_DELIVERY diff --git a/board/samus_pd/board.h b/board/samus_pd/board.h index adbb4f02df..a607d690ed 100644 --- a/board/samus_pd/board.h +++ b/board/samus_pd/board.h @@ -19,6 +19,7 @@ #define CONFIG_ADC #define CONFIG_BOARD_PRE_INIT #define CONFIG_CHARGE_MANAGER +#undef CONFIG_CMD_HASH /* Minimum ilim = 500 mA */ #define CONFIG_CHARGER_INPUT_CURRENT PWM_0_MA #define CONFIG_COMMON_GPIO_SHORTNAMES diff --git a/common/vboot_hash.c b/common/vboot_hash.c index 9d51d7517d..e7717e96db 100644 --- a/common/vboot_hash.c +++ b/common/vboot_hash.c @@ -209,7 +209,7 @@ DECLARE_HOOK(HOOK_SYSJUMP, vboot_hash_preserve_state, HOOK_PRIO_DEFAULT); /****************************************************************************/ /* Console commands */ - +#ifdef CONFIG_CMD_HASH static int command_hash(int argc, char **argv) { uint32_t offset = CONFIG_FW_RW_OFF; @@ -274,7 +274,7 @@ DECLARE_CONSOLE_COMMAND(hash, command_hash, "[abort | ro | rw] | [<offset> <size> [<nonce>]]", "Request hash recomputation", NULL); - +#endif /* CONFIG_CMD_HASH */ /****************************************************************************/ /* Host commands */ diff --git a/include/config.h b/include/config.h index d0dbd68d9b..ffa46704c4 100644 --- a/include/config.h +++ b/include/config.h @@ -328,6 +328,7 @@ #undef CONFIG_CMD_ECTEMP #undef CONFIG_CMD_FLASH #undef CONFIG_CMD_GSV +#define CONFIG_CMD_HASH #undef CONFIG_CMD_HOSTCMD #undef CONFIG_CMD_ILIM #undef CONFIG_CMD_JUMPTAGS |