beagleboard/meta-beagleboard — pull request #4 by RobertCNelson (2013-05-16 14:05:56+00:00)
Title: gadget-init: bypass broken MAC calculation when device tree mac-address ...

...is present

With my BeagleBone this script is mis-calculating the mac address from eeprom:

script: bc:6a:29:79:99:93
actual: bc:6a:29:79:ed:93

Replace calculation by direct hexdump of device tree mac-address:

debian@arm:~$ export mac_address="/proc/device-tree/ocp/ethernet@4a100000/slave@4a100300/mac-address"

debian@arm:~$ uname -a
Linux arm 3.8.12-bone17 #1 SMP Thu May 9 09:01:09 UTC 2013 armv7l GNU/Linux

debian@arm:~$ dmesg | grep cpsw
[ 0.121903] cpsw.0: No hwaddr in dt. Using bc:6a:29:79:ed:91 from efuse
[ 0.121936] cpsw.1: No hwaddr in dt. Using bc:6a:29:79:ed:93 from efuse
[ 2.843867] cpsw 4a100000.ethernet: NAPI disabled
[ 22.066903] net eth0: initializing cpsw version 1.12 (0)

debian@arm:~$ hexdump -e '1/1 "%02X" ":"' ${mac_address} | sed 's/.$//'
BC:6A:29:79:ED:93

Signed-off-by: Robert Nelson