[U-Boot] [PATCH] omap3: beagle: fix compile error

Wolfgang Denk wd at denx.de
Sat Dec 26 00:33:43 CET 2009


Dear Sanjeev Premi,

In message <1261580085-22547-1-git-send-email-premi at ti.com> you wrote:
> The configuration for beagle undefs CONFIG_CMD_NET.
> This leads to following error:
> 
> lib_arm/libarm.a(board.o): In function `start_armboot':
> /home/premi/u-boot/lib_arm/board.c:360: undefined reference
>  to `getenv_IPaddr'
> make: *** [u-boot] Error 1
> 
> This patch fixes the error by including offending line
> in appropriate ifdef.
> 
> Signed-off-by: Sanjeev Premi <premi at ti.com>
> ---
>  lib_arm/board.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/lib_arm/board.c b/lib_arm/board.c
> index e148739..e289fc9 100644
> --- a/lib_arm/board.c
> +++ b/lib_arm/board.c
> @@ -357,8 +357,9 @@ void start_armboot (void)
>  #endif
>  
>  	/* IP Address */
> +#ifdef CONFIG_CMD_NET
>  	gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
> -
> +#endif
>  	stdio_init ();	/* get the devices list going. */

I don't think this is the right way to fix the problem.

This is global ARM code, and there may well be ARM boards out there
that do not have network support in U-Boot, but they do so in Linux,
which makes it desirable to be able to port network configuration
(like the IP address) to the Linux kernel.

We should not make the passing of the IP configuration to Linux
dependent on U-Boot features / settings.

Why cannot you simply implement getenv_IPaddr() ?


I think the right way to fix this issue is to make getenv_IPaddr()
always available, independent of CONFIG_NET.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
panic: can't find /


More information about the U-Boot mailing list