How can I change (or remove) ethaddr from u boot?

Member_2_99151 used Ask the Experts™

I have a linux based system where I incorrectly assigned the MAC address within U Boot.
Unfortunately "setenv ethaddr" is disabled in this version (Can't overwrite "ethaddr")

Is there an alternative way to remove this environment variable without using the standard command?

Any ideas would be appreciated.

Many thanks,

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dr. KlahnPrincipal Software Engineer

If you can boot to linux, you can modify the flash memory environment variables with the firmware tools package programs fw_printenv and fw_setenv.  Under Debian, these are part of the u-boot-tools package.


Thanks for the suggestion.
Unfortunately has the core U Boot 'setenv' function blocks changes to the ethaddr parameter, the linux fw_setenv command also fails in the same way.

I am hoping that it can be done at an even lower level using flash write/erase and memory commands but I'm open to ideas...
Principal Software Engineer
You'll need to locate the protection bits and change that section.  See the discussion at the link below:

Note that some systems locate the MAC address in the online controller chip during boot and use that instead, which overrides the setting of ethaddr.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!


That is what I suspected.

I believe the correct addresses for my device would be:

protect off 0x10020000 0x1003FFFF
erase 0x10020000 0x1003FFFF
setenv ethaddr 00:11:22:33:44:55

however I still get the same error.

Does it carry out the check for the existing setting from RAM instead?

I'm sure the parameter is not read from the device as the address it is showing is the one i initially set.
Dr. KlahnPrincipal Software Engineer

In that situation I'd get a new flash image for the system and reflash the whole thing.  You now have a system where a block has been erased and the contents of it are unknown.  From here it is far too easy to blow out the firmware completely and end up with a brick.


Thanks for all the help :-)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial