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


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,

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dr. KlahnPrincipal Software EngineerCommented:
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.
Member_2_99151Author Commented:
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...
Dr. KlahnPrincipal Software EngineerCommented:
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Member_2_99151Author Commented:
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 EngineerCommented:
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.
Member_2_99151Author Commented:
Thanks for all the help :-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.