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

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. */
jumptable_init ();

On 23.12.2009 15:54, Sanjeev Premi 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 Premipremi@ti.com
Acked-by: Dirk Behme dirk.behme@googlemail.com
Tom: Could we get this applied and sent to Wolfgang asap? Mainline Beagle, Pandora, Zoom1and Zoom2 are broken without this.
Best regards
Dirk
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. */
jumptable_init ();

Dear Dirk Behme,
In message 4B3306A7.5010409@googlemail.com you wrote:
On 23.12.2009 15:54, Sanjeev Premi 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 Premipremi@ti.com
Acked-by: Dirk Behme dirk.behme@googlemail.com
Tom: Could we get this applied and sent to Wolfgang asap? Mainline Beagle, Pandora, Zoom1and Zoom2 are broken without this.
Sorry, but I disagree.
Best regards,
Wolfgang Denk

Dear Wolfgang Denk,
On 26.12.2009 00:33, Wolfgang Denk wrote:
Dear Dirk Behme,
In message4B3306A7.5010409@googlemail.com you wrote:
On 23.12.2009 15:54, Sanjeev Premi 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 Premipremi@ti.com
Acked-by: Dirk Behmedirk.behme@googlemail.com
Tom: Could we get this applied and sent to Wolfgang asap? Mainline Beagle, Pandora, Zoom1and Zoom2 are broken without this.
Sorry, but I disagree.
I hope you only disagree on the fix Sanjeev (and others, see below) proposed? And not that it should be fixed asap?
Please note that other architectures (not only boards) seem to have the same issue
http://lists.denx.de/pipermail/u-boot/2009-December/065810.html
Regarding your proposal to implement getenv_IPaddr() for all architectures independent of CONFIG_NET
http://lists.denx.de/pipermail/u-boot/2009-December/065833.html
do you have a proposal where (in which file) this should be done? Sounds like it has to be a global function available for all architectures?
Best regards
Dirk

Dear Dirk Behme,
In message 4B35C49B.4090602@googlemail.com you wrote:
Tom: Could we get this applied and sent to Wolfgang asap? Mainline Beagle, Pandora, Zoom1and Zoom2 are broken without this.
Sorry, but I disagree.
I hope you only disagree on the fix Sanjeev (and others, see below) proposed? And not that it should be fixed asap?
I agree that it should be fixed ASAP. But th fix is not removing this useful functuionality, but instead making this function not depend on CONFIG_NET.
Please note that other architectures (not only boards) seem to have the same issue
Yes, I know.
do you have a proposal where (in which file) this should be done?
Maybe a new file lib_generic/net_utils.c ?
Sounds like it has to be a global function available for all architectures?
Correct.
Best regards,
Wolfgang Denk

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

-----Original Message----- From: Wolfgang Denk [mailto:wd@denx.de] Sent: Saturday, December 26, 2009 5:04 AM To: Premi, Sanjeev Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] omap3: beagle: fix compile error
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.
[sp] I may not have great visibility into other ARM boards, but, aren't the Linux implementations free to init and configure the network on their own? Why would/should they depend/or not upon the u-boot setting an IP address?
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() ?
[sp] The Beagleboard does not have any ethernet port. I believed that CONFIG_CMD_NET was one way of ensuring that the fix could address all boards which do not have ethernet connection. And, hence, would not be setting CONFIG_CMD_NET.
In any case, for beagle I can implement this function to return "0:0:0:0". But would that be useful?
Best regards, Sanjeev
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@denx.de panic: can't find /

Dear Sanjeev,
In message B85A65D85D7EB246BE421B3FB0FBB59301E1C308D2@dbde02.ent.ti.com you wrote:
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.
[sp] I may not have great visibility into other ARM boards, but, aren't the Linux implementations free to init and configure the network on their own? Why would/should they depend/or not upon the u-boot setting an IP address?
It is a standard feature and established policy to have network configuration done only once, in a central place. for example, even when using DHCP or similar, it makes not much sense to run DHCP in U-boot for the kernel image download, and then again in Linux to determine the IP address settings. We do this once, in U-Boot, and then pass the information on to the Linux kernel. Similar for static IP settings.
In this case the board has no Ethernet support in U-Boot, but that does not mean that we should assume that no IP settings might be needed in Linux.
And it makes little sense to me to deviate from the "standard" behavior without real need.
Here the cure is so simple (just enable getenv_IPaddr() always, independent of CONFIG_NET settings) that it's not even worth much of a discussion.
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() ?
[sp] The Beagleboard does not have any ethernet port. I believed that
Yes, but you can still use networking in Linux, for example over USB.
In any case, for beagle I can implement this function to return "0:0:0:0". But would that be useful?
No, it would not, as it is supposed to return the meaningful value.
Also, I definitely do NOT want to see any board specific implemen- tation for a common, global function. That would be even worse.
Best regards,
Wolfgang Denk
participants (4)
-
Dirk Behme
-
Premi, Sanjeev
-
Sanjeev Premi
-
Wolfgang Denk