public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Ethernet port
@ 2007-09-18 11:41 Yasothabalan
  2007-09-18 21:19 ` urwithsughosh at gmail.com
  0 siblings, 1 reply; 15+ messages in thread
From: Yasothabalan @ 2007-09-18 11:41 UTC (permalink / raw)
  To: u-boot


Hi all,

 

Can anyone say me whether U-Boot supports two Ethernet ports?

If so, how to set the IP and MAC address for the second one.

 

Regards,

Yasotha Balan R

 



DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070918/a6f61490/attachment.htm 

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

* [U-Boot-Users] Ethernet port
  2007-09-18 21:19 ` urwithsughosh at gmail.com
@ 2007-09-18 12:19   ` Yasothabalan
  2007-09-18 22:48     ` urwithsughosh at gmail.com
  2007-09-18 19:09   ` Wolfgang Denk
  1 sibling, 1 reply; 15+ messages in thread
From: Yasothabalan @ 2007-09-18 12:19 UTC (permalink / raw)
  To: u-boot


Thanks sughosh,

So we can set two Ethernet addresses. 

How can I set two different IP addresses for these two ports?
[Two different IPs
Two different GATEWAYs
Two different SERVERIPs]

Regards,
Yasotha Balan R

 
-----Original Message-----
From: urwithsughosh@gmail.com [mailto:urwithsughosh at gmail.com] 
Sent: Wednesday, September 19, 2007 2:49 AM
To: Yasothabalan Ramaswamy-TLS,Chennai
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] Ethernet port

On Tue Sep 18, 2007 at 05:11:44PM +0530, Yasothabalan
Ramaswamy-TLS,Chennai wrote:

> Can anyone say me whether U-Boot supports two Ethernet ports?

  If your processor supports, u-boot supports :-)

> If so, how to set the IP and MAC address for the second one.

  Check the config file for the board you are referring. For eg, the
  ADS board i refer to have the following configurations for setting
  the ip and the mac respectively.

  #define CONFIG_IPADDR    192.168.1.253

  #define CONFIG_ETHADDR   00:E0:0C:00:00:FD

-- 
sughosh

DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have 
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------

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

* [U-Boot-Users] Ethernet port
  2007-09-18 22:48     ` urwithsughosh at gmail.com
@ 2007-09-18 13:55       ` Yasothabalan
       [not found]         ` <CE54F2377C0FB8439A290BF5A88BF13D066727E0@CHN-HCLT-EVS01.HCLT.CORP.HCL .IN>
  0 siblings, 1 reply; 15+ messages in thread
From: Yasothabalan @ 2007-09-18 13:55 UTC (permalink / raw)
  To: u-boot


Thanks sughosh.

Here in my board I have two Ethernet ports;
So now I have to set two different IP addresses for these ports.

As when the U-Boot prompt comes up we can set the IP address as,

=> set ipaddr 10.128.19.1
=> set ethaddr aa:bb:cc:ee:ff:gg

So above setting is valid only for single Ethernet port.

My doubt how to set IP address for another Ethernet port or what is the
method to do that? 


Regards,
Yasotha Balan R

 

-----Original Message-----
From: urwithsughosh@gmail.com [mailto:urwithsughosh at gmail.com] 
Sent: Wednesday, September 19, 2007 4:19 AM
To: Yasothabalan Ramaswamy-TLS,Chennai
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] Ethernet port


 Hello, 

On Tue Sep 18, 2007 at 05:49:44PM +0530, Yasothabalan
Ramaswamy-TLS,Chennai wrote:

> So we can set two Ethernet addresses. 

  Forgot to mention one thing in the previous mail though. It is not
  recommended to configure the mac addresses, using this method. If
  you flash the same u-boot image on multiple boards (which you most
  probably will), the ethernet controllers on all the boards will end
  up having the same mac addresses, which is something you don't
  want. You can configure the mac addresses through the environment
  settings, for each board. Check this,

  http://www.nabble.com/Changing-ethaddr-tf4192505.html#a11927308


> How can I set two different IP addresses for these two ports?
> [Two different IPs
> Two different GATEWAYs
> Two different SERVERIPs]
 
  I'm not sure what you want to do, but AFAIK, you have a single
  ethernet controller which is active, set by the 'ethact' env
  variable. This is used to send/receive the traffic. So i'm not sure
  why you require multiple ip/gateways and serverip's to be set.

-- 
sughosh

DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have 
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------

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

* [U-Boot-Users] Ethernet port
       [not found]         ` <CE54F2377C0FB8439A290BF5A88BF13D066727E0@CHN-HCLT-EVS01.HCLT.CORP.HCL .IN>
@ 2007-09-18 14:17           ` Ramasamy C
  2007-09-18 19:13             ` Wolfgang Denk
  0 siblings, 1 reply; 15+ messages in thread
From: Ramasamy C @ 2007-09-18 14:17 UTC (permalink / raw)
  To: u-boot


> Here in my board I have two Ethernet ports;
> So now I have to set two different IP addresses for these ports.
>
> As when the U-Boot prompt comes up we can set the IP address as,
>
> => set ipaddr 10.128.19.1
> => set ethaddr aa:bb:cc:ee:ff:gg
>
> So above setting is valid only for single Ethernet port.
>
Yes.

> My doubt how to set IP address for another Ethernet port or what is the
> method to do that?
>
Presently U-Boot supports only one active Ethernet configuration at a
time. In case if you wish to use multiple ethernet ports with same or
different IP/MAC addresses, it is _not_ possible. In case if you wish to
test other ethernet ports, this can be done by changing the 'ethact'
value. Though this cannot be done simultaneously.


Ramasamy C
-- 
"Thought Ought not be Caught or Bought to be Faught till Nought." -
Philosophical Nights

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

* [U-Boot-Users] Ethernet port
  2007-09-18 21:19 ` urwithsughosh at gmail.com
  2007-09-18 12:19   ` Yasothabalan
@ 2007-09-18 19:09   ` Wolfgang Denk
  2007-09-18 20:57     ` Ulf Samuelsson
  1 sibling, 1 reply; 15+ messages in thread
From: Wolfgang Denk @ 2007-09-18 19:09 UTC (permalink / raw)
  To: u-boot

In message <20070918211917.GJ25557@GNU> you wrote:
> 
>   Check the config file for the board you are referring. For eg, the
>   ADS board i refer to have the following configurations for setting
>   the ip and the mac respectively.
> 
>   #define CONFIG_IPADDR    192.168.1.253
> 
>   #define CONFIG_ETHADDR   00:E0:0C:00:00:FD

It is a terrible bad idea to set the IP address and especially the MAC
address of your board in the config file, as then all your boards will
share the same address, which will cause only trouble.

DO NOT DO THIS!!!

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's no future in time travel.

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

* [U-Boot-Users] Ethernet port
  2007-09-18 14:17           ` Ramasamy C
@ 2007-09-18 19:13             ` Wolfgang Denk
  0 siblings, 0 replies; 15+ messages in thread
From: Wolfgang Denk @ 2007-09-18 19:13 UTC (permalink / raw)
  To: u-boot

In message <62316.202.144.30.226.1190125053.squirrel@mail.gdatech.co.in> you wrote:
> 
> Presently U-Boot supports only one active Ethernet configuration at a
> time. In case if you wish to use multiple ethernet ports with same or
> different IP/MAC addresses, it is _not_ possible. In case if you wish to

Of course it is possible.

If you use DHCP/BOOTP to assign the addresses it's working out of the
box because the server will provide IP config settings depending on
your MAC address.

If you use fixed configurations with manual swithing of the
interfaces, the you can also manualy redefine the network config
variables.

With automatic switching, you have to extend the code.


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
Reader, suppose you were an idiot. And suppose you were a  member  of
Congress. But I repeat myself.                           - Mark Twain

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

* [U-Boot-Users] Ethernet port
  2007-09-18 19:09   ` Wolfgang Denk
@ 2007-09-18 20:57     ` Ulf Samuelsson
  2007-09-18 22:11       ` Wolfgang Denk
  0 siblings, 1 reply; 15+ messages in thread
From: Ulf Samuelsson @ 2007-09-18 20:57 UTC (permalink / raw)
  To: u-boot

tis 2007-09-18 klockan 21:09 +0200 skrev Wolfgang Denk:
> In message <20070918211917.GJ25557@GNU> you wrote:
> > 
> >   Check the config file for the board you are referring. For eg, the
> >   ADS board i refer to have the following configurations for setting
> >   the ip and the mac respectively.
> > 
> >   #define CONFIG_IPADDR    192.168.1.253
> > 
> >   #define CONFIG_ETHADDR   00:E0:0C:00:00:FD
> 
> It is a terrible bad idea to set the IP address and especially the MAC
> address of your board in the config file, as then all your boards will
> share the same address, which will cause only trouble.
> 
> DO NOT DO THIS!!!
> 

Unless you use this functionality to simplify factory programming of the
device.

By having a compile time setup of ethaddr/ipaddr/serverip, you can
easily connect to a production PC using a twisted cable.

The production PC is equipped with a secondary ethernet board which
is configured as "serverip".

If this "feature" is used, it must be possible to reconfigure
the ethaddr/ipaddr combination to something unique.
You do not want to ship this to end customers.
An autoscript at the production PC can do this as part of the production
programming.

it is probably advisable to disallow booting the linux kernel if
the ethaddr/ipaddr has not changed.



> Best regards,
> 
> Wolfgang Denk
> 
-- 
Best Regards,
Ulf Samuelsson

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

* [U-Boot-Users] Ethernet port
  2007-09-18 11:41 [U-Boot-Users] Ethernet port Yasothabalan
@ 2007-09-18 21:19 ` urwithsughosh at gmail.com
  2007-09-18 12:19   ` Yasothabalan
  2007-09-18 19:09   ` Wolfgang Denk
  0 siblings, 2 replies; 15+ messages in thread
From: urwithsughosh at gmail.com @ 2007-09-18 21:19 UTC (permalink / raw)
  To: u-boot

On Tue Sep 18, 2007 at 05:11:44PM +0530, Yasothabalan Ramaswamy-TLS,Chennai wrote:

> Can anyone say me whether U-Boot supports two Ethernet ports?

  If your processor supports, u-boot supports :-)

> If so, how to set the IP and MAC address for the second one.

  Check the config file for the board you are referring. For eg, the
  ADS board i refer to have the following configurations for setting
  the ip and the mac respectively.

  #define CONFIG_IPADDR    192.168.1.253

  #define CONFIG_ETHADDR   00:E0:0C:00:00:FD

-- 
sughosh

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

* [U-Boot-Users] Ethernet port
  2007-09-18 20:57     ` Ulf Samuelsson
@ 2007-09-18 22:11       ` Wolfgang Denk
  2007-09-18 22:52         ` Ulf Samuelsson
  0 siblings, 1 reply; 15+ messages in thread
From: Wolfgang Denk @ 2007-09-18 22:11 UTC (permalink / raw)
  To: u-boot

In message <1190149063.4516.9.camel@aeglos.sweden.atmel.com> you wrote:
>
> > It is a terrible bad idea to set the IP address and especially the MAC
> > address of your board in the config file, as then all your boards will
> > share the same address, which will cause only trouble.
> > 
> > DO NOT DO THIS!!!
> 
> Unless you use this functionality to simplify factory programming of the
> device.

It's still a very stupid thing to do, as you buy your own convenience
at the cost of your customers - it's they who will have the problems,
not  you,  obviously.  And  it's  trivial  to  set  up  a  production
envrionment  where  each and every board has it's own specific serial
number, MAC address atf. in the U-Boot environment.

Don't tell me it could not be done, or would be too complicated. It's
all there, just use it.

> By having a compile time setup of ethaddr/ipaddr/serverip, you can
> easily connect to a production PC using a twisted cable.

It is NOT necessary to do this at compile time.

> If this "feature" is used, it must be possible to reconfigure
> the ethaddr/ipaddr combination to something unique.
> You do not want to ship this to end customers.

Then you have to make ethaddr and serial# unprotected, which IMHO  is
a bad idea either. I don't want to have users messing around with the
serial  number.  If  you intend for such a setup, you should at least
use the CONFIG_OVERWRITE_ETHADDR_ONCE feature.

> An autoscript at the production PC can do this as part of the production
> programming.

There are much easier ways which  don't  require  console  access  or
booting  the system. See "board/tqm8xx/load_sernum_ethaddr.c" for one
example wher ethis information can be written by the same programming
sequence that programs the U-Boot image - it just programs some small
data block in a second step.

> it is probably advisable to disallow booting the linux kernel if
> the ethaddr/ipaddr has not changed.

Too complicated, and not necessary.

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
A committee is a group that keeps the minutes and loses hours.
                                                      -- Milton Berle

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

* [U-Boot-Users] Ethernet port
  2007-09-18 12:19   ` Yasothabalan
@ 2007-09-18 22:48     ` urwithsughosh at gmail.com
  2007-09-18 13:55       ` Yasothabalan
  0 siblings, 1 reply; 15+ messages in thread
From: urwithsughosh at gmail.com @ 2007-09-18 22:48 UTC (permalink / raw)
  To: u-boot

 Hello, 

On Tue Sep 18, 2007 at 05:49:44PM +0530, Yasothabalan Ramaswamy-TLS,Chennai wrote:

> So we can set two Ethernet addresses. 

  Forgot to mention one thing in the previous mail though. It is not
  recommended to configure the mac addresses, using this method. If
  you flash the same u-boot image on multiple boards (which you most
  probably will), the ethernet controllers on all the boards will end
  up having the same mac addresses, which is something you don't
  want. You can configure the mac addresses through the environment
  settings, for each board. Check this,

  http://www.nabble.com/Changing-ethaddr-tf4192505.html#a11927308


> How can I set two different IP addresses for these two ports?
> [Two different IPs
> Two different GATEWAYs
> Two different SERVERIPs]
 
  I'm not sure what you want to do, but AFAIK, you have a single
  ethernet controller which is active, set by the 'ethact' env
  variable. This is used to send/receive the traffic. So i'm not sure
  why you require multiple ip/gateways and serverip's to be set.

-- 
sughosh

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

* [U-Boot-Users] Ethernet port
  2007-09-18 22:11       ` Wolfgang Denk
@ 2007-09-18 22:52         ` Ulf Samuelsson
  2007-09-19  7:07           ` [U-Boot-Users] Ethernet ports Yasothabalan
  2007-09-21  0:02           ` [U-Boot-Users] At91rm9200 buildroot Leonid
  0 siblings, 2 replies; 15+ messages in thread
From: Ulf Samuelsson @ 2007-09-18 22:52 UTC (permalink / raw)
  To: u-boot

ons 2007-09-19 klockan 00:11 +0200 skrev Wolfgang Denk:
> In message <1190149063.4516.9.camel@aeglos.sweden.atmel.com> you wrote:
> >
> > > It is a terrible bad idea to set the IP address and especially the MAC
> > > address of your board in the config file, as then all your boards will
> > > share the same address, which will cause only trouble.
> > > 
> > > DO NOT DO THIS!!!
> > 
> > Unless you use this functionality to simplify factory programming of the
> > device.
> 
> It's still a very stupid thing to do, as you buy your own convenience
> at the cost of your customers.

You assume that the customers will see boards with this configuration.
I see this feature should be used by contract manufactures which
wants a simple environment.

The CEM will have test equipment containing preconfigured U-boot.
The CPU BootROM will download this code to SDRAM and execute.

The production system will generate a customized autoscript for each
board setting the ipaddr/ethaddr to a unique value.


The preconfigured bootcmd will download this autoscript, 
which will download at91bootstrap, generic u-boot, linux and
root-fs and program into flash and at the end, set the 
environment variables.

No need for any serial communication.


>
>  - it's they who will have the problems,
> not  you,  obviously.  And  it's  trivial  to  set  up  a  production
> envrionment  where  each and every board has it's own specific serial
> number, MAC address atf. in the U-Boot environment.

Add the requirement - no serial port, and you may understand.

> 
> Don't tell me it could not be done, or would be too complicated. It's
> all there, just use it.


> > By having a compile time setup of ethaddr/ipaddr/serverip, you can
> > easily connect to a production PC using a twisted cable.
> 
> It is NOT necessary to do this at compile time.
> 
> > If this "feature" is used, it must be possible to reconfigure
> > the ethaddr/ipaddr combination to something unique.
> > You do not want to ship this to end customers.
> 
> Then you have to make ethaddr and serial# unprotected, which IMHO  is
> a bad idea either. I don't want to have users messing around with the
> serial  number.  If  you intend for such a setup, you should at least
> use the CONFIG_OVERWRITE_ETHADDR_ONCE feature.

Yes, once the final data is there, it should not be changeable.

> 
> > An autoscript at the production PC can do this as part of the production
> > programming.
> 
> There are much easier ways which  don't  require  console  access  or
> booting  the system. See "board/tqm8xx/load_sernum_ethaddr.c" for one
> example wher ethis information can be written by the same programming
> sequence that programs the U-Boot image - it just programs some small
> data block in a second step.

A restriction is that at production time, all flash memories are clean.
You CAN'T have a small configuration area in a clean flash...
You CAN'T program that area into the flash using a serial port
or JTAG, because there are no ports in the system.

The production system will force the CPU to boot from the BootROM,
and then a temporary U-boot is loaded to SDRAM over the SPI bus.
The temporary U-boot is stored on a memory card (SD/MMC/Dataflashcard) 
or fixed SPI memory in the test system.

Since the on-board flash memory will never be programmed with
the compile time ipaddr/ethaddr, there is really no risk
of duplication of addresses...


> > it is probably advisable to disallow booting the linux kernel if
> > the ethaddr/ipaddr has not changed.
> 
> Too complicated, and not necessary.

Yes, comparing two strings is really rocket science.

> 
> Best regards,
> 
> Wolfgang Denk
> 
-- 
Best Regards,
Ulf Samuelsson          mail:   ulf at atmel.com
Atmel Nordic AB
Box 2033, 174 52 Sundbyberg
Kavalleriv?gen 24, 174 58 Sundbyberg
Sweden
Tel:    +46 8 441 54 22 GSM:    +46 706 224457

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

* [U-Boot-Users] Ethernet ports
  2007-09-18 22:52         ` Ulf Samuelsson
@ 2007-09-19  7:07           ` Yasothabalan
  2007-09-19 13:45             ` Detlev Zundel
  2007-09-19 18:07             ` Wolfgang Denk
  2007-09-21  0:02           ` [U-Boot-Users] At91rm9200 buildroot Leonid
  1 sibling, 2 replies; 15+ messages in thread
From: Yasothabalan @ 2007-09-19  7:07 UTC (permalink / raw)
  To: u-boot


Hello all,

Thanks Wolfgang Denk, Ben and Ulf Samuelsson.

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?

Regards,
Yasotha Balan R
 

-----Original Message-----
From: Ulf Samuelsson [mailto:ulf at atmel.com] 
Sent: Wednesday, September 19, 2007 4:23 AM
To: Wolfgang Denk
Cc: u-boot-users at lists.sourceforge.net; Yasothabalan Ramaswamy-TLS,Chennai
Subject: Re: [U-Boot-Users] Ethernet port

ons 2007-09-19 klockan 00:11 +0200 skrev Wolfgang Denk:
> In message <1190149063.4516.9.camel@aeglos.sweden.atmel.com> you wrote:
> >
> > > It is a terrible bad idea to set the IP address and especially the MAC
> > > address of your board in the config file, as then all your boards will
> > > share the same address, which will cause only trouble.
> > > 
> > > DO NOT DO THIS!!!
> > 
> > Unless you use this functionality to simplify factory programming of the
> > device.
> 
> It's still a very stupid thing to do, as you buy your own convenience
> at the cost of your customers.

You assume that the customers will see boards with this configuration.
I see this feature should be used by contract manufactures which
wants a simple environment.

The CEM will have test equipment containing preconfigured U-boot.
The CPU BootROM will download this code to SDRAM and execute.

The production system will generate a customized autoscript for each
board setting the ipaddr/ethaddr to a unique value.


The preconfigured bootcmd will download this autoscript, 
which will download at91bootstrap, generic u-boot, linux and
root-fs and program into flash and at the end, set the 
environment variables.

No need for any serial communication.


>
>  - it's they who will have the problems,
> not  you,  obviously.  And  it's  trivial  to  set  up  a  production
> envrionment  where  each and every board has it's own specific serial
> number, MAC address atf. in the U-Boot environment.

Add the requirement - no serial port, and you may understand.

> 
> Don't tell me it could not be done, or would be too complicated. It's
> all there, just use it.


> > By having a compile time setup of ethaddr/ipaddr/serverip, you can
> > easily connect to a production PC using a twisted cable.
> 
> It is NOT necessary to do this at compile time.
> 
> > If this "feature" is used, it must be possible to reconfigure
> > the ethaddr/ipaddr combination to something unique.
> > You do not want to ship this to end customers.
> 
> Then you have to make ethaddr and serial# unprotected, which IMHO  is
> a bad idea either. I don't want to have users messing around with the
> serial  number.  If  you intend for such a setup, you should at least
> use the CONFIG_OVERWRITE_ETHADDR_ONCE feature.

Yes, once the final data is there, it should not be changeable.

> 
> > An autoscript at the production PC can do this as part of the production
> > programming.
> 
> There are much easier ways which  don't  require  console  access  or
> booting  the system. See "board/tqm8xx/load_sernum_ethaddr.c" for one
> example wher ethis information can be written by the same programming
> sequence that programs the U-Boot image - it just programs some small
> data block in a second step.

A restriction is that at production time, all flash memories are clean.
You CAN'T have a small configuration area in a clean flash...
You CAN'T program that area into the flash using a serial port
or JTAG, because there are no ports in the system.

The production system will force the CPU to boot from the BootROM,
and then a temporary U-boot is loaded to SDRAM over the SPI bus.
The temporary U-boot is stored on a memory card (SD/MMC/Dataflashcard) 
or fixed SPI memory in the test system.

Since the on-board flash memory will never be programmed with
the compile time ipaddr/ethaddr, there is really no risk
of duplication of addresses...


> > it is probably advisable to disallow booting the linux kernel if
> > the ethaddr/ipaddr has not changed.
> 
> Too complicated, and not necessary.

Yes, comparing two strings is really rocket science.

> 
> Best regards,
> 
> Wolfgang Denk
> 
-- 
Best Regards,
Ulf Samuelsson          mail:   ulf at atmel.com
Atmel Nordic AB
Box 2033, 174 52 Sundbyberg
Kavalleriv?gen 24, 174 58 Sundbyberg
Sweden
Tel:    +46 8 441 54 22 GSM:    +46 706 224457




DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------

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

* [U-Boot-Users] Ethernet ports
  2007-09-19  7:07           ` [U-Boot-Users] Ethernet ports Yasothabalan
@ 2007-09-19 13:45             ` Detlev Zundel
  2007-09-19 18:07             ` Wolfgang Denk
  1 sibling, 0 replies; 15+ messages in thread
From: Detlev Zundel @ 2007-09-19 13:45 UTC (permalink / raw)
  To: u-boot

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

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

* [U-Boot-Users] Ethernet ports
  2007-09-19  7:07           ` [U-Boot-Users] Ethernet ports Yasothabalan
  2007-09-19 13:45             ` Detlev Zundel
@ 2007-09-19 18:07             ` Wolfgang Denk
  1 sibling, 0 replies; 15+ messages in thread
From: Wolfgang Denk @ 2007-09-19 18:07 UTC (permalink / raw)
  To: u-boot

In message <CE54F2377C0FB8439A290BF5A88BF13D066A1F78@CHN-HCLT-EVS01.HCLT.CORP.HCL.IN> you wrote:
> 
> 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?

This has already been answered. Please read the postings on the list.

> Where exactly I have to modify in the U-Boot code to achieve this?

You don't have to modify any code.

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
######## This message was made from 100% recycled electrons. ########

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

* [U-Boot-Users] At91rm9200 buildroot.
  2007-09-18 22:52         ` Ulf Samuelsson
  2007-09-19  7:07           ` [U-Boot-Users] Ethernet ports Yasothabalan
@ 2007-09-21  0:02           ` Leonid
  1 sibling, 0 replies; 15+ messages in thread
From: Leonid @ 2007-09-21  0:02 UTC (permalink / raw)
  To: u-boot

Hi, Ulf:

You have mentioned that you'll be fixing the tarball. Did you have a
chance to do so and if yes where resulting tarball is located?

Thanks,

Leonid.

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

end of thread, other threads:[~2007-09-21  0:02 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-18 11:41 [U-Boot-Users] Ethernet port Yasothabalan
2007-09-18 21:19 ` urwithsughosh at gmail.com
2007-09-18 12:19   ` Yasothabalan
2007-09-18 22:48     ` urwithsughosh at gmail.com
2007-09-18 13:55       ` Yasothabalan
     [not found]         ` <CE54F2377C0FB8439A290BF5A88BF13D066727E0@CHN-HCLT-EVS01.HCLT.CORP.HCL .IN>
2007-09-18 14:17           ` Ramasamy C
2007-09-18 19:13             ` Wolfgang Denk
2007-09-18 19:09   ` Wolfgang Denk
2007-09-18 20:57     ` Ulf Samuelsson
2007-09-18 22:11       ` Wolfgang Denk
2007-09-18 22:52         ` Ulf Samuelsson
2007-09-19  7:07           ` [U-Boot-Users] Ethernet ports Yasothabalan
2007-09-19 13:45             ` Detlev Zundel
2007-09-19 18:07             ` Wolfgang Denk
2007-09-21  0:02           ` [U-Boot-Users] At91rm9200 buildroot Leonid

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