Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2000 |
| 4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 5 | * |
| 6 | * Add to readline cmdline-editing by |
| 7 | * (C) Copyright 2005 |
| 8 | * JinHua Luo, GuangDong Linux Center, <luo.jinhua@gd-linux.com> |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 9 | */ |
| 10 | |
Evgeny Bachinin | d95e1d1 | 2023-03-20 11:23:11 +0300 | [diff] [blame] | 11 | #define pr_fmt(fmt) "cli: %s: " fmt, __func__ |
| 12 | |
Heinrich Schuchardt | 127ad5f | 2024-03-29 17:09:22 +0100 | [diff] [blame] | 13 | #include <ansi.h> |
Simon Glass | 1ea9789 | 2020-05-10 11:40:00 -0600 | [diff] [blame] | 14 | #include <bootstage.h> |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 15 | #include <cli.h> |
| 16 | #include <cli_hush.h> |
Simon Glass | adaaa48 | 2019-11-14 12:57:43 -0700 | [diff] [blame] | 17 | #include <command.h> |
Simon Glass | a73bda4 | 2015-11-08 23:47:45 -0700 | [diff] [blame] | 18 | #include <console.h> |
Simon Glass | 0af6e2d | 2019-08-01 09:46:52 -0600 | [diff] [blame] | 19 | #include <env.h> |
Simon Glass | 5b47e30 | 2014-04-10 20:01:35 -0600 | [diff] [blame] | 20 | #include <fdtdec.h> |
Simon Glass | f11478f | 2019-12-28 10:45:07 -0700 | [diff] [blame] | 21 | #include <hang.h> |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 22 | #include <malloc.h> |
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 23 | #include <asm/global_data.h> |
Simon Glass | 0034d96 | 2021-08-07 07:24:01 -0600 | [diff] [blame] | 24 | #include <dm/ofnode.h> |
Evgeny Bachinin | d95e1d1 | 2023-03-20 11:23:11 +0300 | [diff] [blame] | 25 | #include <linux/errno.h> |
Simon Glass | 5b47e30 | 2014-04-10 20:01:35 -0600 | [diff] [blame] | 26 | |
Simon Glass | 4ef90b7 | 2016-03-19 02:18:38 -0600 | [diff] [blame] | 27 | #ifdef CONFIG_CMDLINE |
Francis Laniel | 5b64c45 | 2023-12-22 22:02:35 +0100 | [diff] [blame] | 28 | |
| 29 | static inline bool use_hush_old(void) |
| 30 | { |
| 31 | return IS_ENABLED(CONFIG_HUSH_SELECTABLE) ? |
| 32 | gd->flags & GD_FLG_HUSH_OLD_PARSER : |
| 33 | IS_ENABLED(CONFIG_HUSH_OLD_PARSER); |
| 34 | } |
| 35 | |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 36 | /* |
| 37 | * Run a command using the selected parser. |
| 38 | * |
| 39 | * @param cmd Command to run |
| 40 | * @param flag Execution flags (CMD_FLAG_...) |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 41 | * Return: 0 on success, or != 0 on error. |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 42 | */ |
| 43 | int run_command(const char *cmd, int flag) |
| 44 | { |
Simon Glass | 7c1d34b | 2023-02-05 15:40:06 -0700 | [diff] [blame] | 45 | #if !IS_ENABLED(CONFIG_HUSH_PARSER) |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 46 | /* |
| 47 | * cli_run_command can return 0 or 1 for success, so clean up |
| 48 | * its result. |
| 49 | */ |
| 50 | if (cli_simple_run_command(cmd, flag) == -1) |
| 51 | return 1; |
| 52 | |
| 53 | return 0; |
Francis Laniel | 5b64c45 | 2023-12-22 22:02:35 +0100 | [diff] [blame] | 54 | #else |
| 55 | if (use_hush_old()) { |
| 56 | int hush_flags = FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP; |
Simon Glass | 94cb9c2 | 2014-10-07 13:59:43 -0600 | [diff] [blame] | 57 | |
Francis Laniel | 5b64c45 | 2023-12-22 22:02:35 +0100 | [diff] [blame] | 58 | if (flag & CMD_FLAG_ENV) |
| 59 | hush_flags |= FLAG_CONT_ON_NEWLINE; |
| 60 | return parse_string_outer(cmd, hush_flags); |
| 61 | } |
| 62 | /* |
| 63 | * Possible values for flags are the following: |
| 64 | * FLAG_EXIT_FROM_LOOP: This flags ensures we exit from loop in |
| 65 | * parse_and_run_stream() after first iteration while normal |
| 66 | * behavior, * i.e. when called from cli_loop(), is to loop |
| 67 | * infinitely. |
| 68 | * FLAG_PARSE_SEMICOLON: modern Hush parses ';' and does not stop |
| 69 | * first time it sees one. So, I think we do not need this flag. |
| 70 | * FLAG_REPARSING: For the moment, I do not understand the goal |
| 71 | * of this flag. |
| 72 | * FLAG_CONT_ON_NEWLINE: This flag seems to be used to continue |
| 73 | * parsing even when reading '\n' when coming from |
| 74 | * run_command(). In this case, modern Hush reads until it finds |
| 75 | * '\0'. So, I think we do not need this flag. |
| 76 | */ |
| 77 | return parse_string_outer_modern(cmd, FLAG_EXIT_FROM_LOOP); |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 78 | #endif |
| 79 | } |
| 80 | |
Thomas Betker | be6346b | 2014-06-05 20:07:57 +0200 | [diff] [blame] | 81 | /* |
| 82 | * Run a command using the selected parser, and check if it is repeatable. |
| 83 | * |
| 84 | * @param cmd Command to run |
| 85 | * @param flag Execution flags (CMD_FLAG_...) |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 86 | * Return: 0 (not repeatable) or 1 (repeatable) on success, -1 on error. |
Thomas Betker | be6346b | 2014-06-05 20:07:57 +0200 | [diff] [blame] | 87 | */ |
| 88 | int run_command_repeatable(const char *cmd, int flag) |
| 89 | { |
Masahiro Yamada | 17a48e4 | 2016-06-21 02:11:19 +0900 | [diff] [blame] | 90 | #ifndef CONFIG_HUSH_PARSER |
Thomas Betker | be6346b | 2014-06-05 20:07:57 +0200 | [diff] [blame] | 91 | return cli_simple_run_command(cmd, flag); |
| 92 | #else |
Francis Laniel | 5b64c45 | 2023-12-22 22:02:35 +0100 | [diff] [blame] | 93 | int ret; |
| 94 | |
| 95 | if (use_hush_old()) { |
| 96 | ret = parse_string_outer(cmd, |
| 97 | FLAG_PARSE_SEMICOLON |
| 98 | | FLAG_EXIT_FROM_LOOP); |
| 99 | } else { |
| 100 | ret = parse_string_outer_modern(cmd, |
| 101 | FLAG_PARSE_SEMICOLON |
| 102 | | FLAG_EXIT_FROM_LOOP); |
| 103 | } |
| 104 | |
Thomas Betker | be6346b | 2014-06-05 20:07:57 +0200 | [diff] [blame] | 105 | /* |
| 106 | * parse_string_outer() returns 1 for failure, so clean up |
| 107 | * its result. |
| 108 | */ |
Francis Laniel | 5b64c45 | 2023-12-22 22:02:35 +0100 | [diff] [blame] | 109 | if (ret) |
Thomas Betker | be6346b | 2014-06-05 20:07:57 +0200 | [diff] [blame] | 110 | return -1; |
| 111 | |
| 112 | return 0; |
| 113 | #endif |
| 114 | } |
Sean Anderson | 41f0a66 | 2020-01-10 12:32:19 -0500 | [diff] [blame] | 115 | #else |
| 116 | __weak int board_run_command(const char *cmdline) |
| 117 | { |
| 118 | printf("## Commands are disabled. Please enable CONFIG_CMDLINE.\n"); |
| 119 | |
| 120 | return 1; |
| 121 | } |
Simon Glass | 4ef90b7 | 2016-03-19 02:18:38 -0600 | [diff] [blame] | 122 | #endif /* CONFIG_CMDLINE */ |
Thomas Betker | be6346b | 2014-06-05 20:07:57 +0200 | [diff] [blame] | 123 | |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 124 | int run_command_list(const char *cmd, int len, int flag) |
| 125 | { |
| 126 | int need_buff = 1; |
| 127 | char *buff = (char *)cmd; /* cast away const */ |
| 128 | int rcode = 0; |
| 129 | |
| 130 | if (len == -1) { |
| 131 | len = strlen(cmd); |
Masahiro Yamada | 17a48e4 | 2016-06-21 02:11:19 +0900 | [diff] [blame] | 132 | #ifdef CONFIG_HUSH_PARSER |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 133 | /* hush will never change our string */ |
| 134 | need_buff = 0; |
| 135 | #else |
| 136 | /* the built-in parser will change our string if it sees \n */ |
| 137 | need_buff = strchr(cmd, '\n') != NULL; |
| 138 | #endif |
| 139 | } |
| 140 | if (need_buff) { |
| 141 | buff = malloc(len + 1); |
| 142 | if (!buff) |
| 143 | return 1; |
| 144 | memcpy(buff, cmd, len); |
| 145 | buff[len] = '\0'; |
| 146 | } |
Masahiro Yamada | 17a48e4 | 2016-06-21 02:11:19 +0900 | [diff] [blame] | 147 | #ifdef CONFIG_HUSH_PARSER |
Francis Laniel | 5b64c45 | 2023-12-22 22:02:35 +0100 | [diff] [blame] | 148 | if (use_hush_old()) { |
| 149 | rcode = parse_string_outer(buff, FLAG_PARSE_SEMICOLON); |
| 150 | } else { |
| 151 | rcode = parse_string_outer_modern(buff, FLAG_PARSE_SEMICOLON); |
| 152 | } |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 153 | #else |
| 154 | /* |
| 155 | * This function will overwrite any \n it sees with a \0, which |
| 156 | * is why it can't work with a const char *. Here we are making |
| 157 | * using of internal knowledge of this function, to avoid always |
| 158 | * doing a malloc() which is actually required only in a case that |
| 159 | * is pretty rare. |
| 160 | */ |
Simon Glass | 4ef90b7 | 2016-03-19 02:18:38 -0600 | [diff] [blame] | 161 | #ifdef CONFIG_CMDLINE |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 162 | rcode = cli_simple_run_command_list(buff, flag); |
Simon Glass | 4ef90b7 | 2016-03-19 02:18:38 -0600 | [diff] [blame] | 163 | #else |
| 164 | rcode = board_run_command(buff); |
| 165 | #endif |
Peng Fan | 6322551 | 2015-12-22 17:14:13 +0800 | [diff] [blame] | 166 | #endif |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 167 | if (need_buff) |
| 168 | free(buff); |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 169 | |
| 170 | return rcode; |
| 171 | } |
| 172 | |
Simon Glass | f3c6a1d | 2022-07-13 06:06:59 -0600 | [diff] [blame] | 173 | int run_commandf(const char *fmt, ...) |
| 174 | { |
| 175 | va_list args; |
Evgeny Bachinin | d95e1d1 | 2023-03-20 11:23:11 +0300 | [diff] [blame] | 176 | int nbytes; |
Simon Glass | f3c6a1d | 2022-07-13 06:06:59 -0600 | [diff] [blame] | 177 | |
| 178 | va_start(args, fmt); |
Evgeny Bachinin | d95e1d1 | 2023-03-20 11:23:11 +0300 | [diff] [blame] | 179 | /* |
| 180 | * Limit the console_buffer space being used to CONFIG_SYS_CBSIZE, |
| 181 | * because its last byte is used to fit the replacement of \0 by \n\0 |
| 182 | * in underlying hush parser |
| 183 | */ |
| 184 | nbytes = vsnprintf(console_buffer, CONFIG_SYS_CBSIZE, fmt, args); |
Simon Glass | f3c6a1d | 2022-07-13 06:06:59 -0600 | [diff] [blame] | 185 | va_end(args); |
| 186 | |
Evgeny Bachinin | d95e1d1 | 2023-03-20 11:23:11 +0300 | [diff] [blame] | 187 | if (nbytes < 0) { |
| 188 | pr_debug("I/O internal error occurred.\n"); |
| 189 | return -EIO; |
| 190 | } else if (nbytes >= CONFIG_SYS_CBSIZE) { |
| 191 | pr_debug("'fmt' size:%d exceeds the limit(%d)\n", |
| 192 | nbytes, CONFIG_SYS_CBSIZE); |
| 193 | return -ENOSPC; |
| 194 | } |
| 195 | return run_command(console_buffer, 0); |
Simon Glass | f3c6a1d | 2022-07-13 06:06:59 -0600 | [diff] [blame] | 196 | } |
| 197 | |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 198 | /****************************************************************************/ |
| 199 | |
| 200 | #if defined(CONFIG_CMD_RUN) |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 201 | int do_run(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 202 | { |
Marek Vasut | fd09932 | 2022-12-20 07:25:59 +0100 | [diff] [blame] | 203 | int i, ret; |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 204 | |
| 205 | if (argc < 2) |
| 206 | return CMD_RET_USAGE; |
| 207 | |
| 208 | for (i = 1; i < argc; ++i) { |
| 209 | char *arg; |
| 210 | |
Simon Glass | 64b723f | 2017-08-03 12:22:12 -0600 | [diff] [blame] | 211 | arg = env_get(argv[i]); |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 212 | if (arg == NULL) { |
| 213 | printf("## Error: \"%s\" not defined\n", argv[i]); |
| 214 | return 1; |
| 215 | } |
| 216 | |
Marek Vasut | fd09932 | 2022-12-20 07:25:59 +0100 | [diff] [blame] | 217 | ret = run_command(arg, flag | CMD_FLAG_ENV); |
| 218 | if (ret) |
| 219 | return ret; |
Simon Glass | d6d592f | 2014-04-10 20:01:29 -0600 | [diff] [blame] | 220 | } |
| 221 | return 0; |
| 222 | } |
| 223 | #endif |
Simon Glass | 33f7913 | 2014-04-10 20:01:34 -0600 | [diff] [blame] | 224 | |
Masahiro Yamada | 366b24f | 2015-08-12 07:31:55 +0900 | [diff] [blame] | 225 | #if CONFIG_IS_ENABLED(OF_CONTROL) |
Simon Glass | 5b47e30 | 2014-04-10 20:01:35 -0600 | [diff] [blame] | 226 | bool cli_process_fdt(const char **cmdp) |
| 227 | { |
| 228 | /* Allow the fdt to override the boot command */ |
Simon Glass | 0034d96 | 2021-08-07 07:24:01 -0600 | [diff] [blame] | 229 | const char *env = ofnode_conf_read_str("bootcmd"); |
Simon Glass | 5b47e30 | 2014-04-10 20:01:35 -0600 | [diff] [blame] | 230 | if (env) |
| 231 | *cmdp = env; |
| 232 | /* |
| 233 | * If the bootsecure option was chosen, use secure_boot_cmd(). |
| 234 | * Always use 'env' in this case, since bootsecure requres that the |
| 235 | * bootcmd was specified in the FDT too. |
| 236 | */ |
Simon Glass | 0034d96 | 2021-08-07 07:24:01 -0600 | [diff] [blame] | 237 | return ofnode_conf_read_int("bootsecure", 0); |
Simon Glass | 5b47e30 | 2014-04-10 20:01:35 -0600 | [diff] [blame] | 238 | } |
| 239 | |
| 240 | /* |
| 241 | * Runs the given boot command securely. Specifically: |
| 242 | * - Doesn't run the command with the shell (run_command or parse_string_outer), |
| 243 | * since that's a lot of code surface that an attacker might exploit. |
| 244 | * Because of this, we don't do any argument parsing--the secure boot command |
| 245 | * has to be a full-fledged u-boot command. |
| 246 | * - Doesn't check for keypresses before booting, since that could be a |
| 247 | * security hole; also disables Ctrl-C. |
| 248 | * - Doesn't allow the command to return. |
| 249 | * |
| 250 | * Upon any failures, this function will drop into an infinite loop after |
| 251 | * printing the error message to console. |
| 252 | */ |
| 253 | void cli_secure_boot_cmd(const char *cmd) |
| 254 | { |
Simon Glass | 4ef90b7 | 2016-03-19 02:18:38 -0600 | [diff] [blame] | 255 | #ifdef CONFIG_CMDLINE |
Simon Glass | ed38aef | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 256 | struct cmd_tbl *cmdtp; |
Simon Glass | 4ef90b7 | 2016-03-19 02:18:38 -0600 | [diff] [blame] | 257 | #endif |
Simon Glass | 5b47e30 | 2014-04-10 20:01:35 -0600 | [diff] [blame] | 258 | int rc; |
| 259 | |
| 260 | if (!cmd) { |
| 261 | printf("## Error: Secure boot command not specified\n"); |
| 262 | goto err; |
| 263 | } |
| 264 | |
| 265 | /* Disable Ctrl-C just in case some command is used that checks it. */ |
| 266 | disable_ctrlc(1); |
| 267 | |
| 268 | /* Find the command directly. */ |
Simon Glass | 4ef90b7 | 2016-03-19 02:18:38 -0600 | [diff] [blame] | 269 | #ifdef CONFIG_CMDLINE |
Simon Glass | 5b47e30 | 2014-04-10 20:01:35 -0600 | [diff] [blame] | 270 | cmdtp = find_cmd(cmd); |
| 271 | if (!cmdtp) { |
| 272 | printf("## Error: \"%s\" not defined\n", cmd); |
| 273 | goto err; |
| 274 | } |
| 275 | |
| 276 | /* Run the command, forcing no flags and faking argc and argv. */ |
| 277 | rc = (cmdtp->cmd)(cmdtp, 0, 1, (char **)&cmd); |
| 278 | |
Simon Glass | 4ef90b7 | 2016-03-19 02:18:38 -0600 | [diff] [blame] | 279 | #else |
| 280 | rc = board_run_command(cmd); |
| 281 | #endif |
| 282 | |
Simon Glass | 5b47e30 | 2014-04-10 20:01:35 -0600 | [diff] [blame] | 283 | /* Shouldn't ever return from boot command. */ |
| 284 | printf("## Error: \"%s\" returned (code %d)\n", cmd, rc); |
| 285 | |
| 286 | err: |
| 287 | /* |
| 288 | * Not a whole lot to do here. Rebooting won't help much, since we'll |
| 289 | * just end up right back here. Just loop. |
| 290 | */ |
| 291 | hang(); |
| 292 | } |
Masahiro Yamada | 366b24f | 2015-08-12 07:31:55 +0900 | [diff] [blame] | 293 | #endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ |
Simon Glass | 5b47e30 | 2014-04-10 20:01:35 -0600 | [diff] [blame] | 294 | |
Simon Glass | 33f7913 | 2014-04-10 20:01:34 -0600 | [diff] [blame] | 295 | void cli_loop(void) |
| 296 | { |
Heiko Schocher | 7df72c3 | 2019-04-12 12:37:03 +0200 | [diff] [blame] | 297 | bootstage_mark(BOOTSTAGE_ID_ENTER_CLI_LOOP); |
Francis Laniel | 3b66e57 | 2023-12-22 22:02:32 +0100 | [diff] [blame] | 298 | #if CONFIG_IS_ENABLED(HUSH_PARSER) |
| 299 | if (gd->flags & GD_FLG_HUSH_MODERN_PARSER) |
| 300 | parse_and_run_file(); |
| 301 | else if (gd->flags & GD_FLG_HUSH_OLD_PARSER) |
| 302 | parse_file_outer(); |
| 303 | |
| 304 | printf("Problem\n"); |
Simon Glass | 33f7913 | 2014-04-10 20:01:34 -0600 | [diff] [blame] | 305 | /* This point is never reached */ |
| 306 | for (;;); |
Stefan Roese | 824300a | 2016-04-04 16:32:15 +0200 | [diff] [blame] | 307 | #elif defined(CONFIG_CMDLINE) |
Simon Glass | 33f7913 | 2014-04-10 20:01:34 -0600 | [diff] [blame] | 308 | cli_simple_loop(); |
Simon Glass | 4ef90b7 | 2016-03-19 02:18:38 -0600 | [diff] [blame] | 309 | #else |
| 310 | printf("## U-Boot command line is disabled. Please enable CONFIG_CMDLINE\n"); |
Masahiro Yamada | 17a48e4 | 2016-06-21 02:11:19 +0900 | [diff] [blame] | 311 | #endif /*CONFIG_HUSH_PARSER*/ |
Simon Glass | 33f7913 | 2014-04-10 20:01:34 -0600 | [diff] [blame] | 312 | } |
| 313 | |
| 314 | void cli_init(void) |
| 315 | { |
Masahiro Yamada | 17a48e4 | 2016-06-21 02:11:19 +0900 | [diff] [blame] | 316 | #ifdef CONFIG_HUSH_PARSER |
Francis Laniel | 3b66e57 | 2023-12-22 22:02:32 +0100 | [diff] [blame] | 317 | /* This if block is used to initialize hush parser gd flag. */ |
Francis Laniel | efb5800 | 2023-12-22 22:02:31 +0100 | [diff] [blame] | 318 | if (!(gd->flags & GD_FLG_HUSH_OLD_PARSER) |
Francis Laniel | 3b66e57 | 2023-12-22 22:02:32 +0100 | [diff] [blame] | 319 | && !(gd->flags & GD_FLG_HUSH_MODERN_PARSER)) { |
| 320 | if (CONFIG_IS_ENABLED(HUSH_OLD_PARSER)) |
| 321 | gd->flags |= GD_FLG_HUSH_OLD_PARSER; |
| 322 | else if (CONFIG_IS_ENABLED(HUSH_MODERN_PARSER)) |
| 323 | gd->flags |= GD_FLG_HUSH_MODERN_PARSER; |
| 324 | } |
| 325 | |
| 326 | if (gd->flags & GD_FLG_HUSH_OLD_PARSER) { |
| 327 | u_boot_hush_start(); |
| 328 | } else if (gd->flags & GD_FLG_HUSH_MODERN_PARSER) { |
| 329 | u_boot_hush_start_modern(); |
| 330 | } else { |
| 331 | printf("No valid hush parser to use, cli will not initialized!\n"); |
| 332 | return; |
| 333 | } |
Simon Glass | 33f7913 | 2014-04-10 20:01:34 -0600 | [diff] [blame] | 334 | #endif |
| 335 | |
| 336 | #if defined(CONFIG_HUSH_INIT_VAR) |
| 337 | hush_init_var(); |
| 338 | #endif |
Heinrich Schuchardt | 127ad5f | 2024-03-29 17:09:22 +0100 | [diff] [blame] | 339 | |
| 340 | if (CONFIG_IS_ENABLED(VIDEO_ANSI)) |
| 341 | printf(ANSI_CURSOR_SHOW "\n"); |
Simon Glass | 33f7913 | 2014-04-10 20:01:34 -0600 | [diff] [blame] | 342 | } |