* [U-Boot] [PATCH] omap3: beagle: fix compile error
@ 2009-12-23 14:54 Sanjeev Premi
2009-12-24 6:13 ` Dirk Behme
2009-12-25 23:33 ` Wolfgang Denk
0 siblings, 2 replies; 8+ messages in thread
From: Sanjeev Premi @ 2009-12-23 14:54 UTC (permalink / raw)
To: u-boot
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 ();
--
1.6.2.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] omap3: beagle: fix compile error
2009-12-23 14:54 [U-Boot] [PATCH] omap3: beagle: fix compile error Sanjeev Premi
@ 2009-12-24 6:13 ` Dirk Behme
2009-12-25 23:33 ` Wolfgang Denk
2009-12-25 23:33 ` Wolfgang Denk
1 sibling, 1 reply; 8+ messages in thread
From: Dirk Behme @ 2009-12-24 6:13 UTC (permalink / raw)
To: u-boot
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 Premi<premi@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 ();
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] omap3: beagle: fix compile error
2009-12-23 14:54 [U-Boot] [PATCH] omap3: beagle: fix compile error Sanjeev Premi
2009-12-24 6:13 ` Dirk Behme
@ 2009-12-25 23:33 ` Wolfgang Denk
2009-12-28 12:42 ` Premi, Sanjeev
1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2009-12-25 23:33 UTC (permalink / raw)
To: u-boot
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
--
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 /
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] omap3: beagle: fix compile error
2009-12-24 6:13 ` Dirk Behme
@ 2009-12-25 23:33 ` Wolfgang Denk
2009-12-26 8:08 ` Dirk Behme
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2009-12-25 23:33 UTC (permalink / raw)
To: u-boot
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 Premi<premi@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
--
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
"UNIX was not designed to stop you from doing stupid things, because
that would also stop you from doing clever things." - Doug Gwyn
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] omap3: beagle: fix compile error
2009-12-25 23:33 ` Wolfgang Denk
@ 2009-12-26 8:08 ` Dirk Behme
2009-12-28 19:38 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Dirk Behme @ 2009-12-26 8:08 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
On 26.12.2009 00:33, Wolfgang Denk wrote:
> 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 Premi<premi@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.
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] omap3: beagle: fix compile error
2009-12-25 23:33 ` Wolfgang Denk
@ 2009-12-28 12:42 ` Premi, Sanjeev
2009-12-28 19:34 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Premi, Sanjeev @ 2009-12-28 12:42 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Wolfgang Denk [mailto:wd at denx.de]
> Sent: Saturday, December 26, 2009 5:04 AM
> To: Premi, Sanjeev
> Cc: u-boot at 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 at denx.de
> panic: can't find /
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] omap3: beagle: fix compile error
2009-12-28 12:42 ` Premi, Sanjeev
@ 2009-12-28 19:34 ` Wolfgang Denk
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2009-12-28 19:34 UTC (permalink / raw)
To: u-boot
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
--
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
"There is no distinctly American criminal class except Congress."
- Mark Twain
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH] omap3: beagle: fix compile error
2009-12-26 8:08 ` Dirk Behme
@ 2009-12-28 19:38 ` Wolfgang Denk
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2009-12-28 19:38 UTC (permalink / raw)
To: u-boot
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
--
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
God runs electromagnetics by wave theory on Monday, Wednesday, and
Friday, and the Devil runs them by quantum theory on Tuesday, Thurs-
day, and Saturday. -- William Bragg
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-12-28 19:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-23 14:54 [U-Boot] [PATCH] omap3: beagle: fix compile error Sanjeev Premi
2009-12-24 6:13 ` Dirk Behme
2009-12-25 23:33 ` Wolfgang Denk
2009-12-26 8:08 ` Dirk Behme
2009-12-28 19:38 ` Wolfgang Denk
2009-12-25 23:33 ` Wolfgang Denk
2009-12-28 12:42 ` Premi, Sanjeev
2009-12-28 19:34 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.