[U-Boot] [PATCH 1/3] km/common: force set ethaddr only for KM kirkwood boards
Holger Brunck
holger.brunck at keymile.com
Wed Sep 14 11:06:10 CEST 2011
This prevents u-boot to print out "Can't overwrite "ethaddr""
each time a powerpc board starts.
Signed-off-by: Holger Brunck <holger.brunck at keymile.com>
cc: Wolfgang Denk <wd at denx.de>
---
board/keymile/common/ivm.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c
index d0cb0d2..db07004 100644
--- a/board/keymile/common/ivm.c
+++ b/board/keymile/common/ivm.c
@@ -221,7 +221,12 @@ static int ivm_analyze_block2(unsigned char *buf, int len)
sprintf((char *)valbuf, "%pM", buf);
}
#endif
+#ifdef MACH_TYPE_KM_KIRKWOOD
setenv((char *)"ethaddr", (char *)valbuf);
+#else
+ if (getenv("ethaddr") == NULL)
+ setenv((char *)"ethaddr", (char *)valbuf);
+#endif
/* IVM_MacCount */
count = (buf[10] << 24) +
--
1.7.1
More information about the U-Boot
mailing list