case BOOTSTAGE_ID_RUN_OS: /* booting Linux */
set_leds(BOTH_LEDS, NEITHER_LED);
break;
- case 64: /* Ethernet initialization */
+ case BOOTSTAGE_ID_NET_ETH_START: /* Ethernet initialization */
set_leds(GREEN_LED, GREEN_LED);
break;
default:
case BOOTSTAGE_ID_START: /* FPGA ok */
setbits_be32(&gpio->simple_dvo, LED_G0);
break;
- case 65:
+ case BOOTSTAGE_ID_NET_ETH_INIT:
setbits_be32(&gpio->simple_dvo, LED_G1);
break;
case BOOTSTAGE_ID_COPY_RAMDISK:
status_led_set(2, STATUS_LED_ON);
break;
#if 0
- case 64:
- /* starting Ethernet configuration */
- status_led_set (0, STATUS_LED_OFF);
- status_led_set (1, STATUS_LED_OFF);
- status_led_set (2, STATUS_LED_ON);
- break;
+ case BOOTSTAGE_ID_NET_ETH_START:
+ /* starting Ethernet configuration */
+ status_led_set(0, STATUS_LED_OFF);
+ status_led_set(1, STATUS_LED_OFF);
+ status_led_set(2, STATUS_LED_ON);
+ break;
#endif
- case 80:
- /* loading Image */
- status_led_set (0, STATUS_LED_ON);
- status_led_set (1, STATUS_LED_OFF);
- status_led_set (2, STATUS_LED_ON);
- break;
+ case BOOTSTAGE_ID_NET_START:
+ /* loading Image */
+ status_led_set(0, STATUS_LED_ON);
+ status_led_set(1, STATUS_LED_OFF);
+ status_led_set(2, STATUS_LED_ON);
+ break;
}
}
#endif
break;
#endif
default:
- show_boot_error(80);
+ show_boot_error(BOOTSTAGE_ID_NET_START);
return CMD_RET_USAGE;
}
+ show_boot_progress(BOOTSTAGE_ID_NET_START);
- show_boot_progress(80);
if ((size = NetLoop(proto)) < 0) {
- show_boot_error(81);
+ show_boot_error(BOOTSTAGE_ID_NET_NETLOOP_OK);
return 1;
}
+ show_boot_progress(BOOTSTAGE_ID_NET_NETLOOP_OK);
- show_boot_progress(81);
/* NetLoop ok, update environment */
netboot_update_env();
/* done if no file was loaded (no errors though) */
if (size == 0) {
- show_boot_error(82);
+ show_boot_error(BOOTSTAGE_ID_NET_LOADED);
return 0;
}
/* flush cache */
flush_cache(load_addr, size);
- show_boot_progress(82);
+ show_boot_progress(BOOTSTAGE_ID_NET_LOADED);
+
rcode = bootm_maybe_autostart(cmdtp, argv[0]);
if (rcode < 0)
- show_boot_error(83);
+ show_boot_error(BOOTSTAGE_ID_NET_DONE_ERR);
else
- show_boot_progress(84);
+ show_boot_progress(BOOTSTAGE_ID_NET_DONE);
return rcode;
}
#if defined(CONFIG_ENV_IS_NOWHERE) /* Environment not changable */
set_default_env(NULL);
#else
- show_boot_error(60);
+ show_boot_error(BOOTSTAGE_ID_NET_CHECKSUM);
set_default_env("!bad CRC");
#endif
} else {
BOOTSTAGE_ID_NAND_TYPE = 57,
BOOTSTAGE_ID_NAND_READ,
+ /* Boot stages related to loading a kernel from an network device */
+ BOOTSTAGE_ID_NET_CHECKSUM = 60,
+ BOOTSTAGE_ID_NET_ETH_START = 64,
+ BOOTSTAGE_ID_NET_ETH_INIT,
+
+ BOOTSTAGE_ID_NET_START = 80,
+ BOOTSTAGE_ID_NET_NETLOOP_OK,
+ BOOTSTAGE_ID_NET_LOADED,
+ BOOTSTAGE_ID_NET_DONE_ERR,
+ BOOTSTAGE_ID_NET_DONE,
+
BOOTSTAGE_ID_IDE_FIT_READ = 140,
BOOTSTAGE_ID_IDE_FIT_READ_OK,
eth_devices = NULL;
eth_current = NULL;
- show_boot_progress (64);
+ show_boot_progress(BOOTSTAGE_ID_NET_ETH_START);
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
miiphy_init();
#endif
if (!eth_devices) {
puts ("No ethernet found.\n");
- show_boot_error(64);
+ show_boot_error(BOOTSTAGE_ID_NET_ETH_START);
} else {
struct eth_device *dev = eth_devices;
char *ethprime = getenv ("ethprime");
- show_boot_progress (65);
+ show_boot_progress(BOOTSTAGE_ID_NET_ETH_INIT);
do {
if (dev->index)
puts (", ");