[U-Boot] [PATCH] Call gentenv_IPaddr only if CONFIG_CMD_NET set

Albert Aribaud albert.aribaud at free.fr
Fri Jan 8 22:19:40 CET 2010


ARM Boards for which CONFIG_CMD_NET is unset still
call getenv_IPaddr from lib_arm/board.c even though
net/net.c (which defines gentenv_IPaddr) will not
be compiled and linked. This patch fixes this by
making the call conditional to CONFIG_CMD_NET.

Signed-off-by: Albert Aribaud <albert.aribaud at free.fr>
---
 lib_arm/board.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib_arm/board.c b/lib_arm/board.c
index e148739..453d660 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -356,8 +356,10 @@ void start_armboot (void)
 	serial_initialize();
 #endif
 
+#ifdef CONFIG_CMD_NET
 	/* IP Address */
 	gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+#endif
 
 	stdio_init ();	/* get the devices list going. */
 
-- 
1.6.4.4



More information about the U-Boot mailing list