diff options
author | Aseda Aboagye <aaboagye@google.com> | 2015-10-29 15:56:49 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-11-11 12:58:34 -0800 |
commit | 397dbec3d6e8ca3d3f9961d1f9379dd810692da7 (patch) | |
tree | 012101e25c2c4fb309b8ebdfb1d341f7b207cf51 /include | |
parent | ac7a8864dcda3fa914535118796144c3e29a73d0 (diff) | |
download | chrome-ec-397dbec3d6e8ca3d3f9961d1f9379dd810692da7.tar.gz |
console: Add support for using EC-3PO console.
This commit introduces a new CONFIG_* option. To utilise the
experimental console, simply define the following config option in the
board's board.h file.
#define CONFIG_EXPERIMENTAL_CONSOLE
This is a temporary option which allows the EC console to be work with
the EC-3PO interactive console interface. When this option is enabled,
the EC expects commands to packed in a particular format. This is for
command integrity and allows the interpreter to perform automatic
command retrying in the event that a character is dropped from the sent
command.
It also removes a lot of the console editing methods since they are now
being served by EC-3PO.
Once the EC-3PO interpreter is pulled into servod, we can enable this
feature by default and the config option can go away.
BUG=chrome-os-partner:46054
BRANCH=None
TEST=make -j buildall tests
TEST=Enable CONFIG_EXPERIMENTAL_CONSOLE on GLaDOS; Flash EC and verify
that console works via the EC-3PO interactive console interface.
TEST=Build and flash on GLaDOS and verify normal console operation on
standard EC UART.
CQ-DEPEND=CL:308615
Change-Id: I5e66eb94e31299b27ce029b7f7ce6ba0a7fb6816
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/309991
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index afe8eab5d0..c396517a4a 100644 --- a/include/config.h +++ b/include/config.h @@ -602,6 +602,15 @@ */ #undef CONFIG_CONSOLE_RESTRICTED_INPUT +/* + * Enable the experimental console. + * + * NOTE: If you enable this experimental console, you will need to run the + * EC-3PO interactive console in the util directory! Otherwise, you won't be + * able to enter any commands. + */ +#undef CONFIG_EXPERIMENTAL_CONSOLE + /* Include CRC-8 utility function */ #undef CONFIG_CRC8 @@ -2008,6 +2017,18 @@ #include "config_chip.h" #include "board.h" +/******************************************************************************/ +/* + * Disable the built-in console history if using the experimental console. + * + * The experimental console keeps its own session-persistent history which + * survives EC reboot. It also requires CRC8 for command integrity. + */ +#ifdef CONFIG_EXPERIMENTAL_CONSOLE +#undef CONFIG_CONSOLE_HISTORY +#define CONFIG_CRC8 +#endif /* defined(CONFIG_EXPERIMENTAL_CONSOLE) */ + /*****************************************************************************/ /* * Handle task-dependent configs. |