* Next step: none
*/
-
#include <bootstage.h>
#include <command.h>
#include <console.h>
#include <env_internal.h>
#include <errno.h>
#include <image.h>
+#include <led.h>
#include <log.h>
#include <net.h>
#include <net6.h>
*/
void net_auto_load(void)
{
-#if defined(CONFIG_CMD_NFS) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_CMD_NFS) && !defined(CONFIG_XPL_BUILD)
const char *s = env_get("autoload");
if (s != NULL && strcmp(s, "NFS") == 0) {
net_set_state(NETLOOP_SUCCESS);
return;
}
- if (net_check_prereq(TFTPGET)) {
-/* We aren't expecting to get a serverip, so just accept the assigned IP */
- if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) {
- net_set_state(NETLOOP_SUCCESS);
- } else {
- printf("Cannot autoload with TFTPGET\n");
- net_set_state(NETLOOP_FAIL);
+ if (IS_ENABLED(CONFIG_CMD_TFTPBOOT)) {
+ if (net_check_prereq(TFTPGET)) {
+ /*
+ * We aren't expecting to get a serverip, so just
+ * accept the assigned IP
+ */
+ if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) {
+ net_set_state(NETLOOP_SUCCESS);
+ } else {
+ printf("Cannot autoload with TFTPGET\n");
+ net_set_state(NETLOOP_FAIL);
+ }
+ return;
}
- return;
+ tftp_start(TFTPGET);
}
- tftp_start(TFTPGET);
}
static int net_init_loop(void)
ping6_start();
break;
#endif
-#if defined(CONFIG_CMD_NFS) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_CMD_NFS) && !defined(CONFIG_XPL_BUILD)
case NFS:
nfs_start();
break;
cdp_start();
break;
#endif
-#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_XPL_BUILD)
case NETCONS:
nc_start();
break;
/* Invalidate the last protocol */
eth_set_last_protocol(BOOTP);
+ /* Turn off activity LED if triggered */
+ led_activity_off();
+
puts("\nAbort\n");
/* include a debug print as well incase the debug
messages are directed to stderr */
}
}
-#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_XPL_BUILD)
nc_input_packet((uchar *)ip + IP_UDP_HDR_SIZE,
src_ip,
ntohs(ip->udp_dst),
ip->udp_xsum = 0;
}
-void copy_filename(char *dst, const char *src, int size)
-{
- if (src && *src && (*src == '"')) {
- ++src;
- --size;
- }
-
- while ((--size > 0) && src && *src && (*src != '"'))
- *dst++ = *src++;
- *dst = '\0';
-}
-
int is_serverip_in_cmd(void)
{
return !!strchr(net_boot_file_name, ':');