From: Holger Brunck Date: Wed, 14 Sep 2011 11:06:10 +0200 Subject: [U-Boot] [PATCH 1/3] km/common: force set ethaddr only for KM kirkwood boards Message-ID: <1315991172-11930-1-git-send-email-holger.brunck@keymile.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This prevents u-boot to print out "Can't overwrite "ethaddr"" each time a powerpc board starts. Signed-off-by: Holger Brunck cc: Wolfgang Denk --- 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