From 237ef6e528310bfffcf1d499f90c40f27e3582cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Fri, 12 Jun 2015 13:15:19 +0200 Subject: [PATCH] kconfig: add Kconfig options for CONFIG_BOOTP_* settings --- common/Kconfig | 77 ++++++++++++++++++++++++++++++++++++++++++ include/configs/tx28.h | 5 --- include/configs/tx48.h | 5 --- include/configs/tx51.h | 4 --- include/configs/tx53.h | 4 --- 5 files changed, 77 insertions(+), 18 deletions(-) diff --git a/common/Kconfig b/common/Kconfig index 1f361555dc..dfc581bd14 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -295,6 +295,83 @@ config CMD_DHCP help Boot image via network using DHCP/TFTP protocol +if CMD_DHCP + +menu "DHCP options" + +config BOOTP_BOOTFILESIZE + bool "obtain bootfile size from DHCP" + +config BOOTP_BOOTPATH + bool "obtain bootfile path from DHCP" + +config BOOTP_DNS + bool "obtain DNS server IP address from DHCP" + +config BOOTP_DNS2 + bool "store secondary DNS IP address in dnsip2" + +config BOOTP_GATEWAY + bool "obtain gateway IP address from DHCP" + +config BOOTP_ID_CACHE_SIZE + int "DHCP transaction ID cache size" + default 4 + help + BOOTP packets are uniquely identified using a 32-bit ID. The + server will copy the ID from client requests to responses and + U-Boot will use this to determine if it is the destination of + an incoming response. Some servers will check that addresses + aren't in use before handing them out (usually using an ARP + ping) and therefore take up to a few hundred milliseconds to + respond. Network congestion may also influence the time it + takes for a response to make it back to the client. If that + time is too long, U-Boot will retransmit requests. In order + to allow earlier responses to still be accepted after these + retransmissions, U-Boot's BOOTP client keeps a small cache of + IDs. The CONFIG_BOOTP_ID_CACHE_SIZE controls the size of this + cache. The default is to keep IDs for up to four outstanding + requests. Increasing this will allow U-Boot to accept offers + from a BOOTP client in networks with unusually high latency. + +config BOOTP_MAY_FAIL + bool "Do not start over, if DHCP server is not available" + help + If the DHCP server is not found after the configured retry + count, the call will fail instead of starting over. This + can be used to fail over to Link-local IP address + configuration if the DHCP server is not available. + +config BOOTP_NISDOMAIN + bool "obtain NIS domain from DHCP" + +config BOOTP_NTPSERVER + bool "obtain NTP server IP address from DHCP" + +config BOOTP_RANDOM_DELAY + bool "Use a (pseudo) random delay between DHCP retries" + select LIB_RAND + +config BOOTP_RANDOM_ID + bool "Generate a (pseudo) random transaction ID" + select LIB_RAND + +config BOOTP_SEND_HOSTNAME + bool "send hostname in DHCP request" + +config BOOTP_SUBNETMASK + bool "obtain subnet mask from DHCP" + +config BOOTP_TIMEOFFSET + bool "obtain from DHCP" + +config BOOTP_VENDOREX + bool "obtain from DHCP" + +endmenu + +endif + config CMD_NFS bool "nfs" help diff --git a/include/configs/tx28.h b/include/configs/tx28.h index a8e4df1ffc..fcc9120cdb 100644 --- a/include/configs/tx28.h +++ b/include/configs/tx28.h @@ -189,11 +189,6 @@ #endif #define CONFIG_FEC_XCV_TYPE RMII -/* Add for working with "strict" DHCP server */ -#define CONFIG_BOOTP_SUBNETMASK -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_DNS -#define CONFIG_BOOTP_RANDOM_ID #endif #ifndef CONFIG_ENV_IS_NOWHERE diff --git a/include/configs/tx48.h b/include/configs/tx48.h index e63b08074a..79c92cc97f 100644 --- a/include/configs/tx48.h +++ b/include/configs/tx48.h @@ -185,11 +185,6 @@ #ifdef CONFIG_CMD_NET #define CONFIG_DRIVER_TI_CPSW #define CONFIG_PHY_GIGE -/* Add for working with "strict" DHCP server */ -#define CONFIG_BOOTP_SUBNETMASK -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_DNS -#define CONFIG_BOOTP_DNS2 #endif /* diff --git a/include/configs/tx51.h b/include/configs/tx51.h index e8d9355c02..a4ba2d0500 100644 --- a/include/configs/tx51.h +++ b/include/configs/tx51.h @@ -172,10 +172,6 @@ #ifdef CONFIG_FEC_MXC #define IMX_FEC_BASE FEC_BASE_ADDR #define CONFIG_FEC_XCV_TYPE MII100 -/* Add for working with "strict" DHCP server */ -#define CONFIG_BOOTP_SUBNETMASK -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_DNS #endif /* diff --git a/include/configs/tx53.h b/include/configs/tx53.h index 6db8f52730..5ea59f480d 100644 --- a/include/configs/tx53.h +++ b/include/configs/tx53.h @@ -174,10 +174,6 @@ #define IMX_FEC_BASE FEC_BASE_ADDR #define CONFIG_FEC_MXC_PHYADDR 0 #define CONFIG_FEC_XCV_TYPE MII100 -/* Add for working with "strict" DHCP server */ -#define CONFIG_BOOTP_SUBNETMASK -#define CONFIG_BOOTP_GATEWAY -#define CONFIG_BOOTP_DNS #endif /* -- 2.39.2