From d1b226b7d403b29c1064318097d972ce804e96e7 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 14 Jun 2018 09:08:44 +0200 Subject: [PATCH 1/8] net: zynq_gem: Initialize val variable in zynq_gem_miiphy_read() phyread can timeout and val will contain random value. Initialize it to zero not to report random value in case of error. Signed-off-by: Michal Simek Acked-by: Joe Hershberger --- drivers/net/zynq_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index a817f2e5d6..d1138fe090 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -609,7 +609,7 @@ static int zynq_gem_miiphy_read(struct mii_dev *bus, int addr, { struct zynq_gem_priv *priv = bus->priv; int ret; - u16 val; + u16 val = 0; ret = phyread(priv, addr, reg, &val); debug("%s 0x%x, 0x%x, 0x%x, 0x%x\n", __func__, addr, reg, val, ret); From 6dc73df73b2b95ec171d82558c2a0ed1437d8c0a Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Fri, 15 Jun 2018 05:06:00 +0000 Subject: [PATCH 2/8] net: fastboot: Fix build when FASTBOOT_FLASH is disabled When building without FASTBOOT_FLASH we don't include the intermediate update callback to keep the client alive, so ensure we don't try setting it here. Signed-off-by: Alex Kiernan Acked-by: Joe Hershberger --- net/fastboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/fastboot.c b/net/fastboot.c index a9f7c0743d..8afc5529cd 100644 --- a/net/fastboot.c +++ b/net/fastboot.c @@ -309,7 +309,9 @@ void fastboot_start_server(void) fastboot_our_port = WELL_KNOWN_PORT; +#if CONFIG_IS_ENABLED(FASTBOOT_FLASH) fastboot_set_progress_callback(fastboot_timed_send_info); +#endif net_set_udp_handler(fastboot_handler); /* zero out server ether in case the server ip has changed */ From 0f8888b763fdc24e506b538ab521848e0566f9ca Mon Sep 17 00:00:00 2001 From: Rabeeh Khoury Date: Tue, 19 Jun 2018 21:36:50 +0300 Subject: [PATCH 3/8] net: mvneta: dcache flush TX descriptors at init This fixes sporadic timeout on initial packet Tx (usually ARP), with an error message like: timeout: packet not sent Reviewed-by: Stefan Roese Tested-by: Chris Packham Acked-by: Joe Hershberger Signed-off-by: Rabeeh Khoury Signed-off-by: Baruch Siach --- drivers/net/mvneta.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 45e5eda955..254dd04697 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -1702,6 +1702,7 @@ static int mvneta_probe(struct udevice *dev) /* Align buffer area for descs and rx_buffers to 1MiB */ bd_space = memalign(1 << MMU_SECTION_SHIFT, BD_SPACE); + flush_dcache_range((ulong)bd_space, (ulong)bd_space + BD_SPACE); mmu_set_region_dcache_behaviour((phys_addr_t)bd_space, BD_SPACE, DCACHE_OFF); buffer_loc.tx_descs = (struct mvneta_tx_desc *)bd_space; From 318b5d76b6661dcaf6934b0a925bbcfdf0469069 Mon Sep 17 00:00:00 2001 From: Rabeeh Khoury Date: Tue, 19 Jun 2018 21:36:51 +0300 Subject: [PATCH 4/8] net: mvneta: zero Tx descriptors on init Make the initialization sequence consistent with the Linux kernel driver. Reviewed-by: Stefan Roese Acked-by: Joe Hershberger Signed-off-by: Rabeeh Khoury Signed-off-by: Baruch Siach --- drivers/net/mvneta.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c index 254dd04697..ab697b9bc7 100644 --- a/drivers/net/mvneta.c +++ b/drivers/net/mvneta.c @@ -1708,6 +1708,7 @@ static int mvneta_probe(struct udevice *dev) buffer_loc.tx_descs = (struct mvneta_tx_desc *)bd_space; size = roundup(MVNETA_MAX_TXD * sizeof(struct mvneta_tx_desc), ARCH_DMA_MINALIGN); + memset(buffer_loc.tx_descs, 0, size); buffer_loc.rx_descs = (struct mvneta_rx_desc *) ((phys_addr_t)bd_space + size); size += roundup(MVNETA_MAX_RXD * sizeof(struct mvneta_rx_desc), From d8970dae276377a0beff1c3e9d8b6f805ecf5cd5 Mon Sep 17 00:00:00 2001 From: Lothar Felten Date: Fri, 22 Jun 2018 22:29:54 +0200 Subject: [PATCH 5/8] net: Add new wol command - Wake on LAN Add a new command 'wol': Wait for an incoming Wake-on-LAN packet or time out if no WoL packed is received. If the WoL packet contains a password, it is saved in the environment variable 'wolpassword' using the etherwake format (dot or colon separated decimals). Intended use case: a networked device should boot an alternate image. It's attached to a network on a client site, modifying the DHCP server configuration or setup of a tftp server is not allowed. After power on the device waits a few seconds for a WoL packet. If a packet is received, the device boots the alternate image. Otherwise it boots the default image. This method is a simple way to interact with a system via network even if only the MAC address is known. Tools to send WoL packets are available on all common platforms. Some Ethernet drivers seem to pad the incoming packet. The additional padding bytes might be recognized as Wake-on-LAN password bytes. By default enabled in pengwyn_defconfig. Signed-off-by: Lothar Felten Acked-by: Joe Hershberger --- cmd/Kconfig | 5 ++ cmd/Makefile | 1 + cmd/wol.c | 33 ++++++++++++++ configs/pengwyn_defconfig | 1 + include/net.h | 3 +- net/Makefile | 1 + net/net.c | 19 ++++++++ net/wol.c | 96 +++++++++++++++++++++++++++++++++++++++ net/wol.h | 65 ++++++++++++++++++++++++++ 9 files changed, 223 insertions(+), 1 deletion(-) create mode 100644 cmd/wol.c create mode 100644 net/wol.c create mode 100644 net/wol.h diff --git a/cmd/Kconfig b/cmd/Kconfig index 45c83359ad..bbf9fc9113 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1239,6 +1239,11 @@ config CMD_PXE help Boot image via network using PXE protocol +config CMD_WOL + bool "wol" + help + Wait for wake-on-lan Magic Packet + endif menu "Misc commands" diff --git a/cmd/Makefile b/cmd/Makefile index 13cf7bf6c2..323f1fd2c7 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -100,6 +100,7 @@ obj-$(CONFIG_CMD_PCI) += pci.o endif obj-y += pcmcia.o obj-$(CONFIG_CMD_PXE) += pxe.o +obj-$(CONFIG_CMD_WOL) += wol.o obj-$(CONFIG_CMD_QFW) += qfw.o obj-$(CONFIG_CMD_READ) += read.o obj-$(CONFIG_CMD_REGINFO) += reginfo.o diff --git a/cmd/wol.c b/cmd/wol.c new file mode 100644 index 0000000000..8a756f373c --- /dev/null +++ b/cmd/wol.c @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2018 + * Lothar Felte, lothar.felten@gmail.com + */ + +/* + * Wake-on-LAN support + */ +#include +#include +#include + +#if defined(CONFIG_CMD_WOL) +void wol_set_timeout(ulong); + +int do_wol(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + /* Validate arguments */ + if (argc < 2) + return CMD_RET_USAGE; + wol_set_timeout(simple_strtol(argv[1], NULL, 10) * 1000); + if (net_loop(WOL) < 0) + return CMD_RET_FAILURE; + return CMD_RET_SUCCESS; +} + +U_BOOT_CMD( + wol, 2, 1, do_wol, + "wait for an incoming wake-on-lan packet", + "Timeout" +); +#endif diff --git a/configs/pengwyn_defconfig b/configs/pengwyn_defconfig index 0ee8e6e1b9..76b5715a99 100644 --- a/configs/pengwyn_defconfig +++ b/configs/pengwyn_defconfig @@ -37,6 +37,7 @@ CONFIG_CMD_MMC=y CONFIG_CMD_NAND=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y +CONFIG_CMD_WOL=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_MTDPARTS=y diff --git a/include/net.h b/include/net.h index 5760685556..9c7199aca9 100644 --- a/include/net.h +++ b/include/net.h @@ -344,6 +344,7 @@ struct vlan_ethernet_hdr { #define PROT_IP 0x0800 /* IP protocol */ #define PROT_ARP 0x0806 /* IP ARP protocol */ +#define PROT_WOL 0x0842 /* ether-wake WoL protocol */ #define PROT_RARP 0x8035 /* IP ARP protocol */ #define PROT_VLAN 0x8100 /* IEEE 802.1q protocol */ #define PROT_IPV6 0x86dd /* IPv6 over bluebook */ @@ -535,7 +536,7 @@ extern int net_restart_wrap; /* Tried all network devices */ enum proto_t { BOOTP, RARP, ARP, TFTPGET, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP, - TFTPSRV, TFTPPUT, LINKLOCAL, FASTBOOT + TFTPSRV, TFTPPUT, LINKLOCAL, FASTBOOT, WOL }; extern char net_boot_file_name[1024];/* Boot File name */ diff --git a/net/Makefile b/net/Makefile index 07466879f5..ce36362168 100644 --- a/net/Makefile +++ b/net/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_CMD_RARP) += rarp.o obj-$(CONFIG_CMD_SNTP) += sntp.o obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o obj-$(CONFIG_UDP_FUNCTION_FASTBOOT) += fastboot.o +obj-$(CONFIG_CMD_WOL) += wol.o # Disable this warning as it is triggered by: # sprintf(buf, index ? "foo%d" : "foo", index) diff --git a/net/net.c b/net/net.c index b4563a4cab..084269e31e 100644 --- a/net/net.c +++ b/net/net.c @@ -78,6 +78,12 @@ * - own IP address * We want: - network time * Next step: none + * + * WOL: + * + * Prerequisites: - own ethernet address + * We want: - magic packet or timeout + * Next step: none */ @@ -108,6 +114,9 @@ #if defined(CONFIG_CMD_SNTP) #include "sntp.h" #endif +#if defined(CONFIG_CMD_WOL) +#include "wol.h" +#endif /** BOOTP EXTENTIONS **/ @@ -514,6 +523,11 @@ restart: case LINKLOCAL: link_local_start(); break; +#endif +#if defined(CONFIG_CMD_WOL) + case WOL: + wol_start(); + break; #endif default: break; @@ -1281,6 +1295,11 @@ void net_process_received_packet(uchar *in_packet, int len) ntohs(ip->udp_src), ntohs(ip->udp_len) - UDP_HDR_SIZE); break; +#ifdef CONFIG_CMD_WOL + case PROT_WOL: + wol_receive(ip, len); + break; +#endif } } diff --git a/net/wol.c b/net/wol.c new file mode 100644 index 0000000000..946bd91b47 --- /dev/null +++ b/net/wol.c @@ -0,0 +1,96 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2018 Lothar Felten, lothar.felten@gmail.com + */ + +#include +#include +#include +#include +#include "wol.h" + +static ulong wol_timeout = WOL_DEFAULT_TIMEOUT; + +/* + * Check incoming Wake-on-LAN packet for: + * - sync bytes + * - sixteen copies of the target MAC address + * + * @param wol Wake-on-LAN packet + * @param len Packet length + */ +static int wol_check_magic(struct wol_hdr *wol, unsigned int len) +{ + int i; + + if (len < sizeof(struct wol_hdr)) + return 0; + + for (i = 0; i < WOL_SYNC_COUNT; i++) + if (wol->wol_sync[i] != WOL_SYNC_BYTE) + return 0; + + for (i = 0; i < WOL_MAC_REPETITIONS; i++) + if (memcmp(&wol->wol_dest[i * ARP_HLEN], + net_ethaddr, ARP_HLEN) != 0) + return 0; + + return 1; +} + +void wol_receive(struct ip_udp_hdr *ip, unsigned int len) +{ + struct wol_hdr *wol; + + wol = (struct wol_hdr *)ip; + + if (!wol_check_magic(wol, len)) + return; + + /* save the optional password using the ether-wake formats */ + /* don't check for exact length, the packet might have padding */ + if (len >= (sizeof(struct wol_hdr) + WOL_PASSWORD_6B)) { + eth_env_set_enetaddr("wolpassword", wol->wol_passwd); + } else if (len >= (sizeof(struct wol_hdr) + WOL_PASSWORD_4B)) { + char buffer[16]; + struct in_addr *ip = (struct in_addr *)(wol->wol_passwd); + + ip_to_string(*ip, buffer); + env_set("wolpassword", buffer); + } + net_set_state(NETLOOP_SUCCESS); +} + +static void wol_udp_handler(uchar *pkt, unsigned int dest, struct in_addr sip, + unsigned int src, unsigned int len) +{ + struct wol_hdr *wol; + + wol = (struct wol_hdr *)pkt; + + /* UDP destination port must be 0, 7 or 9 */ + if (dest != 0 && dest != 7 && dest != 9) + return; + + if (!wol_check_magic(wol, len)) + return; + + net_set_state(NETLOOP_SUCCESS); +} + +void wol_set_timeout(ulong timeout) +{ + wol_timeout = timeout; +} + +static void wol_timeout_handler(void) +{ + eth_halt(); + net_set_state(NETLOOP_FAIL); +} + +void wol_start(void) +{ + net_set_timeout_handler(wol_timeout, wol_timeout_handler); + net_set_udp_handler(wol_udp_handler); +} diff --git a/net/wol.h b/net/wol.h new file mode 100644 index 0000000000..ebc81f24b6 --- /dev/null +++ b/net/wol.h @@ -0,0 +1,65 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * wol - Wake-on-LAN + * + * Supports both Wake-on-LAN packet types: + * - EtherType 0x0842 packets + * - UDP packets on ports 0, 7 and 9. + * + * Copyright 2018 Lothar Felten, lothar.felten@gmail.com + */ + +#if defined(CONFIG_CMD_WOL) + +#ifndef __WOL_H__ +#define __WOL_H__ + +#include + +/**********************************************************************/ + +#define WOL_SYNC_BYTE 0xFF +#define WOL_SYNC_COUNT 6 +#define WOL_MAC_REPETITIONS 16 +#define WOL_DEFAULT_TIMEOUT 5000 +#define WOL_PASSWORD_4B 4 +#define WOL_PASSWORD_6B 6 + +/* + * Wake-on-LAN header + */ +struct wol_hdr { + u8 wol_sync[WOL_SYNC_COUNT]; /* sync bytes */ + u8 wol_dest[WOL_MAC_REPETITIONS * ARP_HLEN]; /* 16x MAC */ + u8 wol_passwd[0]; /* optional */ +}; + +/* + * Initialize wol (beginning of netloop) + */ +void wol_start(void); + +/* + * Check incoming Wake-on-LAN packet for: + * - sync bytes + * - sixteen copies of the target MAC address + * + * Optionally store the four or six byte password in the environment + * variable "wolpassword" + * + * @param ip IP header in the packet + * @param len Packet length + */ +void wol_receive(struct ip_udp_hdr *ip, unsigned int len); + +/* + * Set the timeout for the reception of a Wake-on-LAN packet + * + * @param timeout in milliseconds + */ +void wol_set_timeout(ulong timeout); + +/**********************************************************************/ + +#endif /* __WOL_H__ */ +#endif From 449312c1c0c686ad28c51e6429d8bbdd13812b10 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 15 Jun 2018 10:29:27 +0200 Subject: [PATCH 6/8] net: Prefer command line arguments We can call commands like dhcp and bootp without arguments or with explicit command line arguments that really should tell the code where to look for files instead. Unfortunately, the current code simply overwrites command line arguments in the dhcp case with dhcp values. This patch allows the code to preserve the command line values if they were set on the command line. That way the semantics are slightly more intuitive. The reason this patch does that by introducing a new variable is that we can not rely on net_boot_file_name[0] being unset, as today it's completely legal to call "dhcp" and afterwards run "tftp" and expect the latter to repeat the same query as before. I would prefer not to break that behavior in case anyone relies on it. Signed-off-by: Alexander Graf Acked-by: Joe Hershberger --- cmd/net.c | 10 ++++++++-- include/net.h | 2 ++ net/bootp.c | 14 +++++++++----- net/net.c | 2 ++ 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/cmd/net.c b/cmd/net.c index f83839c35e..eca6dd8918 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -183,6 +183,8 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, int size; ulong addr; + net_boot_file_name_explicit = false; + /* pre-set load_addr */ s = env_get("loadaddr"); if (s != NULL) @@ -199,15 +201,18 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, * mis-interpreted as a valid number. */ addr = simple_strtoul(argv[1], &end, 16); - if (end == (argv[1] + strlen(argv[1]))) + if (end == (argv[1] + strlen(argv[1]))) { load_addr = addr; - else + } else { + net_boot_file_name_explicit = true; copy_filename(net_boot_file_name, argv[1], sizeof(net_boot_file_name)); + } break; case 3: load_addr = simple_strtoul(argv[1], NULL, 16); + net_boot_file_name_explicit = true; copy_filename(net_boot_file_name, argv[2], sizeof(net_boot_file_name)); @@ -220,6 +225,7 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc, printf("Invalid address/size\n"); return CMD_RET_USAGE; } + net_boot_file_name_explicit = true; copy_filename(net_boot_file_name, argv[3], sizeof(net_boot_file_name)); break; diff --git a/include/net.h b/include/net.h index 9c7199aca9..f9984ae86c 100644 --- a/include/net.h +++ b/include/net.h @@ -540,6 +540,8 @@ enum proto_t { }; extern char net_boot_file_name[1024];/* Boot File name */ +/* Indicates whether the file name was specified on the command line */ +extern bool net_boot_file_name_explicit; /* The actual transferred size of the bootfile (in bytes) */ extern u32 net_boot_file_size; /* Boot file size in blocks as reported by the DHCP server */ diff --git a/net/bootp.c b/net/bootp.c index 9d7cb5d30c..fdcb4374a0 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -157,7 +157,8 @@ static void store_net_params(struct bootp_hdr *bp) #if defined(CONFIG_CMD_DHCP) !(dhcp_option_overload & OVERLOAD_FILE) && #endif - (strlen(bp->bp_file) > 0)) { + (strlen(bp->bp_file) > 0) && + !net_boot_file_name_explicit) { copy_filename(net_boot_file_name, bp->bp_file, sizeof(net_boot_file_name)); } @@ -889,10 +890,13 @@ static void dhcp_process_options(uchar *popt, uchar *end) case 66: /* Ignore TFTP server name */ break; case 67: /* Bootfile option */ - size = truncate_sz("Bootfile", - sizeof(net_boot_file_name), oplen); - memcpy(&net_boot_file_name, popt + 2, size); - net_boot_file_name[size] = 0; + if (!net_boot_file_name_explicit) { + size = truncate_sz("Bootfile", + sizeof(net_boot_file_name), + oplen); + memcpy(&net_boot_file_name, popt + 2, size); + net_boot_file_name[size] = 0; + } break; default: #if defined(CONFIG_BOOTP_VENDOREX) diff --git a/net/net.c b/net/net.c index 084269e31e..f35695b4fc 100644 --- a/net/net.c +++ b/net/net.c @@ -174,6 +174,8 @@ ushort net_native_vlan = 0xFFFF; /* Boot File name */ char net_boot_file_name[1024]; +/* Indicates whether the file name was specified on the command line */ +bool net_boot_file_name_explicit; /* The actual transferred size of the bootfile (in bytes) */ u32 net_boot_file_size; /* Boot file size in blocks as reported by the DHCP server */ From bdce340cc6a17efe1d980eda378c3b1984059362 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 15 Jun 2018 10:29:28 +0200 Subject: [PATCH 7/8] net: Add option to prefer bootp/dhcp serverip Currently we can choose between 2 different types of behavior for the serverip variable: 1) Always overwrite it with the DHCP server IP address (default) 2) Ignore what the DHCP server says (CONFIG_BOOTP_SERVERIP) This patch adds a 3rd option: 3) Use serverip from DHCP if no serverip is given (CONFIG_BOOTP_PREFER_SERVERIP) With this new option, we can have the default case that a boot file gets loaded from the DHCP provided TFTP server work while allowing users to specify their own serverip variable to explicitly use a different tftp server. Signed-off-by: Alexander Graf Acked-by: Joe Hershberger --- cmd/Kconfig | 10 ++++++++++ net/bootp.c | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index bbf9fc9113..aec209006d 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1121,6 +1121,16 @@ config BOOTP_HOSTNAME help The name may or may not be qualified with the local domain name. +config BOOTP_PREFER_SERVERIP + bool "serverip variable takes precedent over DHCP server IP." + depends on CMD_BOOTP + help + By default a BOOTP/DHCP reply will overwrite the 'serverip' variable. + + With this option enabled, the 'serverip' variable in the environment + takes precedence over DHCP server IP and will only be set by the DHCP + server if not already set in the environment. + config BOOTP_SUBNETMASK bool "Request & store 'netmask' from BOOTP/DHCP server" default y diff --git a/net/bootp.c b/net/bootp.c index fdcb4374a0..9a2b512e4a 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -147,9 +147,14 @@ static void store_net_params(struct bootp_hdr *bp) { #if !defined(CONFIG_BOOTP_SERVERIP) struct in_addr tmp_ip; + bool overwrite_serverip = true; + +#if defined(CONFIG_BOOTP_PREFER_SERVERIP) + overwrite_serverip = false; +#endif net_copy_ip(&tmp_ip, &bp->bp_siaddr); - if (tmp_ip.s_addr != 0) + if (tmp_ip.s_addr != 0 && (overwrite_serverip || !net_server_ip.s_addr)) net_copy_ip(&net_server_ip, &bp->bp_siaddr); memcpy(net_server_ethaddr, ((struct ethernet_hdr *)net_rx_packet)->et_src, 6); From a9ea30d267f26bee0b3a5cdd659624a866da3d19 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 15 Jun 2018 10:29:29 +0200 Subject: [PATCH 8/8] ax25: Switch to CONFIG_BOOTP_PREFER_SERVERIP The ax25-ae350 target currently uses CONFIG_BOOTP_SERVERIP which means we ignore the DHCP provided TFTP ip address. This breaks every case where we do now provide a serverip environment variable. Instead, let's use the new CONFIG_BOOT_PREFER_SERVERIP option to fall back to the DHCP provided TFTP IP if no serverip environment variable is set. Signed-off-by: Alexander Graf Acked-by: Joe Hershberger Acked-by: Rick Chen --- configs/ax25-ae350_defconfig | 1 + include/configs/ax25-ae350.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/ax25-ae350_defconfig b/configs/ax25-ae350_defconfig index fc04c87485..a328555af6 100644 --- a/configs/ax25-ae350_defconfig +++ b/configs/ax25-ae350_defconfig @@ -40,3 +40,4 @@ CONFIG_DM_SPI=y CONFIG_ATCSPI200_SPI=y CONFIG_TIMER=y CONFIG_ATCPIT100_TIMER=y +CONFIG_BOOTP_PREFER_SERVERIP=y diff --git a/include/configs/ax25-ae350.h b/include/configs/ax25-ae350.h index b1ca5ac11a..b230896734 100644 --- a/include/configs/ax25-ae350.h +++ b/include/configs/ax25-ae350.h @@ -11,7 +11,6 @@ * CPU and Board Configuration Options */ #define CONFIG_BOOTP_SEND_HOSTNAME -#define CONFIG_BOOTP_SERVERIP /* * Miscellaneous configurable options