Mac address in the DTS file

Lorenz Kolb linuxppcemb at lkmail.de
Sat Dec 31 01:00:18 EST 2011


Hi Smitha,

actually it should work as normal

On 12/30/2011 1:51 PM, smitha.vanga at wipro.com wrote:
> Its constant. Am not able to change this mac -address in linux once the target is up with LINUX.
> How do I change the MAC address.

actually it should work as normal:
ifconfig ethX down
ifconfig ethX hw ether 00:11:22:33:44:55
ifconfig ethX up

>   If different targets boards are connected on the network then every board will have the same MAC address as  the .dtb file is the same. How to go about this problem?

Depends on your setup: normally the real MAC is stored on some onboard 
configuration space (eeprom or flash).
Afterwards there are multiple ways you could work aroun the problem: 
most elegant: make your bootloader replace the fake MAC with the real 
one within the dtb.
Most simple one: have a startup script that reads the real MAC and does 
the ifconfig magic.

Regards,

Lorenz


More information about the Linuxppc-dev mailing list