Skip to contentSkip to conversation

AVR32, i386, m68k, MIPS, NIOS, NIOS2 and SPARC: Fix building without CONFIG_CMD_NET

PATCH New Marcel Ziswiler 2 participants 2 messages Dec 24, 2009 – Dec 26, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 AVR32, i386, m68k, MIPS, NIOS, NIOS2 and SPARC: Fix building without CONFIG_CMD_NET

Saw that this got already fixed for ppc. Duno why nobody considered the other archs as well!

---
 lib_avr32/board.c |    2 ++
 lib_i386/board.c  |    2 ++
 lib_m68k/board.c  |    2 ++
 lib_mips/board.c  |    2 ++
 lib_nios/board.c  |    2 ++
 lib_nios2/board.c |    2 ++
 lib_sparc/board.c |    3 +++
 7 files changed, 15 insertions(+), 0 deletions(-)
lib_avr32/board.c +2 -0
index 917ed6c..654f39b 100644
@@ -331,7 +331,9 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
 	/* initialize environment */
 	env_relocate();
 
+#ifdef CONFIG_CMD_NET
 	bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+#endif
 
 	stdio_init();
 	jumptable_init();
lib_i386/board.c +2 -0
index f3b6348..af81cd5 100644
@@ -280,8 +280,10 @@ void board_init_r(gd_t *id, ulong ram_start)
 	show_boot_progress(0x26);
 
 
+#ifdef CONFIG_CMD_NET
 	/* IP Address */
 	bd_data.bi_ip_addr = getenv_IPaddr ("ipaddr");
+#endif
 
 #if defined(CONFIG_PCI)
 	/*
lib_m68k/board.c +2 -0
index 732023d..f0aac98 100644
@@ -545,6 +545,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 	/* relocate environment function pointers etc. */
 	env_relocate ();
 
+#ifdef CONFIG_CMD_NET
 	/*
 	 * Fill in missing fields of bd_info.
 	 * We do this here, where we have "normal" access to the
@@ -553,6 +554,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 	 * the environment is in EEPROM.
 	 */
 	bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+#endif
 
 	WATCHDOG_RESET ();
 
lib_mips/board.c +2 -0
index b2d113e..5c35884 100644
@@ -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)
 	/*
lib_nios/board.c +2 -0
index 5d2fb2e..e782884 100644
@@ -121,7 +121,9 @@ void board_init (void)
 	WATCHDOG_RESET ();
 	env_relocate();
 
+#ifdef CONFIG_CMD_NET
 	bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+#endif
 
 	WATCHDOG_RESET ();
 	stdio_init();
lib_nios2/board.c +2 -0
index 41d3297..699de2e 100644
@@ -125,7 +125,9 @@ void board_init (void)
 	WATCHDOG_RESET ();
 	env_relocate();
 
+#ifdef CONFIG_CMD_NET
 	bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+#endif
 
 	WATCHDOG_RESET ();
 	stdio_init();
lib_sparc/board.c +3 -0
index 11eea60..35e7359 100644
@@ -361,8 +361,11 @@ void board_init_f(ulong bootflag)
 	mac_read_from_eeprom();
 #endif
 
+#ifdef CONFIG_CMD_NET
 	/* IP Address */
 	bd->bi_ip_addr = getenv_IPaddr("ipaddr");
+#endif
+
 #if defined(CONFIG_PCI)
 	/*
 	 * Do pci configuration
Signature · 1 line
1.6.0.4
#1 lore raw

PATCH 1/1 AVR32, i386, m68k, MIPS, NIOS, NIOS2 and SPARC: Fix building without CONFIG_CMD_NET

Quoted 1 line · Marcel Ziswiler

Saw that this got already fixed for ppc.

Any hint how/where it was fixed for ppc? Hopefully this fix can give us a hint how to fix it for all other architectures. Wolfgang doesn't seem to like fix below ;)

Best regards

Dirk

Quoted 122 lines

Duno why nobody considered the other
archs as well!

---
  lib_avr32/board.c |    2 ++
  lib_i386/board.c  |    2 ++
  lib_m68k/board.c  |    2 ++
  lib_mips/board.c  |    2 ++
  lib_nios/board.c  |    2 ++
  lib_nios2/board.c |    2 ++
  lib_sparc/board.c |    3 +++
  7 files changed, 15 insertions(+), 0 deletions(-)
lib_avr32/board.c +2 -0
index 917ed6c..654f39b 100644
@@ -331,7 +331,9 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
  	/* initialize environment */
  	env_relocate();
 
+#ifdef CONFIG_CMD_NET
  	bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+#endif
 
  	stdio_init();
  	jumptable_init();
lib_i386/board.c +2 -0
index f3b6348..af81cd5 100644
@@ -280,8 +280,10 @@ void board_init_r(gd_t *id, ulong ram_start)
  	show_boot_progress(0x26);
 
 
+#ifdef CONFIG_CMD_NET
  	/* IP Address */
  	bd_data.bi_ip_addr = getenv_IPaddr ("ipaddr");
+#endif
 
  #if defined(CONFIG_PCI)
  	/*
lib_m68k/board.c +2 -0
index 732023d..f0aac98 100644
@@ -545,6 +545,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
  	/* relocate environment function pointers etc. */
  	env_relocate ();
 
+#ifdef CONFIG_CMD_NET
  	/*
  	 * Fill in missing fields of bd_info.
  	 * We do this here, where we have "normal" access to the
@@ -553,6 +554,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
  	 * the environment is in EEPROM.
  	 */
  	bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+#endif
 
  	WATCHDOG_RESET ();
 
lib_mips/board.c +2 -0
index b2d113e..5c35884 100644
@@ -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)
  	/*
lib_nios/board.c +2 -0
index 5d2fb2e..e782884 100644
@@ -121,7 +121,9 @@ void board_init (void)
  	WATCHDOG_RESET ();
  	env_relocate();
 
+#ifdef CONFIG_CMD_NET
  	bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+#endif
 
  	WATCHDOG_RESET ();
  	stdio_init();
lib_nios2/board.c +2 -0
index 41d3297..699de2e 100644
@@ -125,7 +125,9 @@ void board_init (void)
  	WATCHDOG_RESET ();
  	env_relocate();
 
+#ifdef CONFIG_CMD_NET
  	bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+#endif
 
  	WATCHDOG_RESET ();
  	stdio_init();
lib_sparc/board.c +3 -0
index 11eea60..35e7359 100644
@@ -361,8 +361,11 @@ void board_init_f(ulong bootflag)
  	mac_read_from_eeprom();
  #endif
 
+#ifdef CONFIG_CMD_NET
  	/* IP Address */
  	bd->bi_ip_addr = getenv_IPaddr("ipaddr");
+#endif
+
  #if defined(CONFIG_PCI)
  	/*
  	 * Do pci configuration