Mac address in the DT
Joakim Tjernlund
joakim.tjernlund at transmode.se
Tue Jan 10 01:59:24 EST 2012
<smitha.vanga at wipro.com> wrote on 2012/01/09 15:28:54:
>
>
> Hi Joakim,
>
> I have tried it but it doesn't work.
>
> Just now found that with single ' quotes the entire sequence it works.
> >Setenv set_mac 'cp 0xffec0000 0x100000 1024;fdt addr 0xc00000 8192;fdt set /soc8272 at f0000000/ethernet at 24000 mac-address "[00 44 00 55 00 66]";erase 0xffec0000 0xffec4000;cp 0xc00000 0xffec0000 1024;bootm 0xfe060000 - 0xffec0000'
>
> > run set_mac
>
> For the above command I want to replace the mac address with the ethaddr> How do I do that. I tried $ethaddr but I get extra : characters.
>
> >Setenv set_mac 'cp 0xffec0000 0x100000 1024;fdt addr 0xc00000 8192;fdt set /soc8272 at f0000000/ethernet at 24000 mac-address $ethaddr;erase 0xffec0000 0xffec4000;cp 0xc00000 0xffec0000 1024;bootm 0xfe060000 - 0xffec0000'
Of course you do, ethaddr has a different syntax and contains :
Anyway you should not have to set mac address manually like you do, u-boot will do it for you if you
have configured u-boot correctly and have a proper dtb tree. Check the u-boot code and the many dts files in linux
under arch/powerpc/boot/dts
More information about the Linuxppc-dev
mailing list