cmd: Add new cli command

This command can be used to print the current parser with 'cli get'.
It can also be used to set the current parser with 'cli set'.
For the moment, only one value is valid for set: old.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
This commit is contained in:
Francis Laniel 2023-12-22 22:02:31 +01:00 committed by Tom Rini
parent 603a814a33
commit 6bb39f5d16
5 changed files with 178 additions and 1 deletions

View file

@ -268,7 +268,8 @@ void cli_loop(void)
void cli_init(void)
{
#ifdef CONFIG_HUSH_PARSER
if (!(gd->flags & GD_FLG_HUSH_OLD_PARSER))
if (!(gd->flags & GD_FLG_HUSH_OLD_PARSER)
&& CONFIG_IS_ENABLED(HUSH_OLD_PARSER))
gd->flags |= GD_FLG_HUSH_OLD_PARSER;
u_boot_hush_start();
#endif