
Dear Sanjeev Premi,
In message 1261580085-22547-1-git-send-email-premi@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@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