* Patch by Lutz Dennig, 10 Apr 2003:
Update for R360MPI board
* Add new meaning to "autostart" environment variable:
If set to "no", a standalone image passed to the
"bootm" command will be copied to the load address
(and eventually uncompressed), but NOT be started.
This can be used to load and uncompress arbitrary
data.
* Set max brightness for MN11236 displays on TRAB board
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index f3f9603..8b32f1c 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -287,12 +287,17 @@
switch (hdr->ih_type) {
case IH_TYPE_STANDALONE:
- appl = (int (*)(cmd_tbl_t *, int, int, char *[]))ntohl(hdr->ih_ep);
if (iflag)
enable_interrupts();
+ /* load (and uncompress), but don't start if "autostart"
+ * is set to "no"
+ */
+ if (((s = getenv("autostart")) != NULL) && (strcmp(s,"no") == 0))
+ return 0;
+ appl = (int (*)(cmd_tbl_t *, int, int, char *[]))ntohl(hdr->ih_ep);
(*appl)(cmdtp, flag, argc-1, &argv[1]);
- break;
+ return 0;
case IH_TYPE_KERNEL:
case IH_TYPE_MULTI:
/* handled below */