static mac address on Beaglebone Black

What’s the best way to set a static mac address for usb1 device on the Beaglebone Black?

This line seems to be where it is set, but I don’t see where cpsw_4_mac is set:

https://github.com/RobertCNelson/boot-scripts/blob/fe926a6a4cf5805041878d7df82b58c00b4f902e/boot/am335x_evm.sh#L500

I don’t seem to have a /usr/bin/bb_generate_mac.sh, so these lines don’t seem like they would be called: https://github.com/RobertCNelson/boot-scripts/blob/fe926a6a4cf5805041878d7df82b58c00b4f902e/boot/am335x_evm.sh#L281-L286

Anyone have any ideas?

sudo apt update ; sudo apt upgrade

would fix that..

We should add the overrides here:

https://github.com/RobertCNelson/boot-scripts/blob/master/boot/default/bb-boot#L21-L30

Any thoughts on variable names?

Regards,

Is there a file that isn’t version controlled that the overrides could go in? That way updates to a file wouldn’t cause conflicts down the road.

As for a name, USB1_MAC seems reasonable to me.

Just the host side right? :wink: USB1_MAC_HOST, should we add
USB1_MAC_LOCAL? _CLIENT?

Regards,

I’d match the file names that are used, which are host_addr and dev_addr. So USB1_MAC_HOST and USB1_MAC_DEV?

Do you know the specific packages that should be upgraded to get the bb_generate_mac.sh script?

bb-usb-gadgets

Regards,