From: Holger Brunck Date: Tue, 13 Sep 2011 23:06:10 +0000 (+0000) Subject: km/common: force set ethaddr only for KM kirkwood boards X-Git-Tag: v2011.12-rc1~506 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0eb0e59ed3955cd73548c8769bf594c665025dd5;p=oweals%2Fu-boot.git km/common: force set ethaddr only for KM kirkwood boards 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 --- diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c index bcf3aed97e..70d78457f2 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) +