summaryrefslogtreecommitdiff
path: root/common/cmd_net.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2007-07-09 23:41:45 +0200
committerWolfgang Denk <wd@denx.de>2007-07-09 23:41:45 +0200
commitbf6a9ca9b2aa219612c3678444b8123e28aa8940 (patch)
treee2d6a2c2c8af12dbc6f3438d13de485473f714d5 /common/cmd_net.c
parente80955f07de03fef0196353e77534b2300193c1c (diff)
parenta5d71e290f3673269be8eefb4ec44f53412f9461 (diff)
downloadu-boot-imx-bf6a9ca9b2aa219612c3678444b8123e28aa8940.zip
u-boot-imx-bf6a9ca9b2aa219612c3678444b8123e28aa8940.tar.gz
u-boot-imx-bf6a9ca9b2aa219612c3678444b8123e28aa8940.tar.bz2
Merge with /home/hs/Atronic/u-boot
Diffstat (limited to 'common/cmd_net.c')
-rw-r--r--common/cmd_net.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/common/cmd_net.c b/common/cmd_net.c
index 2cb2c5d..e9d552e 100644
--- a/common/cmd_net.c
+++ b/common/cmd_net.c
@@ -30,6 +30,13 @@
#if (CONFIG_COMMANDS & CFG_CMD_NET)
+#ifdef CONFIG_SHOW_BOOT_PROGRESS
+# include <status_led.h>
+extern void show_boot_progress (int val);
+# define SHOW_BOOT_PROGRESS(arg) show_boot_progress (arg)
+#else
+# define SHOW_BOOT_PROGRESS(arg)
+#endif
extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
@@ -184,18 +191,25 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
break;
default: printf ("Usage:\n%s\n", cmdtp->usage);
+ SHOW_BOOT_PROGRESS(-80);
return 1;
}
- if ((size = NetLoop(proto)) < 0)
+ SHOW_BOOT_PROGRESS(80);
+ if ((size = NetLoop(proto)) < 0) {
+ SHOW_BOOT_PROGRESS(-81);
return 1;
+ }
+ SHOW_BOOT_PROGRESS(81);
/* NetLoop ok, update environment */
netboot_update_env();
/* done if no file was loaded (no errors though) */
- if (size == 0)
+ if (size == 0) {
+ SHOW_BOOT_PROGRESS(-82);
return 0;
+ }
/* flush cache */
flush_cache(load_addr, size);
@@ -208,15 +222,23 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
printf ("Automatic boot of image at addr 0x%08lX ...\n",
load_addr);
+ SHOW_BOOT_PROGRESS(82);
rcode = do_bootm (cmdtp, 0, 1, local_args);
}
#ifdef CONFIG_AUTOSCRIPT
if (((s = getenv("autoscript")) != NULL) && (strcmp(s,"yes") == 0)) {
printf("Running autoscript at addr 0x%08lX ...\n", load_addr);
+ SHOW_BOOT_PROGRESS(83);
rcode = autoscript (load_addr);
}
#endif
+#if defined(CONFIG_SHOW_BOOT_PROGRESS)
+ if (rcode < 0)
+ SHOW_BOOT_PROGRESS(-83);
+ else
+ SHOW_BOOT_PROGRESS(84);
+#endif
return rcode;
}