From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Wed, 19 Sep 2007 15:45:07 +0200 Subject: [U-Boot-Users] Ethernet ports In-Reply-To: (Yasothabalan Ramaswamy-TLS's message of "Wed\, 19 Sep 2007 12\:37\:48 +0530") References: <20070918221148.591AD247FE@gemini.denx.de> <1190155969.4516.42.camel@aeglos.sweden.atmel.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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