diff options
Diffstat (limited to 'common/main.c')
-rw-r--r-- | common/main.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c index a15f020..94b3fa3 100644 --- a/common/main.c +++ b/common/main.c @@ -437,6 +437,15 @@ void main_loop (void) s = getenv ("bootdelay"); bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY; +#ifdef is_boot_from_usb + if (is_boot_from_usb()) { + printf("Boot from USB for mfgtools\n"); + bootdelay = 0; + set_default_env("Use default environment for mfgtools\n"); + } else { + printf("Normal Boot\n"); + } +#endif debug ("### main_loop entered: bootdelay=%d\n\n", bootdelay); #if defined(CONFIG_MENU_SHOW) @@ -461,6 +470,13 @@ void main_loop (void) else #endif /* CONFIG_BOOTCOUNT_LIMIT */ s = getenv ("bootcmd"); +#ifdef is_boot_from_usb + if (is_boot_from_usb()) { + s = getenv("bootcmd_mfg"); + printf("Run bootcmd_mfg: %s\n", s); + } +#endif + #ifdef CONFIG_OF_CONTROL /* Allow the fdt to override the boot command */ env = fdtdec_get_config_string(gd->fdt_blob, "bootcmd"); |