[U-Boot-Users] Ethernet ports

Detlev Zundel dzu at denx.de
Wed Sep 19 15:45:07 CEST 2007


Hi Yasotha,

> In my Board I have two Ethernet ports. These two Ethernet ports must
> be given two different IP addresses. Through U-Boot code how can I
> set two different IP addresses for these ports?
>
> Where exactly I have to modify in the U-Boot code to achieve this?

We do this already, so you don;t need to change common code.  Inside
U-Boot we only use one ethernet port at a time, so what we do is if we
have multiple ethernet ports that we define the "active" device
through the "ethact" U-Boot environment variable.  Then the usual
environment variables like ipaddr are used for the ethernet commands.

Ah and I nearly forgot, the MACs have to be set through "ethaddr" and
"eth1addr" (,...)

For how to do this in the code you can look at the ocotea (4 ports) or
sequoia (2 ports) code.

Best wishes
  Detlev

-- 
Indeed, the author firmly believes that the best serious work is also
good fun.   We needn't apologize if we enjoy doing research.
                                        -- Donald Knuth
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de




More information about the U-Boot mailing list