[U-Boot] Board file for Raspberry Pi, rpi.c and Setting MAC address

Duncan Hare dh at synoia.com
Tue Jul 4 18:48:57 UTC 2017


The code is:
if(!getenv("ethaddr")) setenv("ethaddr",getenv("usbethaddr"));
which if I read it correctly says, 
if the MAC address variable is not set, set from the board's mac address.

If an environment is copies from one device to a second, this code prevents populating u-boot in the new device from getting the correct MAC address for the device.

Is there a reason for protecting the MAC address variable in this manner? Or should the code be to alwys retrieve the MAC address from the device? For example:

setenv("ethaddr",getenv("usbethaddr"); Duncan Hare

714 931 7952


More information about the U-Boot mailing list