|
|
@ -230,36 +230,37 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, |
|
|
|
break; |
|
|
|
break; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
default: |
|
|
|
default: |
|
|
|
show_boot_error(80); |
|
|
|
show_boot_error(BOOTSTAGE_ID_NET_START); |
|
|
|
return CMD_RET_USAGE; |
|
|
|
return CMD_RET_USAGE; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
show_boot_progress(BOOTSTAGE_ID_NET_START); |
|
|
|
|
|
|
|
|
|
|
|
show_boot_progress(80); |
|
|
|
|
|
|
|
if ((size = NetLoop(proto)) < 0) { |
|
|
|
if ((size = NetLoop(proto)) < 0) { |
|
|
|
show_boot_error(81); |
|
|
|
show_boot_error(BOOTSTAGE_ID_NET_NETLOOP_OK); |
|
|
|
return 1; |
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
show_boot_progress(BOOTSTAGE_ID_NET_NETLOOP_OK); |
|
|
|
|
|
|
|
|
|
|
|
show_boot_progress(81); |
|
|
|
|
|
|
|
/* NetLoop ok, update environment */ |
|
|
|
/* NetLoop ok, update environment */ |
|
|
|
netboot_update_env(); |
|
|
|
netboot_update_env(); |
|
|
|
|
|
|
|
|
|
|
|
/* done if no file was loaded (no errors though) */ |
|
|
|
/* done if no file was loaded (no errors though) */ |
|
|
|
if (size == 0) { |
|
|
|
if (size == 0) { |
|
|
|
show_boot_error(82); |
|
|
|
show_boot_error(BOOTSTAGE_ID_NET_LOADED); |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* flush cache */ |
|
|
|
/* flush cache */ |
|
|
|
flush_cache(load_addr, size); |
|
|
|
flush_cache(load_addr, size); |
|
|
|
|
|
|
|
|
|
|
|
show_boot_progress(82); |
|
|
|
show_boot_progress(BOOTSTAGE_ID_NET_LOADED); |
|
|
|
|
|
|
|
|
|
|
|
rcode = bootm_maybe_autostart(cmdtp, argv[0]); |
|
|
|
rcode = bootm_maybe_autostart(cmdtp, argv[0]); |
|
|
|
|
|
|
|
|
|
|
|
if (rcode < 0) |
|
|
|
if (rcode < 0) |
|
|
|
show_boot_error(83); |
|
|
|
show_boot_error(BOOTSTAGE_ID_NET_DONE_ERR); |
|
|
|
else |
|
|
|
else |
|
|
|
show_boot_progress(84); |
|
|
|
show_boot_progress(BOOTSTAGE_ID_NET_DONE); |
|
|
|
return rcode; |
|
|
|
return rcode; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|