public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Call gentenv_IPaddr only if CONFIG_CMD_NET set
@ 2010-01-08 21:19 Albert Aribaud
  2010-01-08 21:26 ` Albert ARIBAUD
  2010-01-08 21:37 ` Ben Warren
  0 siblings, 2 replies; 6+ messages in thread
From: Albert Aribaud @ 2010-01-08 21:19 UTC (permalink / raw)
  To: u-boot

ARM Boards for which CONFIG_CMD_NET is unset still
call getenv_IPaddr from lib_arm/board.c even though
net/net.c (which defines gentenv_IPaddr) will not
be compiled and linked. This patch fixes this by
making the call conditional to CONFIG_CMD_NET.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
---
 lib_arm/board.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib_arm/board.c b/lib_arm/board.c
index e148739..453d660 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -356,8 +356,10 @@ void start_armboot (void)
 	serial_initialize();
 #endif
 
+#ifdef CONFIG_CMD_NET
 	/* IP Address */
 	gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+#endif
 
 	stdio_init ();	/* get the devices list going. */
 
-- 
1.6.4.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] Call gentenv_IPaddr only if CONFIG_CMD_NET set
  2010-01-08 21:19 [U-Boot] [PATCH] Call gentenv_IPaddr only if CONFIG_CMD_NET set Albert Aribaud
@ 2010-01-08 21:26 ` Albert ARIBAUD
  2010-01-08 21:37 ` Ben Warren
  1 sibling, 0 replies; 6+ messages in thread
From: Albert ARIBAUD @ 2010-01-08 21:26 UTC (permalink / raw)
  To: u-boot

Albert Aribaud a ?crit :

> ARM Boards for which CONFIG_CMD_NET is unset still
> call getenv_IPaddr from lib_arm/board.c even though
> net/net.c (which defines gentenv_IPaddr) will not
> be compiled and linked. This patch fixes this by
> making the call conditional to CONFIG_CMD_NET.
> 
> Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>

Regarding this fix I have a SCM related question:

I was hit by this problem while preparing my Orion 5x patch for final 
submission (strangely enough I was not hit before even though I never 
had CONFIG_CMD_NET set).

This means my Orion patches will depend on this one (but I felt I should 
submit it separately as it was totally unrelated to Orion/Ed Mini 
support). Can I submit the Orion patches and just mention the 
dependency? Or do I also do the fix in my Orion patches and let GIT sort 
things out?

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] Call gentenv_IPaddr only if CONFIG_CMD_NET set
  2010-01-08 21:19 [U-Boot] [PATCH] Call gentenv_IPaddr only if CONFIG_CMD_NET set Albert Aribaud
  2010-01-08 21:26 ` Albert ARIBAUD
@ 2010-01-08 21:37 ` Ben Warren
  2010-01-08 21:44   ` Albert ARIBAUD
  1 sibling, 1 reply; 6+ messages in thread
From: Ben Warren @ 2010-01-08 21:37 UTC (permalink / raw)
  To: u-boot

Hi Albert,

Albert Aribaud wrote:
> ARM Boards for which CONFIG_CMD_NET is unset still
> call getenv_IPaddr from lib_arm/board.c even though
> net/net.c (which defines gentenv_IPaddr) will not
> be compiled and linked. This patch fixes this by
> making the call conditional to CONFIG_CMD_NET.
>   
There's already been quite a bit of discussion about this, and another 
fix is in the queue:

http://article.gmane.org/gmane.comp.boot-loaders.u-boot/73200/match=getenv_IPaddr

Correct me if it doesn't fix your problem.

regards,
Ben

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] Call gentenv_IPaddr only if CONFIG_CMD_NET set
  2010-01-08 21:37 ` Ben Warren
@ 2010-01-08 21:44   ` Albert ARIBAUD
  2010-01-08 21:50     ` Ben Warren
  0 siblings, 1 reply; 6+ messages in thread
From: Albert ARIBAUD @ 2010-01-08 21:44 UTC (permalink / raw)
  To: u-boot

Ben Warren a ?crit :
> Hi Albert,
> 
> Albert Aribaud wrote:
>> ARM Boards for which CONFIG_CMD_NET is unset still
>> call getenv_IPaddr from lib_arm/board.c even though
>> net/net.c (which defines gentenv_IPaddr) will not
>> be compiled and linked. This patch fixes this by
>> making the call conditional to CONFIG_CMD_NET.
>>   
> There's already been quite a bit of discussion about this, and another 
> fix is in the queue:
> 
> http://article.gmane.org/gmane.comp.boot-loaders.u-boot/73200/match=getenv_IPaddr 
> 
> 
> Correct me if it doesn't fix your problem.
> 
> regards,
> Ben

Thanks Ben, I obviously missed this... I can try and mumble an excuse 
about it being too near New Year's Eve.

As long as it allows building with ARM and no CONFIG_CMD_NET, it's fine 
with me.

Does its being "in the queue" (but obviously not committed yet as I'd 
pulled and checked before posting) allow me to submit patches dependent 
on it?

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] Call gentenv_IPaddr only if CONFIG_CMD_NET set
  2010-01-08 21:44   ` Albert ARIBAUD
@ 2010-01-08 21:50     ` Ben Warren
  2010-01-08 22:11       ` Albert ARIBAUD
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Warren @ 2010-01-08 21:50 UTC (permalink / raw)
  To: u-boot

Albert ARIBAUD wrote:
> Ben Warren a ?crit :
>> Hi Albert,
>>
>> Albert Aribaud wrote:
>>> ARM Boards for which CONFIG_CMD_NET is unset still
>>> call getenv_IPaddr from lib_arm/board.c even though
>>> net/net.c (which defines gentenv_IPaddr) will not
>>> be compiled and linked. This patch fixes this by
>>> making the call conditional to CONFIG_CMD_NET.
>>>   
>> There's already been quite a bit of discussion about this, and 
>> another fix is in the queue:
>>
>> http://article.gmane.org/gmane.comp.boot-loaders.u-boot/73200/match=getenv_IPaddr 
>>
>>
>> Correct me if it doesn't fix your problem.
>>
>> regards,
>> Ben
>
> Thanks Ben, I obviously missed this... I can try and mumble an excuse 
> about it being too near New Year's Eve.
>
Pas de probleme. 
> As long as it allows building with ARM and no CONFIG_CMD_NET, it's 
> fine with me.
>
> Does its being "in the queue" (but obviously not committed yet as I'd 
> pulled and checked before posting) allow me to submit patches 
> dependent on it?
>
I've asked WD to apply the patch, but he hasn't acted yet.  Do your 
patches affect the files touched by this patch, or are you concerned 
about the link error (undefined reference to 'getenv_IPaddr')?  If the 
former, don't submit yet.  If the latter, go ahead.
> Amicalement,
regards,
Ben

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] Call gentenv_IPaddr only if CONFIG_CMD_NET set
  2010-01-08 21:50     ` Ben Warren
@ 2010-01-08 22:11       ` Albert ARIBAUD
  0 siblings, 0 replies; 6+ messages in thread
From: Albert ARIBAUD @ 2010-01-08 22:11 UTC (permalink / raw)
  To: u-boot

Ben Warren a ?crit :

>> Does its being "in the queue" (but obviously not committed yet as I'd 
>> pulled and checked before posting) allow me to submit patches 
>> dependent on it?
>>
> I've asked WD to apply the patch, but he hasn't acted yet.  Do your 
> patches affect the files touched by this patch, or are you concerned 
> about the link error (undefined reference to 'getenv_IPaddr')?  If the 
> former, don't submit yet.  If the latter, go ahead.

I'll go ahead then: it's only the link problem.

> regards,
> Ben

Thanks again Ben!

Amicalement,
-- 
Albert.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-01-08 22:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-08 21:19 [U-Boot] [PATCH] Call gentenv_IPaddr only if CONFIG_CMD_NET set Albert Aribaud
2010-01-08 21:26 ` Albert ARIBAUD
2010-01-08 21:37 ` Ben Warren
2010-01-08 21:44   ` Albert ARIBAUD
2010-01-08 21:50     ` Ben Warren
2010-01-08 22:11       ` Albert ARIBAUD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox