diff mbox

[U-Boot] env: disable CONFIG_ETHADDR & CONFIG_IPADDR

Message ID 1392010923-3374-1-git-send-email-abrodkin@synopsys.com
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Alexey Brodkin Feb. 10, 2014, 5:42 a.m. UTC
We don't want to have duplicates of the same MAC or/and IP address
within one network. But if those values are hard-coded into particular
board config chances are high that multiple instances of the same board
may easily have the same IP/MAC addresses.

As for disabled options CONFIG_GATEWAYIP and CONFIG_NETMASK - they make
no sense without CONFIG_IPADDR.

If this change is acceptable on the next step whether as a separate
follow-up patch or v2 re-spin I may do a clean-up of existing configs.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
---
 include/env_default.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Tom Rini Feb. 21, 2014, 12:56 p.m. UTC | #1
On Mon, Feb 10, 2014 at 09:42:03AM +0400, Alexey Brodkin wrote:

> We don't want to have duplicates of the same MAC or/and IP address
> within one network. But if those values are hard-coded into particular
> board config chances are high that multiple instances of the same board
> may easily have the same IP/MAC addresses.
> 
> As for disabled options CONFIG_GATEWAYIP and CONFIG_NETMASK - they make
> no sense without CONFIG_IPADDR.
> 
> If this change is acceptable on the next step whether as a separate
> follow-up patch or v2 re-spin I may do a clean-up of existing configs.
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> 
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Tom Rini <trini@ti.com>
> Cc: Vineet Gupta <vgupta@synopsys.com>

This is the right thing to do, but we need to also fixup the currently
broken boards when we do this too.  A 2 part series where 1/2 removes
this from current users and 2/2 is this patch to catch out of tree
folks, etc, should do it.
diff mbox

Patch

diff --git a/include/env_default.h b/include/env_default.h
index 90431be..c1dbaa3 100644
--- a/include/env_default.h
+++ b/include/env_default.h
@@ -50,28 +50,28 @@  const uchar default_environment[] = {
 	"loads_echo="	__stringify(CONFIG_LOADS_ECHO)	"\0"
 #endif
 #ifdef	CONFIG_ETHADDR
-	"ethaddr="	__stringify(CONFIG_ETHADDR)	"\0"
+# error "Please DO NOT set CONFIG_ETHADDR in board configuration!"
 #endif
 #ifdef	CONFIG_ETH1ADDR
-	"eth1addr="	__stringify(CONFIG_ETH1ADDR)	"\0"
+# error "Please DO NOT set CONFIG_ETH1ADDR in board configuration!"
 #endif
 #ifdef	CONFIG_ETH2ADDR
-	"eth2addr="	__stringify(CONFIG_ETH2ADDR)	"\0"
+# error "Please DO NOT set CONFIG_ETH2ADDR in board configuration!"
 #endif
 #ifdef	CONFIG_ETH3ADDR
-	"eth3addr="	__stringify(CONFIG_ETH3ADDR)	"\0"
+# error "Please DO NOT set CONFIG_ETH3ADDR in board configuration!"
 #endif
 #ifdef	CONFIG_ETH4ADDR
-	"eth4addr="	__stringify(CONFIG_ETH4ADDR)	"\0"
+# error "Please DO NOT set CONFIG_ETH4ADDR in board configuration!"
 #endif
 #ifdef	CONFIG_ETH5ADDR
-	"eth5addr="	__stringify(CONFIG_ETH5ADDR)	"\0"
+# error "Please DO NOT set CONFIG_ETH5ADDR in board configuration!"
 #endif
 #ifdef	CONFIG_ETHPRIME
 	"ethprime="	CONFIG_ETHPRIME			"\0"
 #endif
 #ifdef	CONFIG_IPADDR
-	"ipaddr="	__stringify(CONFIG_IPADDR)	"\0"
+# error "Please DO NOT set CONFIG_IPADDR in board configuration!"
 #endif
 #ifdef	CONFIG_SERVERIP
 	"serverip="	__stringify(CONFIG_SERVERIP)	"\0"
@@ -86,10 +86,10 @@  const uchar default_environment[] = {
 	"rootpath="	CONFIG_ROOTPATH			"\0"
 #endif
 #ifdef	CONFIG_GATEWAYIP
-	"gatewayip="	__stringify(CONFIG_GATEWAYIP)	"\0"
+# error "Please DO NOT set CONFIG_GATEWAYIP in board configuration!"
 #endif
 #ifdef	CONFIG_NETMASK
-	"netmask="	__stringify(CONFIG_NETMASK)	"\0"
+# error "Please DO NOT set CONFIG_NETMASK in board configuration!"
 #endif
 #ifdef	CONFIG_HOSTNAME
 	"hostname="	__stringify(CONFIG_HOSTNAME)	"\0"