Commit 44c8fd3abaded5bf18a48947c6d1286927cbdf2b

Authored by Siva Durga Prasad Paladugu
Committed by Tom Rini
1 parent 23b5877c64

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>

Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff

... ... @@ -95,6 +95,7 @@
95 95 unsigned long addr; /* Address of the ELF image */
96 96 unsigned long rc; /* Return value from user code */
97 97 char *sload, *saddr;
  98 + const char *ep = getenv("autostart");
98 99  
99 100 /* -------------------------------------------------- */
100 101 int rcode = 0;
... ... @@ -122,6 +123,9 @@
122 123 addr = load_elf_image_phdr(addr);
123 124 else
124 125 addr = load_elf_image_shdr(addr);
  126 +
  127 + if (ep && !strcmp(ep, "no"))
  128 + return rcode;
125 129  
126 130 printf("## Starting application at 0x%08lx ...\n", addr);
127 131