summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>2015-03-09 12:46:47 +0100
committerTom Rini <trini@konsulko.com>2015-03-09 11:13:29 -0400
commit44c8fd3abaded5bf18a48947c6d1286927cbdf2b (patch)
tree79072da78ebcb67f4cd5f9099cf5777a9a5ca129 /common
parent23b5877c64562a314f8d8c60d0066cd346f2d886 (diff)
downloadu-boot-imx-44c8fd3abaded5bf18a48947c6d1286927cbdf2b.zip
u-boot-imx-44c8fd3abaded5bf18a48947c6d1286927cbdf2b.tar.gz
u-boot-imx-44c8fd3abaded5bf18a48947c6d1286927cbdf2b.tar.bz2
common: cmd_elf: Add support to disable start of application
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>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_elf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/cmd_elf.c b/common/cmd_elf.c
index 58b61c2..c745371 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);
/*