From ae5de283d4bed0a69843193e85d3fed5b702928b Mon Sep 17 00:00:00 2001 From: Troy Kisky Date: Thu, 12 Jul 2018 17:07:22 -0700 Subject: [PATCH] autoboot: use default environment if debricking board Signed-off-by: Troy Kisky --- common/autoboot.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/autoboot.c b/common/autoboot.c index 94133eaeda78..ef672d7f3f13 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -14,6 +14,8 @@ #include #include #include +#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -296,6 +298,10 @@ const char *bootdelay_process(void) s = env_get("bootdelay"); bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY; + if (is_usb_boot()) { + bootdelay = 1; + set_default_env("!Started from usb", 0); + } #ifdef CONFIG_OF_CONTROL bootdelay = fdtdec_get_config_int(gd->fdt_blob, "bootdelay",