Convert CONFIG_HOSTNAME et al to Kconfig

This converts the following to Kconfig:
   CONFIG_GATEWAYIP
   CONFIG_HOSTNAME
   CONFIG_IPADDR
   CONFIG_NETMASK
   CONFIG_ROOTPATH
   CONFIG_SERVERIP
   CONFIG_UBOOTPATH

To do this, we introduce a CONFIG_USE_ form of each of the above and
change include/env_default.h to test for that to be set before setting a
value. Further, we don't want to stringify the IP address related values
as they are now properly strings via Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h
index b360238..e14650f 100644
--- a/include/configs/M5208EVBE.h
+++ b/include/configs/M5208EVBE.h
@@ -17,14 +17,6 @@
 
 /* I2C */
 
-#ifdef CONFIG_MCFFEC
-#	define CONFIG_IPADDR	192.162.1.2
-#	define CONFIG_NETMASK	255.255.255.0
-#	define CONFIG_SERVERIP	192.162.1.1
-#	define CONFIG_GATEWAYIP	192.162.1.1
-#endif				/* CONFIG_MCFFEC */
-
-#define CONFIG_HOSTNAME		"M5208EVBe"
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"netdev=eth0\0"				\
 	"loadaddr=40010000\0"			\
diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h
index ed45ecc..220524b 100644
--- a/include/configs/M5235EVB.h
+++ b/include/configs/M5235EVB.h
@@ -26,14 +26,7 @@
 #define CFG_SYS_I2C_PINMUX_SET	(GPIO_PAR_FECI2C_SCL_I2CSCL | GPIO_PAR_FECI2C_SDA_I2CSDA)
 
 /* this must be included AFTER the definition of CONFIG COMMANDS (if any) */
-#ifdef CONFIG_MCFFEC
-#	define CONFIG_IPADDR	192.162.1.2
-#	define CONFIG_NETMASK	255.255.255.0
-#	define CONFIG_SERVERIP	192.162.1.1
-#	define CONFIG_GATEWAYIP	192.162.1.1
-#endif				/* FEC_ENET */
 
-#define CONFIG_HOSTNAME		"M5235EVB"
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"netdev=eth0\0"				\
 	"loadaddr=10000\0"			\
diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h
index ad55938..65a7aa0 100644
--- a/include/configs/M5253DEMO.h
+++ b/include/configs/M5253DEMO.h
@@ -36,8 +36,6 @@
 		""
 #endif
 
-#define CONFIG_HOSTNAME		"M5253DEMO"
-
 /* I2C */
 #define CFG_SYS_I2C_PINMUX_REG	(*(u32 *) (CFG_SYS_MBAR+0x19C))
 #define CFG_SYS_I2C_PINMUX_CLR	(0xFFFFE7FF)
diff --git a/include/configs/M5272C3.h b/include/configs/M5272C3.h
index a9339e5..c58d19c 100644
--- a/include/configs/M5272C3.h
+++ b/include/configs/M5272C3.h
@@ -29,14 +29,6 @@
 	. = DEFINED(env_offset) ? env_offset : .; \
 	env/embedded.o(.text);
 
-#ifdef CONFIG_MCFFEC
-#	define CONFIG_IPADDR	192.162.1.2
-#	define CONFIG_NETMASK	255.255.255.0
-#	define CONFIG_SERVERIP	192.162.1.1
-#	define CONFIG_GATEWAYIP	192.162.1.1
-#endif				/* CONFIG_MCFFEC */
-
-#define CONFIG_HOSTNAME		"M5272C3"
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"netdev=eth0\0"				\
 	"loadaddr=10000\0"			\
diff --git a/include/configs/M5282EVB.h b/include/configs/M5282EVB.h
index bde9e77..e23439f 100644
--- a/include/configs/M5282EVB.h
+++ b/include/configs/M5282EVB.h
@@ -29,14 +29,6 @@
 	. = DEFINED(env_offset) ? env_offset : .; \
 	env/embedded.o(.text*);
 
-#ifdef CONFIG_MCFFEC
-#	define CONFIG_IPADDR	192.162.1.2
-#	define CONFIG_NETMASK	255.255.255.0
-#	define CONFIG_SERVERIP	192.162.1.1
-#	define CONFIG_GATEWAYIP	192.162.1.1
-#endif				/* CONFIG_MCFFEC */
-
-#define CONFIG_HOSTNAME		"M5282EVB"
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"netdev=eth0\0"				\
 	"loadaddr=10000\0"			\
diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h
index 439ed93..ac2bd0b 100644
--- a/include/configs/M53017EVB.h
+++ b/include/configs/M53017EVB.h
@@ -30,14 +30,6 @@
 
 /* I2C */
 
-#ifdef CONFIG_MCFFEC
-#	define CONFIG_IPADDR	192.162.1.2
-#	define CONFIG_NETMASK	255.255.255.0
-#	define CONFIG_SERVERIP	192.162.1.1
-#	define CONFIG_GATEWAYIP	192.162.1.1
-#endif				/* FEC_ENET */
-
-#define CONFIG_HOSTNAME		"M53017"
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"netdev=eth0\0"				\
 	"loadaddr=40010000\0"			\
diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index 72f0c63..a86a117 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -22,14 +22,6 @@
 
 /* I2C */
 
-#ifdef CONFIG_MCFFEC
-#	define CONFIG_IPADDR	192.162.1.2
-#	define CONFIG_NETMASK	255.255.255.0
-#	define CONFIG_SERVERIP	192.162.1.1
-#	define CONFIG_GATEWAYIP	192.162.1.1
-#endif				/* FEC_ENET */
-
-#define CONFIG_HOSTNAME		"M5329EVB"
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"			\
 	"loadaddr=40010000\0"	\
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index 4e8b54e..b2ad03c 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -24,14 +24,6 @@
 
 /* I2C */
 
-#ifdef CONFIG_MCFFEC
-#	define CONFIG_IPADDR	192.162.1.2
-#	define CONFIG_NETMASK	255.255.255.0
-#	define CONFIG_SERVERIP	192.162.1.1
-#	define CONFIG_GATEWAYIP	192.162.1.1
-#endif				/* FEC_ENET */
-
-#define CONFIG_HOSTNAME		"M5373EVB"
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"			\
 	"loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0"	\
diff --git a/include/configs/MCR3000.h b/include/configs/MCR3000.h
index 232cf9e..f836882 100644
--- a/include/configs/MCR3000.h
+++ b/include/configs/MCR3000.h
@@ -52,10 +52,6 @@
 		"${ofl_args}; "						\
 		"bootm ${loadaddr} - 0xf00000\0"
 
-#define CONFIG_IPADDR			192.168.0.3
-#define CONFIG_SERVERIP			192.168.0.1
-#define CONFIG_NETMASK			255.0.0.0
-
 /* Miscellaneous configurable options */
 
 /* Definitions for initial stack pointer and data area (in DPRAM) */
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index dbfcdfb..7dff3cc 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -197,10 +197,6 @@
 
 #define CONFIG_NETDEV		"eth1"
 
-#define CONFIG_HOSTNAME		"mpc837x_rdb"
-#define CONFIG_ROOTPATH		"/nfsroot"
-				/* U-Boot image on TFTP server */
-#define CONFIG_UBOOTPATH	"u-boot.bin"
 #define CONFIG_FDTFILE		"mpc8379_rdb.dtb"
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index 34b876f..1f1eacd 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -298,20 +298,10 @@
  * Environment Configuration
  */
 
-#define CONFIG_IPADDR	 192.168.1.253
-
-#define CONFIG_HOSTNAME	 "unknown"
-#define CONFIG_ROOTPATH	 "/nfsroot"
-#define CONFIG_UBOOTPATH	8548cds/u-boot.bin	/* TFTP server */
-
-#define CONFIG_SERVERIP	 192.168.1.1
-#define CONFIG_GATEWAYIP 192.168.1.1
-#define CONFIG_NETMASK	 255.255.255.0
-
 #define	CONFIG_EXTRA_ENV_SETTINGS		\
 	"hwconfig=fsl_ddr:ecc=off\0"		\
 	"netdev=eth0\0"				\
-	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"	\
+	"uboot=" CONFIG_UBOOTPATH "\0"	\
 	"tftpflash=tftpboot $loadaddr $uboot; "	\
 		"protect off " __stringify(CONFIG_TEXT_BASE)	\
 			" +$filesize; "	\
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index f79c62a..d83563d 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -380,13 +380,10 @@
  * Environment Configuration
  */
 
-#define CONFIG_ROOTPATH		"/opt/nfsroot"
-#define CONFIG_UBOOTPATH	u-boot.bin/* U-Boot image on TFTP server */
-
 #define	CONFIG_EXTRA_ENV_SETTINGS				\
 	"hwconfig=" __stringify(CONFIG_DEF_HWCONFIG)  "\0"	\
 	"netdev=eth0\0"						\
-	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
+	"uboot=" CONFIG_UBOOTPATH "\0"		\
 	"loadaddr=1000000\0"			\
 	"consoledev=ttyS0\0"				\
 	"ramdiskaddr=2000000\0"			\
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 707157e..0f0cdb3 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -306,8 +306,6 @@
 /*
  * Environment Configuration
  */
-#define CONFIG_ROOTPATH		"/opt/nfsroot"
-#define CONFIG_UBOOTPATH	u-boot.bin
 
 #define __USB_PHY_TYPE	utmi
 
@@ -315,7 +313,7 @@
 	"hwconfig=fsl_ddr:ctlr_intlv=cacheline,"		\
 	"bank_intlv=cs0_cs1\0"					\
 	"netdev=eth0\0"						\
-	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"			\
+	"uboot=" CONFIG_UBOOTPATH "\0"			\
 	"ubootaddr=" __stringify(CONFIG_TEXT_BASE) "\0"		\
 	"tftpflash=tftpboot $loadaddr $uboot && "		\
 	"protect off $ubootaddr +$filesize && "			\
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index b590f12..e815d9f 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -421,8 +421,6 @@
 /*
  * Environment Configuration
  */
-#define CONFIG_ROOTPATH		"/opt/nfsroot"
-#define CONFIG_UBOOTPATH	u-boot.bin /* U-Boot image on TFTP server */
 #define __USB_PHY_TYPE		utmi
 
 #ifdef CONFIG_ARCH_T1024
@@ -441,7 +439,7 @@
 	ARCH_EXTRA_ENV_SETTINGS					\
 	"hwconfig=fsl_ddr:ctlr_intlv=cacheline,"		\
 	"usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"  \
-	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
+	"uboot=" CONFIG_UBOOTPATH "\0"		\
 	"ubootaddr=" __stringify(CONFIG_TEXT_BASE) "\0"	\
 	"bootargs=root=/dev/ram rw console=ttyS0,115200\0" \
 	"netdev=eth0\0"						\
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index 9d805f4..6fe0bd6 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -411,8 +411,6 @@
 /*
  * Environment Configuration
  */
-#define CONFIG_ROOTPATH		"/opt/nfsroot"
-#define CONFIG_UBOOTPATH	"u-boot.bin"	/* U-Boot image on TFTP server*/
 
 #define __USB_PHY_TYPE	utmi
 #define RAMDISKFILE	"t104xrdb/ramdisk.uboot"
@@ -434,7 +432,7 @@
 	"usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) ";"\
 	"usb2:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\
 	"netdev=eth0\0"						\
-	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
+	"uboot=" CONFIG_UBOOTPATH "\0"		\
 	"ubootaddr=" __stringify(CONFIG_TEXT_BASE) "\0"	\
 	"tftpflash=tftpboot $loadaddr $uboot && "		\
 	"protect off $ubootaddr +$filesize && "			\
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 804b7ec..79b3d7a 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -419,8 +419,6 @@
 /*
  * Environment Configuration
  */
-#define CONFIG_ROOTPATH	 "/opt/nfsroot"
-#define CONFIG_UBOOTPATH "u-boot.bin"	/* U-Boot image on TFTP server */
 
 #define __USB_PHY_TYPE		utmi
 
@@ -430,7 +428,7 @@
 	"bank_intlv=auto;"					\
 	"usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\
 	"netdev=eth0\0"						\
-	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
+	"uboot=" CONFIG_UBOOTPATH "\0"		\
 	"ubootaddr=" __stringify(CONFIG_TEXT_BASE) "\0"	\
 	"tftpflash=tftpboot $loadaddr $uboot && "		\
 	"protect off $ubootaddr +$filesize && "			\
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index d8213b4..2a32fe3 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -385,8 +385,6 @@
 /*
  * Environment Configuration
  */
-#define CONFIG_ROOTPATH	 "/opt/nfsroot"
-#define CONFIG_UBOOTPATH "u-boot.bin"	/* U-Boot image on TFTP server */
 
 #define __USB_PHY_TYPE		utmi
 
@@ -396,7 +394,7 @@
 	"bank_intlv=auto;"					\
 	"usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\
 	"netdev=eth0\0"						\
-	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
+	"uboot=" CONFIG_UBOOTPATH "\0"		\
 	"ubootaddr=" __stringify(CONFIG_TEXT_BASE) "\0"	\
 	"tftpflash=tftpboot $loadaddr $uboot && "		\
 	"protect off $ubootaddr +$filesize && "			\
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index 9589336..d8c4de5 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -138,8 +138,6 @@
 /*
  * Environment Configuration
  */
-#define CONFIG_ROOTPATH		"/opt/nfsroot"
-#define CONFIG_UBOOTPATH	"u-boot.bin"	/* U-Boot image on TFTP server*/
 
 #define HVBOOT					\
 	"setenv bootargs config-addr=0x60000000; "	\
@@ -386,7 +384,7 @@
 	"bank_intlv=auto;"					\
 	"usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\
 	"netdev=eth0\0"						\
-	"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"		\
+	"uboot=" CONFIG_UBOOTPATH "\0"		\
 	"ubootaddr=" __stringify(CONFIG_TEXT_BASE) "\0"	\
 	"tftpflash=tftpboot $loadaddr $uboot && "		\
 	"protect off $ubootaddr +$filesize && "			\
diff --git a/include/configs/amcore.h b/include/configs/amcore.h
index ee0be97..ca29346 100644
--- a/include/configs/amcore.h
+++ b/include/configs/amcore.h
@@ -8,8 +8,6 @@
 #ifndef __AMCORE_CONFIG_H
 #define __AMCORE_CONFIG_H
 
-#define CONFIG_HOSTNAME			"AMCORE"
-
 #define CFG_SYS_UART_PORT		0
 
 #define CONFIG_EXTRA_ENV_SETTINGS				\
diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index cf23837..aa3dcf4 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -14,9 +14,6 @@
 #define USDHC2_BASE_ADDR		0x5b020000
 
 /* Networking */
-#define CONFIG_IPADDR			192.168.10.2
-#define CONFIG_NETMASK			255.255.255.0
-#define CONFIG_SERVERIP			192.168.10.1
 
 #define MEM_LAYOUT_ENV_SETTINGS \
 	"fdt_addr_r=0x84000000\0" \
diff --git a/include/configs/apalis-tk1.h b/include/configs/apalis-tk1.h
index f0a02ae..1d47807 100644
--- a/include/configs/apalis-tk1.h
+++ b/include/configs/apalis-tk1.h
@@ -33,12 +33,6 @@
 	func(PXE, pxe, na) \
 	func(DHCP, dhcp, na)
 
-#undef CONFIG_IPADDR
-#define CONFIG_IPADDR		192.168.10.2
-#define CONFIG_NETMASK		255.255.255.0
-#undef CONFIG_SERVERIP
-#define CONFIG_SERVERIP		192.168.10.1
-
 #define DFU_ALT_EMMC_INFO	"apalis-tk1.img raw 0x0 0x500 mmcpart 1; " \
 				"boot part 0 1 mmcpart 0; " \
 				"rootfs part 0 2 mmcpart 0; " \
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index a3c8654..25a8445 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -35,12 +35,6 @@
 
 /* Command definition */
 
-#undef CONFIG_IPADDR
-#define CONFIG_IPADDR			192.168.10.2
-#define CONFIG_NETMASK			255.255.255.0
-#undef CONFIG_SERVERIP
-#define CONFIG_SERVERIP			192.168.10.1
-
 #define BOOT_TARGET_DEVICES(func) \
 	func(MMC, mmc, 1) \
 	func(MMC, mmc, 2) \
diff --git a/include/configs/aristainetos2.h b/include/configs/aristainetos2.h
index 6faf544..8541354 100644
--- a/include/configs/aristainetos2.h
+++ b/include/configs/aristainetos2.h
@@ -11,8 +11,6 @@
 #ifndef __ARISTAINETOS2_CONFIG_H
 #define __ARISTAINETOS2_CONFIG_H
 
-#define CONFIG_HOSTNAME		"aristainetos2"
-
 #if (CONFIG_SYS_BOARD_VERSION == 5)
 #define CONSOLE_DEV	"ttymxc1"
 #elif (CONFIG_SYS_BOARD_VERSION == 6)
diff --git a/include/configs/bcm_ns3.h b/include/configs/bcm_ns3.h
index b546988..fc176dc 100644
--- a/include/configs/bcm_ns3.h
+++ b/include/configs/bcm_ns3.h
@@ -9,8 +9,6 @@
 
 #include <linux/sizes.h>
 
-#define CONFIG_HOSTNAME			"NS3"
-
 /* Physical Memory Map */
 #define V2M_BASE			0x80000000
 #define PHYS_SDRAM_1			V2M_BASE
diff --git a/include/configs/cobra5272.h b/include/configs/cobra5272.h
index 6d6e2fc..8c83c3a 100644
--- a/include/configs/cobra5272.h
+++ b/include/configs/cobra5272.h
@@ -91,9 +91,6 @@
 
 /* User network settings */
 
-#define CONFIG_IPADDR 192.168.100.2		/* default board IP address */
-#define CONFIG_SERVERIP 192.168.100.1	/* default tftp server IP address */
-
 #endif
 
 /*---*/
diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h
index c0c3b4e..2f09a26 100644
--- a/include/configs/colibri-imx6ull.h
+++ b/include/configs/colibri-imx6ull.h
@@ -20,10 +20,6 @@
 #define CFG_SYS_FSL_ESDHC_ADDR	0
 #define CFG_SYS_FSL_USDHC_NUM	1
 
-#define CONFIG_IPADDR			192.168.10.2
-#define CONFIG_NETMASK			255.255.255.0
-#define CONFIG_SERVERIP			192.168.10.1
-
 #if defined(CONFIG_TARGET_COLIBRI_IMX6ULL_EMMC)
 #define UBOOT_UPDATE \
 	"uboot_hwpart=1\0" \
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h
index 6002d8d..215c633 100644
--- a/include/configs/colibri-imx8x.h
+++ b/include/configs/colibri-imx8x.h
@@ -14,10 +14,6 @@
 #define USDHC1_BASE_ADDR		0x5b010000
 #define USDHC2_BASE_ADDR		0x5b020000
 
-#define CONFIG_IPADDR			192.168.10.2
-#define CONFIG_NETMASK			255.255.255.0
-#define CONFIG_SERVERIP			192.168.10.1
-
 #define MEM_LAYOUT_ENV_SETTINGS \
 	"fdt_addr_r=0x83000000\0" \
 	"kernel_addr_r=0x81000000\0" \
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index 60a3862..19daad2 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -30,12 +30,6 @@
 
 /* Command definition */
 
-#undef CONFIG_IPADDR
-#define CONFIG_IPADDR			192.168.10.2
-#define CONFIG_NETMASK			255.255.255.0
-#undef CONFIG_SERVERIP
-#define CONFIG_SERVERIP			192.168.10.1
-
 #define BOOT_TARGET_DEVICES(func) \
 	func(MMC, mmc, 1) \
 	func(MMC, mmc, 0) \
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index 32a79b0..48c3f01 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -21,10 +21,6 @@
 #define CFG_SYS_FSL_USDHC_NUM	2
 #endif
 
-#define CONFIG_IPADDR			192.168.10.2
-#define CONFIG_NETMASK			255.255.255.0
-#define CONFIG_SERVERIP			192.168.10.1
-
 #if defined(CONFIG_TARGET_COLIBRI_IMX7_EMMC)
 #define UBOOT_UPDATE \
 	"uboot_hwpart=1\0" \
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index fa778ec..8a79040 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -16,10 +16,6 @@
 
 /* NAND support */
 
-#define CONFIG_IPADDR		192.168.10.2
-#define CONFIG_NETMASK		255.255.255.0
-#define CONFIG_SERVERIP		192.168.10.1
-
 #define CONFIG_FDTADDR			0x84000000
 
 #define MEM_LAYOUT_ENV_SETTINGS \
diff --git a/include/configs/controlcenterdc.h b/include/configs/controlcenterdc.h
index 5da2778..119a834 100644
--- a/include/configs/controlcenterdc.h
+++ b/include/configs/controlcenterdc.h
@@ -21,9 +21,6 @@
  * Environment Configuration
  */
 
-#define CONFIG_HOSTNAME		"ccdc"
-#define CONFIG_ROOTPATH		"/opt/nfsroot"
-
 #define CONFIG_EXTRA_ENV_SETTINGS						\
 	"netdev=eth1\0"						\
 	"consoledev=ttyS1\0"							\
diff --git a/include/configs/gazerbeam.h b/include/configs/gazerbeam.h
index 36dcee8..671b75e 100644
--- a/include/configs/gazerbeam.h
+++ b/include/configs/gazerbeam.h
@@ -55,10 +55,6 @@
  * Environment Configuration
  */
 
-/* TODO: Turn into string option and migrate to Kconfig */
-#define CONFIG_HOSTNAME		"gazerbeam"
-#define CONFIG_ROOTPATH		"/opt/nfsroot"
-
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"							\
 	"consoledev=ttyS1\0"						\
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index 4d0a78c..298a8f5 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -57,7 +57,5 @@
 /* Persistent Environment Config */
 
 /* Environment */
-#define CONFIG_IPADDR             192.168.1.1
-#define CONFIG_SERVERIP           192.168.1.146
 
 #endif			       /* __CONFIG_H */
diff --git a/include/configs/integratorcp.h b/include/configs/integratorcp.h
index 25bb41e..596e4ff 100644
--- a/include/configs/integratorcp.h
+++ b/include/configs/integratorcp.h
@@ -19,9 +19,6 @@
 /* Integrator CP-specific configuration */
 #define CFG_SYS_HZ_CLOCK		1000000	/* Timer 1 is clocked at 1Mhz */
 
-#define CONFIG_SERVERIP 192.168.1.100
-#define CONFIG_IPADDR 192.168.1.104
-
 /*
  * Miscellaneous configurable options
  */
diff --git a/include/configs/kontron-sl-mx6ul.h b/include/configs/kontron-sl-mx6ul.h
index 6fcacdb..7c5f673 100644
--- a/include/configs/kontron-sl-mx6ul.h
+++ b/include/configs/kontron-sl-mx6ul.h
@@ -23,7 +23,6 @@
 
 /* Board and environment settings */
 #define CONFIG_MXC_UART_BASE		UART4_BASE
-#define CONFIG_HOSTNAME			"kontron-mx6ul"
 
 #ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
diff --git a/include/configs/kontron-sl-mx8mm.h b/include/configs/kontron-sl-mx8mm.h
index 80a3230..beb1926 100644
--- a/include/configs/kontron-sl-mx8mm.h
+++ b/include/configs/kontron-sl-mx8mm.h
@@ -23,7 +23,6 @@
 #define CFG_SYS_INIT_RAM_SIZE	0x200000
 
 /* Board and environment settings */
-#define CONFIG_HOSTNAME			"kontron-mx8mm"
 
 #ifdef CONFIG_USB_EHCI_HCD
 #define CONFIG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index 6659139..189b211 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -84,7 +84,6 @@
 /*
  * Extra Environments
  */
-#define CONFIG_HOSTNAME		"m53menlo"
 
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	"consdev=ttymxc0\0"						\
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index edd2466..b8b0897 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -16,8 +16,6 @@
 # define CFG_SYS_BAUDRATE_TABLE \
 	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400}
 
-#define	CONFIG_HOSTNAME		"microblaze-generic"
-
 /* architecture dependent code */
 #if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP)
 #define BOOT_TARGET_DEVICES_PXE(func)	func(PXE, pxe, na)
diff --git a/include/configs/mt7622.h b/include/configs/mt7622.h
index 8c29726..6541512 100644
--- a/include/configs/mt7622.h
+++ b/include/configs/mt7622.h
@@ -18,7 +18,5 @@
 #define CFG_SYS_SDRAM_BASE		0x40000000
 
 /* Ethernet */
-#define CONFIG_IPADDR			192.168.1.1
-#define CONFIG_SERVERIP			192.168.1.3
 
 #endif
diff --git a/include/configs/mt7623.h b/include/configs/mt7623.h
index 39a7ba7..93161bd 100644
--- a/include/configs/mt7623.h
+++ b/include/configs/mt7623.h
@@ -33,8 +33,6 @@
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"
 
 /* Ethernet */
-#define CONFIG_IPADDR			192.168.1.1
-#define CONFIG_SERVERIP			192.168.1.2
 
 #ifdef CONFIG_DISTRO_DEFAULTS
 
diff --git a/include/configs/mt7629.h b/include/configs/mt7629.h
index bfa44aa..99b09ad 100644
--- a/include/configs/mt7629.h
+++ b/include/configs/mt7629.h
@@ -28,7 +28,5 @@
 #define CFG_SYS_SDRAM_BASE		0x40000000
 
 /* Ethernet */
-#define CONFIG_IPADDR			192.168.1.1
-#define CONFIG_SERVERIP			192.168.1.2
 
 #endif
diff --git a/include/configs/mvebu_alleycat-5.h b/include/configs/mvebu_alleycat-5.h
index 5c96203..3ad3aef 100644
--- a/include/configs/mvebu_alleycat-5.h
+++ b/include/configs/mvebu_alleycat-5.h
@@ -15,11 +15,6 @@
 				      115200, 230400, 460800, 921600 }
 
 /* Default Env vars */
-#define CONFIG_IPADDR           0.0.0.0 /* In order to cause an error */
-#define CONFIG_SERVERIP         0.0.0.0 /* In order to cause an error */
-#define CONFIG_NETMASK          255.255.255.0
-#define CONFIG_GATEWAYIP        0.0.0.0
-#define CONFIG_ROOTPATH                 "/srv/nfs/" /* Default Dir for NFS */
 
 #define BOOT_TARGET_DEVICES(func) \
 	func(USB, usb, 0) \
diff --git a/include/configs/novena.h b/include/configs/novena.h
index 4e46dfc..6e4bdce 100644
--- a/include/configs/novena.h
+++ b/include/configs/novena.h
@@ -25,7 +25,6 @@
  */
 
 /* Booting Linux */
-#define CONFIG_HOSTNAME			"novena"
 
 /* Physical Memory Map */
 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
diff --git a/include/configs/npi_imx6ull.h b/include/configs/npi_imx6ull.h
index 09c4ddb..2eebd0c 100644
--- a/include/configs/npi_imx6ull.h
+++ b/include/configs/npi_imx6ull.h
@@ -18,8 +18,6 @@
 /* MMC Configs */
 #define CFG_SYS_FSL_ESDHC_ADDR	USDHC2_BASE_ADDR
 
-#define CONFIG_NETMASK			255.255.255.0
-
 /* Physical Memory Map */
 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
 
diff --git a/include/configs/opos6uldev.h b/include/configs/opos6uldev.h
index e42a736..5c44b9d 100644
--- a/include/configs/opos6uldev.h
+++ b/include/configs/opos6uldev.h
@@ -27,6 +27,4 @@
 /* LCD */
 #define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR
 
-#define CONFIG_ROOTPATH         "/tftpboot/opos6ul-root"
-
 #endif /* __OPOS6ULDEV_CONFIG_H */
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index eb2c5a2..ee25990 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -396,15 +396,12 @@
 /*
  * Environment Configuration
  */
-#define CONFIG_HOSTNAME		"unknown"
-#define CONFIG_ROOTPATH		"/opt/nfsroot"
-#define CONFIG_UBOOTPATH	u-boot.bin /* U-Boot image on TFTP server */
 
 #include "p1_p2_bootsrc.h"
 
 #define	CONFIG_EXTRA_ENV_SETTINGS	\
 "netdev=eth0\0"	\
-"uboot=" __stringify(CONFIG_UBOOTPATH) "\0"	\
+"uboot=" CONFIG_UBOOTPATH "\0"	\
 "loadaddr=1000000\0"	\
 "bootfile=uImage\0"	\
 "tftpflash=tftpboot $loadaddr $uboot; "	\
diff --git a/include/configs/poleg.h b/include/configs/poleg.h
index 518d7a3..075729e 100644
--- a/include/configs/poleg.h
+++ b/include/configs/poleg.h
@@ -14,9 +14,6 @@
 #define CFG_SYS_SDRAM_BASE           0x0
 
 /* Default environemnt variables */
-#define CONFIG_SERVERIP                 192.168.0.1
-#define CONFIG_IPADDR                   192.168.0.2
-#define CONFIG_NETMASK                  255.255.255.0
 #define CONFIG_EXTRA_ENV_SETTINGS   "uimage_flash_addr=80200000\0"   \
 		"stdin=serial\0"   \
 		"stdout=serial\0"   \
diff --git a/include/configs/qemu-ppce500.h b/include/configs/qemu-ppce500.h
index 30a9eae..d056189 100644
--- a/include/configs/qemu-ppce500.h
+++ b/include/configs/qemu-ppce500.h
@@ -58,7 +58,5 @@
 /*
  * Environment Configuration
  */
-#define CONFIG_ROOTPATH		"/opt/nfsroot"
-#define CONFIG_UBOOTPATH	"u-boot.bin"	/* U-Boot image on TFTP server*/
 
 #endif	/* __QEMU_PPCE500_H */
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 5a00171..1b1787a 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -17,8 +17,6 @@
 
 /* commands to include */
 
-#define CONFIG_ROOTPATH		"/opt/eldk"
-
 /* Clock Defines */
 #define V_OSCK				24000000  /* Clock output from T2 */
 #define V_SCLK				(V_OSCK)
diff --git a/include/configs/socfpga_vining_fpga.h b/include/configs/socfpga_vining_fpga.h
index 70d9f36..d88b07b 100644
--- a/include/configs/socfpga_vining_fpga.h
+++ b/include/configs/socfpga_vining_fpga.h
@@ -13,7 +13,6 @@
 /* Booting Linux */
 
 /* Extra Environment */
-#define CONFIG_HOSTNAME			"socfpga_vining_fpga"
 
 /*
  * Active LOW GPIO buttons:
diff --git a/include/configs/stm32mp15_common.h b/include/configs/stm32mp15_common.h
index c9cfadd..9715dfa 100644
--- a/include/configs/stm32mp15_common.h
+++ b/include/configs/stm32mp15_common.h
@@ -24,9 +24,6 @@
 /* NAND support */
 
 /* Ethernet need */
-#ifdef CONFIG_DWC_ETH_QOS
-#define CONFIG_SERVERIP                 192.168.1.1
-#endif
 
 #define STM32MP_FIP_IMAGE_GUID \
 	EFI_GUID(0x19d5df83, 0x11b0, 0x457b, 0xbe, 0x2c, \
diff --git a/include/configs/stmark2.h b/include/configs/stmark2.h
index f81cef0..ce941d8 100644
--- a/include/configs/stmark2.h
+++ b/include/configs/stmark2.h
@@ -8,8 +8,6 @@
 #ifndef __STMARK2_CONFIG_H
 #define __STMARK2_CONFIG_H
 
-#define CONFIG_HOSTNAME			"stmark2"
-
 #define CFG_SYS_UART_PORT		0
 
 #define LDS_BOARD_TEXT						\
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index 8cd81f1..7fee640 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -46,10 +46,6 @@
 /*
  * Network Configuration
  */
-#define CONFIG_SERVERIP			192.168.11.1
-#define CONFIG_IPADDR			192.168.11.10
-#define CONFIG_GATEWAYIP		192.168.11.1
-#define CONFIG_NETMASK			255.255.255.0
 
 #if defined(CONFIG_ARM64)
 /* ARM Trusted Firmware */
@@ -62,8 +58,6 @@
 	"third_image=u-boot.bin\0"
 #endif
 
-#define CONFIG_ROOTPATH			"/nfs/root/path"
-
 #ifdef CONFIG_FIT
 #define KERNEL_ADDR_R_OFFSET		"0x05100000"
 #define LINUXBOOT_ENV_SETTINGS \
diff --git a/include/configs/usbarmory.h b/include/configs/usbarmory.h
index a2bc3cd..7f79c63 100644
--- a/include/configs/usbarmory.h
+++ b/include/configs/usbarmory.h
@@ -28,7 +28,6 @@
 #define CONFIG_MXC_USB_FLAGS	0
 
 /* Linux boot */
-#define CONFIG_HOSTNAME		"usbarmory"
 
 #define BOOT_TARGET_DEVICES(func) func(MMC, mmc, 0)
 
diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
index 3e17b53..9bf2462 100644
--- a/include/configs/x86-common.h
+++ b/include/configs/x86-common.h
@@ -41,8 +41,6 @@
  */
 
 /* Default environment */
-#define CONFIG_ROOTPATH		"/opt/nfsroot"
-#define CONFIG_HOSTNAME		"x86"
 #define CONFIG_RAMDISK_ADDR	0x4000000
 #if defined(CONFIG_GENERATE_ACPI_TABLE) || defined(CONFIG_EFI_STUB)
 #define CONFIG_OTHBOOTARGS	"othbootargs=\0"
diff --git a/include/configs/xea.h b/include/configs/xea.h
index b432ab2..a3dc0c7 100644
--- a/include/configs/xea.h
+++ b/include/configs/xea.h
@@ -26,7 +26,6 @@
 #define CFG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 
 /* Extra Environment */
-#define CONFIG_HOSTNAME		"xea"
 
 #define CONFIG_EXTRA_ENV_SETTINGS					\
 	"bootmode=update\0"						\
diff --git a/include/env_default.h b/include/env_default.h
index 7c9c00a..3b7685e 100644
--- a/include/env_default.h
+++ b/include/env_default.h
@@ -53,11 +53,11 @@
 #ifdef	CONFIG_ETHPRIME
 	"ethprime="	CONFIG_ETHPRIME			"\0"
 #endif
-#ifdef	CONFIG_IPADDR
-	"ipaddr="	__stringify(CONFIG_IPADDR)	"\0"
+#ifdef	CONFIG_USE_IPADDR
+	"ipaddr="	CONFIG_IPADDR			"\0"
 #endif
-#ifdef	CONFIG_SERVERIP
-	"serverip="	__stringify(CONFIG_SERVERIP)	"\0"
+#ifdef	CONFIG_USE_SERVERIP
+	"serverip="	CONFIG_SERVERIP			"\0"
 #endif
 #ifdef	CONFIG_SYS_DISABLE_AUTOLOAD
 	"autoload=0\0"
@@ -65,17 +65,17 @@
 #ifdef	CONFIG_PREBOOT_DEFINED
 	"preboot="	CONFIG_PREBOOT			"\0"
 #endif
-#ifdef	CONFIG_ROOTPATH
+#ifdef	CONFIG_USE_ROOTPATH
 	"rootpath="	CONFIG_ROOTPATH			"\0"
 #endif
-#ifdef	CONFIG_GATEWAYIP
-	"gatewayip="	__stringify(CONFIG_GATEWAYIP)	"\0"
+#ifdef	CONFIG_USE_GATEWAYIP
+	"gatewayip="	CONFIG_GATEWAYIP		"\0"
 #endif
-#ifdef	CONFIG_NETMASK
-	"netmask="	__stringify(CONFIG_NETMASK)	"\0"
+#ifdef	CONFIG_USE_NETMASK
+	"netmask="	CONFIG_NETMASK			"\0"
 #endif
-#ifdef	CONFIG_HOSTNAME
-	"hostname="	CONFIG_HOSTNAME	"\0"
+#ifdef	CONFIG_USE_HOSTNAME
+	"hostname="	CONFIG_HOSTNAME			"\0"
 #endif
 #ifdef CONFIG_USE_BOOTFILE
 	"bootfile="	CONFIG_BOOTFILE			"\0"