1 // SPDX-License-Identifier: GPL-2.0+
19 static void run_preboot_environment_command(void)
23 p = env_get("preboot");
27 if (IS_ENABLED(CONFIG_AUTOBOOT_KEYED))
28 prev = disable_ctrlc(1); /* disable Ctrl-C checking */
30 run_command_list(p, -1, 0);
32 if (IS_ENABLED(CONFIG_AUTOBOOT_KEYED))
33 disable_ctrlc(prev); /* restore Ctrl-C checking */
37 /* We come here after U-Boot is initialised and ready to process commands */
42 bootstage_mark_name(BOOTSTAGE_ID_MAIN_LOOP, "main_loop");
44 if (IS_ENABLED(CONFIG_VERSION_VARIABLE))
45 env_set("ver", version_string); /* set version variable */
49 if (IS_ENABLED(CONFIG_USE_PREBOOT))
50 run_preboot_environment_command();
52 if (IS_ENABLED(CONFIG_UPDATE_TFTP))
53 update_tftp(0UL, NULL, NULL);
55 s = bootdelay_process();
56 if (cli_process_fdt(&s))
57 cli_secure_boot_cmd(s);
62 panic("No CLI available");