[U-Boot] setting Ethernet address

Benedict Hewson
2014-03-14T18:29:51Z

I am trying to get network support working on the Embest imx6 Marsboard.
I have been reading through the various imx6 boards and it appears that some
at least store a MAC address in the fuse memory.

This does not appear to be set on the MarSboard - the fuse memory contains 0.
The original 2009 version used the ethaddr environment variable.
If I try to include this in the config header file either as part of the
CONFIG_EXTRA_ENV_SETTINGS -

#define CONFIG_ETHADDR 00:01:02:03:04:05

#define CONFIG_EXTRA_ENV_SETTINGS \
"ethaddr="__stringify(CONFIG_ETHADDR)"\0" \

or more simply as in the original version

"ethaddr=00:01:02:03:04:05\0" \

everything compiles, but when booting I get "Warning: failed to set MAC
address" and when listing the environment variables ethhaddr is missing.
If I manually set ethaddr and ipaddr the networking seems to work as I can
ping the board successfully.

I assume I am missing something somewhere and I expect if I go through the
source I will eventually find it, but it is probably going to be quicker to
ask.

many thanks
Ben