Re: [beagleboard] BeagleBone : set MAC address?

4,091 views
Skip to first unread message

Andrew Bradford

unread,
Nov 30, 2012, 9:39:23 AM11/30/12
to beagl...@googlegroups.com, fredbas...@gmail.com
On Thu, 29 Nov 2012 18:26:26 -0800 (PST)
fredb <fredbas...@gmail.com> wrote:

> Guys, where is the MAC address set for eth0 on the BeagleBone?

In the EEPROM. On A6 it's write protected by default, use the test pad
to unprotect.

> Additionally how are uBoot environment variables set? On another
> uBoot project I did you could set them then run a "saveenv" to save
> them to Flash.

Either compiled into u-boot or in your uEnv.txt file. 'saveenv'
doesn't work, there's no where to save them to.

-Andrew

Andrew Bradford

unread,
Nov 30, 2012, 3:48:25 PM11/30/12
to fred basset, beagl...@googlegroups.com
Replying to the beagle list as I'm wrong...

On Fri, 30 Nov 2012 10:35:18 -0800
fred basset <fredbas...@gmail.com> wrote:

> Thanks for the response.
>
> RE MAC address; we are doing our own board; is having the MAC address
> in the EEPROM the only way to do it? How would you program the EEPROM
> at the factory if starting with a fresh blank part?


> On Fri, Nov 30, 2012 at 6:39 AM, Andrew Bradford
> <and...@bradfordembedded.com> wrote:
> > On Thu, 29 Nov 2012 18:26:26 -0800 (PST)
> > fredb <fredbas...@gmail.com> wrote:
> >
> >> Guys, where is the MAC address set for eth0 on the BeagleBone?
> >
> > In the EEPROM. On A6 it's write protected by default, use the test
> > pad to unprotect.

Well, I may have spoken before my brain understood everything. I'm
actually not sure where the MAC is stored at this moment, sorry.

Stan Hu

unread,
Nov 30, 2012, 4:32:25 PM11/30/12
to beagl...@googlegroups.com, fred basset
The MAC addresses are stored in registers of the AM335x.   From the TRM:

"The values read from Control Module (Base address 0x44E1_0000)  MAC_ID0_LO register (Offset 0x630), MAC_ID0_HI register (Offset 0x634), MAC_ID1_LO register (Offset 0x638), and MAC_ID1_HI register (Offset 0x63C) represent  unique MAC addresses assigned to each AM335x device.  The values in these registers are programmed into each AM335x device by TI and can not be changed."

You can read them out by using devmem2:

root@beaglebone:/devdevmem2 0x44e10630
/dev/mem opened.
Memory mapped at address 0x401b0000.
Read at address  0x44E10630 (0x401b0630): 0x0000F6A3
root@beaglebone:/devdevmem2 0x44e10634
/dev/mem opened.
Memory mapped at address 0x40201000.
Read at address  0x44E10634 (0x40201634): 0x91A194D4
root@beaglebone:/dev# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr D4:94:A1:91:A3:F6  
          inet addr:10.10.0.100  Bcast:10.10.0.255  Mask:255.255.255.0
          inet6 addr: fe80::d694:a1ff:fe91:a3f6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:981079 errors:0 dropped:211 overruns:0 frame:0
          TX packets:846542 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:200210379 (190.9 MiB)  TX bytes:209507855 (199.8 MiB)


--



Stan Hu

unread,
Nov 30, 2012, 4:35:31 PM11/30/12
to beagl...@googlegroups.com, fred basset
In addition, these values are read out in am33xx_cpsw_init() in arch/arm/mach-omap2/devices.c.  You could change that function if you wanted to load a custom MAC address.
Reply all
Reply to author
Forward
0 new messages