2007-09-21 10:21:21     CM_BF537E MAC Address

Document created by Aaronwu Employee on Sep 18, 2013
Version 1Show Document
  • View in full screen mode

2007-09-21 10:21:21     CM_BF537E MAC Address

Jean Navailles (FRANCE)

Message: 44418   

Hi

 

I can't change the MAC addres on a CM_BF537E board.

I tried :

Setting the MAC Address

Clearing the MAC Address

on this link

http://docs.blackfin.uclinux.org/doku.php?id=bf537-stamp_board&s=mac%20address

but this doesn't work.

 

Thanks for your help

 

Jean

 

 

 

TranslateQuoteReplyEditDelete

 

 

2007-09-25 09:43:11     Re: CM_BF537E MAC Address

Jean Navailles (FRANCE)

Message: 44523    Hi

 

I am unable to erase the upper 2MB.

 

CM-BF537E> version

 

U-Boot-1.1.3-ADI-R06R2 (Feb 15 2007 - 09:16:20)

 

CM-BF537E> protect all off

Usage:

protect - enable or disable FLASH write protection

 

CM-BF537E> protect off all

Un-Protect Flash Bank # 1

CM-BF537E> erase 0x20300000 0x203fffff

 

Erasing Flash locations, Please Wait

Sector 24 erased.

Sector 25 erased.

Sector 26 erased.

Sector 27 erased.

Sector 28 erased.

Sector 29 erased.

Sector 30 erased.

Sector 31 erased.

Erased 8 sectors

CM-BF537E> md 0x203f0000

203f0000: bb8abb8a 0a100a10 00000000 00000000 ................

203f0010: 00000000 00000000 00000000 00000000 ................

203f0020: 00000000 00000000 00000000 00000000 ................

203f0030: 00000000 00000000 00000000 00000000 ................

203f0040: 00000000 00000000 00000000 00000000 ................

203f0050: 00000000 00000000 00000000 00000000 ................

203f0060: 00000000 00000000 00000000 00000000 ................

203f0070: 00000000 00000000 00000000 00000000 ................

203f0080: 00000000 00000000 00000000 00000000 ................

203f0090: 00000000 00000000 00000000 00000000 ................

203f00a0: 00000000 00000000 00000000 00000000 ................

203f00b0: 00000000 00000000 00000000 00000000 ................

203f00c0: 00000000 00000000 00000000 00000000 ................

203f00d0: 00000000 00000000 00000000 00000000 ................

203f00e0: 00000000 00000000 00000000 00000000 ................

203f00f0: 00000000 00000000 00000000 00000000 ................

CM-BF537E>

 

Thanks

 

jean

TranslateQuoteReplyEditDelete

 

 

2007-09-25 19:39:33     Re: CM_BF537E MAC Address

Mike Frysinger (UNITED STATES)

Message: 44535    try:

set ethaddr=

set ethaddr 00:11:22:33:44:55

QuoteReplyEditDelete

 

 

2007-09-26 11:55:07     Re: CM_BF537E MAC Address

Jean Navailles (FRANCE)

Message: 44571    Thanks Mike,

I can now change my MAC address on UBOOT, but I don't have the same MAC address on uclinux.

Jean

____________________________________ UBOOT _____________________________________________

CM-BF537E> print

loads_echo=1

netmask=255.255.255.0

hostname=CM_BF537E

bootcmd=bootm 0x20040000

ipaddr=192.168.0.102

serverip=192.168.0.2

addip=setenv bootargs root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):eth0:off

gatewayip=192.168.1.1

upFlash=tftp 0x1000000 uImage;protect off all;erase 0x20040000 0x203DFFFF;cp.b 0x1000000 0x20040000 $(filesize)

bootdelay=1

baudrate=57600

noconsole=setenv bootargs $(bootargs) console=null

ethaddr=00:11:22:33:44:55

bootargs=root=/dev/mtdblock0 rw ip=192.168.0.102:192.168.0.2:192.168.1.1:255.255.255.0:CM_BF537E:eth0:off

stdin=serial

stdout=serial

stderr=serial

 

____________________________________ UCLINUX __________________________________________________

 

root:~> ifconfig

eth0 Link encap:Ethernet HWaddr 40:00:40:00:40:00

inet addr:192.168.0.102 Bcast:192.168.0.255 Mask:255.255.255.0

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:13 errors:0 dropped:0 overruns:0 frame:0

TX packets:15 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

 

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:12 errors:0 dropped:0 overruns:0 frame:0

TX packets:12 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

 

root:~>

 

TranslateQuoteReplyEditDelete

 

 

2007-09-26 17:06:36     Re: CM_BF537E MAC Address

Mike Frysinger (UNITED STATES)

Message: 44580    you have to run `ifconfig hw ...` manually for the time being to set the MAC address

QuoteReplyEditDelete

 

 

2007-09-27 03:17:31     Re: CM_BF537E MAC Address

Jean-Christian de Rivaz (SWITZERLAND)

Message: 44599    Hello,

 

Try the attached patch, il will force uboot to alway set the MAC address, even if it will make no network operation. The kernel will then see that MAC address and will use it.

 

Have a good day,

--

Jean-Christian de Rivaz

03-bf537_set_mac_address.diff

QuoteReplyEditDelete

 

 

2007-09-27 03:40:24     Re: CM_BF537E MAC Address

Mike Frysinger (UNITED STATES)

Message: 44604    that is for the BF537-STAMP board, not the Bluetechnix tiny board ...

QuoteReplyEditDelete

 

 

2007-09-27 04:52:19     Re: CM_BF537E MAC Address

Jean-Christian de Rivaz (SWITZERLAND)

Message: 44612    As the title of the tread say, this is for a BF537 board, so it should be easy to manualy add the few lines of the patch into the relevent file for the Bluetechnix board.

QuoteReplyEditDelete

 

 

2007-09-27 05:18:13     Re: CM_BF537E MAC Address

Jean Navailles (FRANCE)

Message: 44615    Hi

 

Using ifconfig eth0 hw ether 00:11:22:33:44:55 I can change the MAC address but when I reset the board, the address is lost.

The UBOOT for CM-BF537 is in version 1.1.3.

Looking in the source in /board, I am unable to find this board.

 

Thanks

Jean

TranslateQuoteReplyEditDelete

 

 

2007-09-27 09:29:23     Re: CM_BF537E MAC Address

Mike Frysinger (UNITED STATES)

Message: 44631    that's why you'd put the `ifconfig` call into /etc/rc so it'd be run automatically

 

you'll have to go back to the 2006R2 release (which was based on 1.1.3) to get support for the CM boards

QuoteReplyEditDelete

 

 

2008-10-16 17:37:32     Re: CM_BF537E MAC Address

Ben Burleson (UNITED STATES)

Message: 63814   

 

Sorry if I'm digging up an old thread that no longer applies,

 

but is this still the case with CM-BF537E?

 

 

 

I added a line in bfin_mac.c to print what it read via bfin_read_EMAC_ADDRLO() and bfin_read_EMAC_ADDRHI() and it looks like it read all FF:

 

bfin_mac bfin_mac.0: dev_addr0=FF dev_addr1=FF dev_addr2=FF dev_addr3=FF dev_addr4=FF dev_addr5=FF

arch/blackfin/mach-bf537/boards/cm_bf537.c:bfin_get_ether_addr: Setting Ethernet MAC to a random one

 

 

What I wonder though is whether this means U-boot isn't writing the MAC address it has to the BF537 MAC or is the kernel driver not properly reading the BF538 MAC?  I set ethaddr in U-boot and it successfully reports that during startup.  I'm really interested in getting that value into uClinux without coding it into the uImage.

 

 

 

Thanks,

 

Ben

QuoteReplyEditDelete

 

 

2008-10-17 00:37:33     Re: CM_BF537E MAC Address

Mike Frysinger (UNITED STATES)

Message: 63828   

 

u-boot does not program the MAC if the network does not get used.  if you want that behavior, make the calls in your own board init code.

QuoteReplyEditDelete

 

 

2008-10-17 14:43:14     Re: CM_BF537E MAC Address

Ben Burleson (UNITED STATES)

Message: 63862   

 

Thanks Mike, that's a good enough solution for me!

 

I just added a ping at the beginning of my default boot and it worked like a charm.

 

Thanks!

Outcomes