[U-Boot] [PATCH 2/2] MIPS: lib_mips/board.c: Fix undefined "getenv_IPaddr" build error

Shinya Kuribayashi skuribay at pobox.com
Mon Jan 11 03:00:14 CET 2010


In the commit 6ac59c55 (net: pull CONFIG checks out of source and into
makefile), net/net.o is changed to be built-in only when CONFIG_CMD_NET
is enabled, while lib_mips/board.c has a reference to "getenv_IPaddr()
left as-is.

And now Micronas VCT Platinum AVC board builds (vct_platinumavc*_config)
failed as follows, because they don't have ethernet support and disable
CONFIG_CMD_NET option:

lib_mips/libmips.a(board.o): In function `board_init_r':
board.c:(.text+0x2e4): undefined reference to `getenv_IPaddr'
make: *** [u-boot] Error 1

VCT Platinum AVC is the only MIPS target who doesn't have CONFIG_CMD_NET
and suffer from this issue at this moment.

Signed-off-by: Shinya Kuribayashi <skuribay at pobox.com>
---

 Note that arm/avr32/i386/m68k/nios/nios2/ppc/sparc have the same issue,
 while blackfin/microblaze/sh don't.

 lib_mips/board.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib_mips/board.c b/lib_mips/board.c
index b2d113e..5c35884 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -370,8 +370,10 @@ void board_init_r (gd_t *id, ulong dest_addr)
 	/* relocate environment function pointers etc. */
 	env_relocate();
 
+#ifdef CONFIG_CMD_NET
 	/* IP Address */
 	bd->bi_ip_addr = getenv_IPaddr("ipaddr");
+#endif
 
 #if defined(CONFIG_PCI)
 	/*
-- 
1.6.6



More information about the U-Boot mailing list