mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-17 22:28:17 +01:00
Convert CONFIG_KEEP_SERVERADDR to Kconfig
This converts the following to Kconfig: CONFIG_KEEP_SERVERADDR Drop the preprocessor usage also. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
2d7a463e82
commit
3df6cd4d63
5
README
5
README
@ -1138,11 +1138,6 @@ The following options need to be configured:
|
|||||||
server to contact when using the "tftboot" command.
|
server to contact when using the "tftboot" command.
|
||||||
(Environment variable "serverip")
|
(Environment variable "serverip")
|
||||||
|
|
||||||
CONFIG_KEEP_SERVERADDR
|
|
||||||
|
|
||||||
Keeps the server's MAC address, in the env 'serveraddr'
|
|
||||||
for passing to bootargs (like Linux's netconsole option)
|
|
||||||
|
|
||||||
- Gateway IP address:
|
- Gateway IP address:
|
||||||
CONFIG_GATEWAYIP
|
CONFIG_GATEWAYIP
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
|
#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
|
||||||
115200}
|
115200}
|
||||||
|
|
||||||
#define CONFIG_KEEP_SERVERADDR
|
|
||||||
#define CONFIG_UDP_CHECKSUM
|
#define CONFIG_UDP_CHECKSUM
|
||||||
#define CONFIG_TIMESTAMP
|
#define CONFIG_TIMESTAMP
|
||||||
#define CONFIG_BOOTP_SERVERIP
|
#define CONFIG_BOOTP_SERVERIP
|
||||||
|
@ -99,4 +99,13 @@ config SERVERIP_FROM_PROXYDHCP_DELAY_MS
|
|||||||
receiving response from main DHCP server. Has no effect if
|
receiving response from main DHCP server. Has no effect if
|
||||||
SERVERIP_FROM_PROXYDHCP is false.
|
SERVERIP_FROM_PROXYDHCP is false.
|
||||||
|
|
||||||
|
config KEEP_SERVERADDR
|
||||||
|
bool "Write the server's MAC address to 'serveraddr'"
|
||||||
|
default y if SANDBOX
|
||||||
|
help
|
||||||
|
Keeps the server's MAC address, in the env 'serveraddr'
|
||||||
|
for passing to bootargs (like Linux's netconsole option). If this is
|
||||||
|
enabled, when an ARP reply is received, the server's IP address is
|
||||||
|
written there.
|
||||||
|
|
||||||
endif # if NET
|
endif # if NET
|
||||||
|
@ -196,13 +196,12 @@ void arp_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
|
|||||||
if (!arp_is_waiting())
|
if (!arp_is_waiting())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef CONFIG_KEEP_SERVERADDR
|
if (IS_ENABLED(CONFIG_KEEP_SERVERADDR) &&
|
||||||
if (net_server_ip.s_addr == net_arp_wait_packet_ip.s_addr) {
|
net_server_ip.s_addr == net_arp_wait_packet_ip.s_addr) {
|
||||||
char buf[20];
|
char buf[20];
|
||||||
sprintf(buf, "%pM", &arp->ar_sha);
|
sprintf(buf, "%pM", &arp->ar_sha);
|
||||||
env_set("serveraddr", buf);
|
env_set("serveraddr", buf);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
reply_ip_addr = net_read_ip(&arp->ar_spa);
|
reply_ip_addr = net_read_ip(&arp->ar_spa);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user