The UBOOT mac can be changed only once. You can check the UBOOT source code. Whether the UBOOT mac can be changed repeatedly depends on the system configuration.
The relevant code is in common \ cmd_nvedit.c under the uboot source code directory.
#ifndef CONFIG_ENV_OVERWRITE /* * Ethernet Address and serial# can be set only once, * ver is readonly. */ if ( (strcmp (name, "serial#") == 0) || ((strcmp (name, "ethaddr") == 0) #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR) && (strcmp (env_get_addr(oldval),MK_STR (CONFIG_ETHADDR)) != 0) #endif /* CONFIG_OVERWRITE_ETHADDR_ONCE && CONFIG_ETHADDR */ ) ) { printf ("Can't overwrite \"%s\"\n", name); return 1; } #endif
From this code analysis, we know that if CONFIG_ENV_OVERWRITE is not defined, it cannot
Change the MAC address multiple times, so as long as # define CONFIG_ENV_OVERWRITE is defined
Yes. I don't know where the definition is suitable. I defined it in "include/configs/" and
In the configuration header file corresponding to the board. For reference only
This article is from the "ITDS" blog, please be sure to keep this source http://limingshang.blog.51cto.com/2975568/1281350