* [U-Boot-Users] CONFIG_NET_MULTI
@ 2008-03-10 10:37 Alex Raimondi
2008-03-10 11:17 ` Ben Warren
0 siblings, 1 reply; 3+ messages in thread
From: Alex Raimondi @ 2008-03-10 10:37 UTC (permalink / raw)
To: u-boot
Hi
I don't understand CONFIG_CMD_NET and CONFIG_NET_MULTI.
I would expect CONFIG_CMD_NET to be defined whenever I want to have
network support in U-Boot, right?
And CONFIG_NET_MULTI is defined when I have more then one network interface?
I try to adapt U-Boot to our new AVR32 based board. AVR32 has two
interfaces, but only one is actually implemented on our board.
CONFIG_CMD_NET is defined per default. If I undefine CONFIG_NET_MULTI I
get linker error about missing functions.
With CONFIG_NET_MULTI defined everything works fine. Should this be like
this?
Looking for a solution and/or the cause of my problem I found that in
net/etc.c there is something like this
#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
.... some code ..
#ifdef CONFIG_NET_MULTI
... code ...
#endif Ale
... code ....
#elif defined(CONFIG_CMD_NET) && !defined(CONFIG_NET_MULTI)
....
#endif
In the if-branch CONFIG_NET_MULTI is defined per condition of this
branch. Why some additional ifdef CONFIG_NET_MULTI?
Alex
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] CONFIG_NET_MULTI
@ 2008-03-10 10:37 Alex
0 siblings, 0 replies; 3+ messages in thread
From: Alex @ 2008-03-10 10:37 UTC (permalink / raw)
To: u-boot
Hi
I don't understand CONFIG_CMD_NET and CONFIG_NET_MULTI.
I would expect CONFIG_CMD_NET to be defined whenever I want to have
network support in U-Boot, right?
And CONFIG_NET_MULTI is defined when I have more then one network interface?
I try to adapt U-Boot to our new AVR32 based board. AVR32 has two
interfaces, but only one is actually implemented on our board.
CONFIG_CMD_NET is defined per default. If I undefine CONFIG_NET_MULTI I
get linker error about missing functions.
With CONFIG_NET_MULTI defined everything works fine. Should this be like
this?
Looking for a solution and/or the cause of my problem I found that in
net/etc.c there is something like this
#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
.... some code ..
#ifdef CONFIG_NET_MULTI
... code ...
#endif Ale
... code ....
#elif defined(CONFIG_CMD_NET) && !defined(CONFIG_NET_MULTI)
....
#endif
In the if-branch CONFIG_NET_MULTI is defined per condition of this
branch. Why some additional ifdef CONFIG_NET_MULTI?
Alex
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] CONFIG_NET_MULTI
2008-03-10 10:37 Alex Raimondi
@ 2008-03-10 11:17 ` Ben Warren
0 siblings, 0 replies; 3+ messages in thread
From: Ben Warren @ 2008-03-10 11:17 UTC (permalink / raw)
To: u-boot
On Mon, Mar 10, 2008 at 6:37 AM, Alex Raimondi
<alex.raimondi@miromico.ch> wrote:
> Hi
>
> I don't understand CONFIG_CMD_NET and CONFIG_NET_MULTI.
>
It's confusing, true.
> I would expect CONFIG_CMD_NET to be defined whenever I want to have
> network support in U-Boot, right?
>
> And CONFIG_NET_MULTI is defined when I have more then one network interface?
>
That's how it should work, but as you're finding out it's not quite right.
> I try to adapt U-Boot to our new AVR32 based board. AVR32 has two
> interfaces, but only one is actually implemented on our board.
>
> CONFIG_CMD_NET is defined per default. If I undefine CONFIG_NET_MULTI I
> get linker error about missing functions.
> With CONFIG_NET_MULTI defined everything works fine. Should this be like
> this?
>
Probably. As you point out, there are two paths in net/net.c, and
most of the newer Ethernet controllers are only handled in the one
where CONFIG_NET_MULTI is defined. For now, just define
CONFIG_NET_MULTI, even if you only have one interface. Hopefully
we'll get this cleaned up in the near future, but as you can imagine
there are massive 'backwards-compatible' implications.
regards,
Ben
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-10 11:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-10 10:37 [U-Boot-Users] CONFIG_NET_MULTI Alex
-- strict thread matches above, loose matches on Subject: below --
2008-03-10 10:37 Alex Raimondi
2008-03-10 11:17 ` Ben Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox