Convert CONFIG_OVERWRITE_ETHADDR_ONCE to Kconfig

This converts the following to Kconfig:
   CONFIG_OVERWRITE_ETHADDR_ONCE

Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini 2022-12-02 16:42:39 -05:00
parent 3348c6b6a5
commit 0a69d6afca
9 changed files with 13 additions and 17 deletions

7
README
View File

@ -1071,13 +1071,6 @@ The following options need to be configured:
completely disabled. Anybody can change or delete
these parameters.
Alternatively, if you define _both_ an ethaddr in the
default env _and_ CONFIG_OVERWRITE_ETHADDR_ONCE, a default
Ethernet address is installed in the environment,
which can be changed exactly ONCE by the user. [The
serial# is unaffected by this, i. e. it remains
read-only.]
The same can be accomplished in a more flexible way
for any variable by configuring the type of access
to allow for those variables in the ".flags" variable

View File

@ -25,6 +25,7 @@ CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
CONFIG_MAC_PARTITION=y
CONFIG_OVERWRITE_ETHADDR_ONCE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="M5253DEMO"

View File

@ -31,6 +31,7 @@ CONFIG_CMD_MII=y
CONFIG_MII_INIT=y
CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_OVERWRITE_ETHADDR_ONCE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
CONFIG_SYS_RX_ETH_BUFFER=8

View File

@ -32,6 +32,7 @@ CONFIG_BOOTP_BOOTFILESIZE=y
CONFIG_CMD_MII=y
CONFIG_MII_INIT=y
CONFIG_CMD_DATE=y
CONFIG_OVERWRITE_ETHADDR_ONCE=y
CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
CONFIG_SYS_RX_ETH_BUFFER=8
CONFIG_SYS_I2C_LEGACY=y

View File

@ -30,6 +30,7 @@ CONFIG_BOOTP_BOOTFILESIZE=y
CONFIG_CMD_MII=y
CONFIG_MII_INIT=y
CONFIG_CMD_DATE=y
CONFIG_OVERWRITE_ETHADDR_ONCE=y
CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
CONFIG_SYS_RX_ETH_BUFFER=8
CONFIG_SYS_I2C_LEGACY=y

9
env/Kconfig vendored
View File

@ -30,6 +30,15 @@ config ENV_OVERWRITE
Use this to permit overriding of certain environmental variables
like Ethernet and Serial
config OVERWRITE_ETHADDR_ONCE
bool "Enable overwriting ethaddr environment variables once"
depends on !ENV_OVERWRITE
help
Enable this to allow for the ethaddr environment variables to be
overwritten one time per boot, only. This allows for a default
to be installed in the environment, which can be changed exactly ONCE
by the user.
config ENV_MIN_ENTRIES
int "Minimum number of entries in the environment hashtable"
default 64

View File

@ -20,8 +20,6 @@
env/embedded.o(.text*);
#ifdef CONFIG_DRIVER_DM9000
# define CONFIG_OVERWRITE_ETHADDR_ONCE
# define CONFIG_EXTRA_ENV_SETTINGS \
"netdev=eth0\0" \
"inpclk=" __stringify(CONFIG_SYS_INPUT_CLKSRC) "\0" \

View File

@ -38,10 +38,6 @@
#define CFG_SYS_I2C_PINMUX_CLR (0xFFF0)
#define CFG_SYS_I2C_PINMUX_SET (0x000F)
#ifdef CONFIG_MCFFEC
# define CONFIG_OVERWRITE_ETHADDR_ONCE
#endif /* FEC_ENET */
#define CONFIG_EXTRA_ENV_SETTINGS \
"netdev=eth0\0" \
"loadaddr=10000\0" \

View File

@ -42,10 +42,6 @@
* Network *
*----------------------------------------------------------------------*/
#ifdef CONFIG_MCFFEC
#define CONFIG_OVERWRITE_ETHADDR_ONCE
#endif
/*-------------------------------------------------------------------------
* Low Level Configuration Settings
* (address mappings, register initial values, etc.)