RE: Mac address in the DT
From: Joakim Tjernlund <hidden>
Date: 2012-01-09 14:59:28
[off-list ref] 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.quoted
Setenv set_mac 'cp 0xffec0000 0x100000 1024;fdt addr 0xc00000 8192;fdt set /soc8272@f0000000/ethernet@24000 mac-address "[00 44 00 55 00 66]";erase 0xffec0000 0xffec4000;cp 0xc00000 0xffec0000 1024;bootm 0xfe060000 - 0xffec0000'quoted
run set_macFor 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.quoted
Setenv set_mac 'cp 0xffec0000 0x100000 1024;fdt addr 0xc00000 8192;fdt set /soc8272@f0000000/ethernet@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