Skip to content

Commit 468063a

Browse files
committed
g-ether-load: fix mac address read
hexdump has a feature to replace repeated characters on output with an *, use -v to disable this feature. Thus hexdump -e '1/1 "%02X" ":"' /proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address 90:59:AF:5C:* C5:debian@arm:~$ hexdump -v -e '1/1 "%02X" ":"' /proc/device-tree/ocp/ethernet@4a100000/slave@4a100200/mac-address 90:59:AF:5C:5C:C5:debian@arm:~$ Signed-off-by: Robert Nelson <[email protected]>
1 parent d612f5e commit 468063a

File tree

1 file changed

+1
-1
lines changed
  • meta-beagleboard-extras/recipes-support/usb-gadget/gadget-init

1 file changed

+1
-1
lines changed

meta-beagleboard-extras/recipes-support/usb-gadget/gadget-init/g-ether-load.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function reverse_bytes()
3737
3838
mac_address="/proc/device-tree/ocp/ethernet@4a100000/slave@4a100300/mac-address"
3939
if [ -f ${mac_address} ] ; then
40-
DEV_ADDR=$(hexdump -e '1/1 "%02X" ":"' ${mac_address} | sed 's/.$//')
40+
DEV_ADDR=$(hexdump -v -e '1/1 "%02X" ":"' ${mac_address} | sed 's/.$//')
4141
else
4242
DEVMEM_ADDR_LO=$(get_devmem 0x44e10638|bc)
4343
DEVMEM_ADDR_LO=$(reverse_bytes ${DEVMEM_ADDR_LO})

0 commit comments

Comments
 (0)