[U-Boot] [PATCH] AVR32, i386, m68k, MIPS, NIOS, NIOS2 and SPARC: Fix building without CONFIG_CMD_NET

Dirk Behme dirk.behme at googlemail.com
Sat Dec 26 09:11:47 CET 2009


On 24.12.2009 03:22, Marcel Ziswiler wrote:
> 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

> Duno why nobody considered the other
> archs as well!
>
> Signed-off-by: Marcel Ziswiler<marcel.ziswiler at noser.com>
> ---
>   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(-)
>
> diff --git a/lib_avr32/board.c b/lib_avr32/board.c
> index 917ed6c..654f39b 100644
> --- a/lib_avr32/board.c
> +++ b/lib_avr32/board.c
> @@ -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();
> diff --git a/lib_i386/board.c b/lib_i386/board.c
> index f3b6348..af81cd5 100644
> --- a/lib_i386/board.c
> +++ b/lib_i386/board.c
> @@ -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)
>   	/*
> diff --git a/lib_m68k/board.c b/lib_m68k/board.c
> index 732023d..f0aac98 100644
> --- a/lib_m68k/board.c
> +++ b/lib_m68k/board.c
> @@ -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 ();
>
> 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)
>   	/*
> diff --git a/lib_nios/board.c b/lib_nios/board.c
> index 5d2fb2e..e782884 100644
> --- a/lib_nios/board.c
> +++ b/lib_nios/board.c
> @@ -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();
> diff --git a/lib_nios2/board.c b/lib_nios2/board.c
> index 41d3297..699de2e 100644
> --- a/lib_nios2/board.c
> +++ b/lib_nios2/board.c
> @@ -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();
> diff --git a/lib_sparc/board.c b/lib_sparc/board.c
> index 11eea60..35e7359 100644
> --- a/lib_sparc/board.c
> +++ b/lib_sparc/board.c
> @@ -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



More information about the U-Boot mailing list