Message ID | 56b97eb20ad0f2d706e82cdf5075051362fccefa.1425901604.git.michal.simek@xilinx.com |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
On Mon, Mar 09, 2015 at 12:46:47PM +0100, Michal Simek wrote: > From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> > > Added support to disable the start of application by using > a environment variable autostart > > Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> > Signed-off-by: Michal Simek <michal.simek@xilinx.com> Applied to u-boot/master, thanks!
diff --git a/common/cmd_elf.c b/common/cmd_elf.c index 58b61c26403b..c745371506ce 100644 --- a/common/cmd_elf.c +++ b/common/cmd_elf.c @@ -95,6 +95,7 @@ int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) unsigned long addr; /* Address of the ELF image */ unsigned long rc; /* Return value from user code */ char *sload, *saddr; + const char *ep = getenv("autostart"); /* -------------------------------------------------- */ int rcode = 0; @@ -123,6 +124,9 @@ int do_bootelf(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) else addr = load_elf_image_shdr(addr); + if (ep && !strcmp(ep, "no")) + return rcode; + printf("## Starting application at 0x%08lx ...\n", addr); /*