Skip to content

Commit

Permalink
Convert CONFIG_HOSTNAME et al to Kconfig
Browse files Browse the repository at this point in the history
This converts the following to Kconfig:
   CONFIG_GATEWAYIP
   CONFIG_HOSTNAME
   CONFIG_IPADDR
   CONFIG_NETMASK
   CONFIG_ROOTPATH
   CONFIG_SERVERIP
   CONFIG_UBOOTPATH

To do this, we introduce a CONFIG_USE_ form of each of the above and
change include/env_default.h to test for that to be set before setting a
value. Further, we don't want to stringify the IP address related values
as they are now properly strings via Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
  • Loading branch information
trini committed Dec 22, 2022
1 parent 3f7a496 commit 54f80dd
Show file tree
Hide file tree
Showing 232 changed files with 644 additions and 248 deletions.
32 changes: 0 additions & 32 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -734,38 +734,6 @@ The following options need to be configured:
Some PHY like Intel LXT971A need extra delay after
command issued before MII status register can be read

- IP address:
CONFIG_IPADDR

Define a default value for the IP address to use for
the default Ethernet interface, in case this is not
determined through e.g. bootp.
(Environment variable "ipaddr")

- Server IP address:
CONFIG_SERVERIP

Defines a default value for the IP address of a TFTP
server to contact when using the "tftboot" command.
(Environment variable "serverip")

- Gateway IP address:
CONFIG_GATEWAYIP

Defines a default value for the IP address of the
default router where packets to other networks are
sent to.
(Environment variable "gatewayip")

- Subnet mask:
CONFIG_NETMASK

Defines a default value for the subnet mask (or
routing prefix) which is used to determine if an IP
address belongs to the local subnet or needs to be
forwarded through a router.
(Environment variable "netmask")

- BOOTP Recovery Mode:
CONFIG_BOOTP_RANDOM_DELAY

Expand Down
12 changes: 12 additions & 0 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,16 @@ source "arch/powerpc/cpu/mpc85xx/Kconfig"
source "arch/powerpc/cpu/mpc8xx/Kconfig"
source "arch/powerpc/lib/Kconfig"

config USE_UBOOTPATH
bool "Set a default 'uboot' value in the environment"
help
Many default environment scripts will check the "uboot" variable
to determine the name of the file to load via tftp that will then
be written to flash.

config UBOOTPATH
string "Value of the default 'uboot' value in the environment"
depends on USE_UBOOTPATH
default "u-boot.bin"

endmenu
10 changes: 10 additions & 0 deletions configs/M5208EVBE_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,18 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="M5208EVBe"
CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
CONFIG_UDP_CHECKSUM=y
CONFIG_USE_GATEWAYIP=y
CONFIG_GATEWAYIP="192.162.1.1"
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.162.1.2"
CONFIG_USE_NETMASK=y
CONFIG_NETMASK="255.255.255.0"
CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.162.1.1"
CONFIG_SYS_RX_ETH_BUFFER=8
CONFIG_SYS_I2C_LEGACY=y
CONFIG_SYS_I2C_FSL=y
Expand Down
10 changes: 10 additions & 0 deletions configs/M5235EVB_Flash32_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,17 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="u-boot.bin"
CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="M5235EVB"
CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
CONFIG_USE_GATEWAYIP=y
CONFIG_GATEWAYIP="192.162.1.1"
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.162.1.2"
CONFIG_USE_NETMASK=y
CONFIG_NETMASK="255.255.255.0"
CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.162.1.1"
CONFIG_SYS_RX_ETH_BUFFER=8
CONFIG_SYS_I2C_LEGACY=y
CONFIG_SYS_I2C_FSL=y
Expand Down
10 changes: 10 additions & 0 deletions configs/M5235EVB_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,17 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="u-boot.bin"
CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="M5235EVB"
CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
CONFIG_USE_GATEWAYIP=y
CONFIG_GATEWAYIP="192.162.1.1"
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.162.1.2"
CONFIG_USE_NETMASK=y
CONFIG_NETMASK="255.255.255.0"
CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.162.1.1"
CONFIG_SYS_RX_ETH_BUFFER=8
CONFIG_SYS_I2C_LEGACY=y
CONFIG_SYS_I2C_FSL=y
Expand Down
2 changes: 2 additions & 0 deletions configs/M5253DEMO_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
CONFIG_MAC_PARTITION=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="M5253DEMO"
# CONFIG_BLOCK_CACHE is not set
CONFIG_SYS_IDE_MAXBUS=1
CONFIG_SYS_ATA_STRIDE=4
Expand Down
10 changes: 10 additions & 0 deletions configs/M5272C3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,17 @@ CONFIG_MII_INIT=y
CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="M5272C3"
CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
CONFIG_USE_GATEWAYIP=y
CONFIG_GATEWAYIP="192.162.1.1"
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.162.1.2"
CONFIG_USE_NETMASK=y
CONFIG_NETMASK="255.255.255.0"
CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.162.1.1"
CONFIG_SYS_RX_ETH_BUFFER=8
CONFIG_SYS_BR0_PRELIM_BOOL=y
CONFIG_SYS_BR0_PRELIM=0xFFE00201
Expand Down
10 changes: 10 additions & 0 deletions configs/M5282EVB_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,17 @@ CONFIG_MII_INIT=y
CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="M5282EVB"
CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
CONFIG_USE_GATEWAYIP=y
CONFIG_GATEWAYIP="192.162.1.1"
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.162.1.2"
CONFIG_USE_NETMASK=y
CONFIG_NETMASK="255.255.255.0"
CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.162.1.1"
CONFIG_SYS_RX_ETH_BUFFER=8
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
Expand Down
10 changes: 10 additions & 0 deletions configs/M53017EVB_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,18 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_DATE=y
CONFIG_ENV_IS_IN_FLASH=y
CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="M53017"
CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
CONFIG_UDP_CHECKSUM=y
CONFIG_USE_GATEWAYIP=y
CONFIG_GATEWAYIP="192.162.1.1"
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.162.1.2"
CONFIG_USE_NETMASK=y
CONFIG_NETMASK="255.255.255.0"
CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.162.1.1"
CONFIG_SYS_RX_ETH_BUFFER=8
CONFIG_SYS_I2C_LEGACY=y
CONFIG_SYS_I2C_FSL=y
Expand Down
10 changes: 10 additions & 0 deletions configs/M5329AFEE_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,18 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_DATE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="M5329EVB"
CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
CONFIG_UDP_CHECKSUM=y
CONFIG_USE_GATEWAYIP=y
CONFIG_GATEWAYIP="192.162.1.1"
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.162.1.2"
CONFIG_USE_NETMASK=y
CONFIG_NETMASK="255.255.255.0"
CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.162.1.1"
CONFIG_SYS_RX_ETH_BUFFER=8
CONFIG_SYS_I2C_LEGACY=y
CONFIG_SYS_I2C_FSL=y
Expand Down
10 changes: 10 additions & 0 deletions configs/M5329BFEE_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,18 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_DATE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="M5329EVB"
CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
CONFIG_UDP_CHECKSUM=y
CONFIG_USE_GATEWAYIP=y
CONFIG_GATEWAYIP="192.162.1.1"
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.162.1.2"
CONFIG_USE_NETMASK=y
CONFIG_NETMASK="255.255.255.0"
CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.162.1.1"
CONFIG_SYS_RX_ETH_BUFFER=8
CONFIG_SYS_I2C_LEGACY=y
CONFIG_SYS_I2C_FSL=y
Expand Down
10 changes: 10 additions & 0 deletions configs/M5373EVB_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,18 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_DATE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="M5373EVB"
CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
CONFIG_UDP_CHECKSUM=y
CONFIG_USE_GATEWAYIP=y
CONFIG_GATEWAYIP="192.162.1.1"
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.162.1.2"
CONFIG_USE_NETMASK=y
CONFIG_NETMASK="255.255.255.0"
CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.162.1.1"
CONFIG_SYS_RX_ETH_BUFFER=8
CONFIG_SYS_I2C_LEGACY=y
CONFIG_SYS_I2C_FSL=y
Expand Down
6 changes: 6 additions & 0 deletions configs/MCR3000_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.168.0.3"
CONFIG_USE_NETMASK=y
CONFIG_NETMASK="255.0.0.0"
CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.168.0.1"
CONFIG_SYS_BR0_PRELIM_BOOL=y
CONFIG_SYS_BR0_PRELIM=0x4000801
CONFIG_SYS_OR0_PRELIM=0xFFC00926
Expand Down
5 changes: 5 additions & 0 deletions configs/MPC837XERDB_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ CONFIG_SPCR_TSECEP_3=y
CONFIG_LCRR_DBYP_PLL_BYPASSED=y
CONFIG_LCRR_CLKDIV_8=y
CONFIG_FSL_SERDES=y
CONFIG_USE_UBOOTPATH=y
CONFIG_SYS_MONITOR_LEN=524288
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
Expand Down Expand Up @@ -178,6 +179,10 @@ CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="uImage"
CONFIG_USE_ETHPRIME=y
CONFIG_ETHPRIME="TSEC0"
CONFIG_USE_HOSTNAME=y
CONFIG_HOSTNAME="mpc837x_rdb"
CONFIG_USE_ROOTPATH=y
CONFIG_ROOTPATH="/nfsroot"
CONFIG_FSL_SATA=y
CONFIG_SYS_SATA_MAX_DEVICE=2
CONFIG_SYS_BR0_PRELIM_BOOL=y
Expand Down
13 changes: 13 additions & 0 deletions configs/MPC8548CDS_36BIT_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ CONFIG_SRIO1=y
CONFIG_TARGET_MPC8548CDS=y
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
CONFIG_ENABLE_36BIT_PHYS=y
CONFIG_USE_UBOOTPATH=y
CONFIG_UBOOTPATH="8548cds/u-boot.bin"
CONFIG_PCIE1=y
CONFIG_PHYS_64BIT=y
CONFIG_SYS_MONITOR_LEN=524288
Expand Down Expand Up @@ -45,6 +47,17 @@ CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="8548cds/uImage.uboot"
CONFIG_USE_ETHPRIME=y
CONFIG_ETHPRIME="eTSEC0"
CONFIG_USE_HOSTNAME=y
CONFIG_USE_GATEWAYIP=y
CONFIG_GATEWAYIP="192.168.1.1"
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.168.1.253"
CONFIG_USE_NETMASK=y
CONFIG_NETMASK="255.255.255.0"
CONFIG_USE_ROOTPATH=y
CONFIG_ROOTPATH="/nfsroot"
CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.168.1.1"
CONFIG_SPD_EEPROM=y
CONFIG_CHIP_SELECTS_PER_CTRL=2
CONFIG_DDR_ECC=y
Expand Down
13 changes: 13 additions & 0 deletions configs/MPC8548CDS_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ CONFIG_SRIO1=y
CONFIG_TARGET_MPC8548CDS=y
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
CONFIG_ENABLE_36BIT_PHYS=y
CONFIG_USE_UBOOTPATH=y
CONFIG_UBOOTPATH="8548cds/u-boot.bin"
CONFIG_PCIE1=y
CONFIG_SYS_MONITOR_LEN=524288
CONFIG_OF_BOARD_SETUP=y
Expand Down Expand Up @@ -44,6 +46,17 @@ CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="8548cds/uImage.uboot"
CONFIG_USE_ETHPRIME=y
CONFIG_ETHPRIME="eTSEC0"
CONFIG_USE_HOSTNAME=y
CONFIG_USE_GATEWAYIP=y
CONFIG_GATEWAYIP="192.168.1.1"
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.168.1.253"
CONFIG_USE_NETMASK=y
CONFIG_NETMASK="255.255.255.0"
CONFIG_USE_ROOTPATH=y
CONFIG_ROOTPATH="/nfsroot"
CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.168.1.1"
CONFIG_SPD_EEPROM=y
CONFIG_CHIP_SELECTS_PER_CTRL=2
CONFIG_DDR_ECC=y
Expand Down
13 changes: 13 additions & 0 deletions configs/MPC8548CDS_legacy_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ CONFIG_TARGET_MPC8548CDS=y
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
CONFIG_ENABLE_36BIT_PHYS=y
CONFIG_TARGET_MPC8548CDS_LEGACY=y
CONFIG_USE_UBOOTPATH=y
CONFIG_UBOOTPATH="8548cds/u-boot.bin"
CONFIG_PCIE1=y
CONFIG_SYS_MONITOR_LEN=524288
CONFIG_OF_BOARD_SETUP=y
Expand Down Expand Up @@ -44,6 +46,17 @@ CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="8548cds/uImage.uboot"
CONFIG_USE_ETHPRIME=y
CONFIG_ETHPRIME="eTSEC0"
CONFIG_USE_HOSTNAME=y
CONFIG_USE_GATEWAYIP=y
CONFIG_GATEWAYIP="192.168.1.1"
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.168.1.253"
CONFIG_USE_NETMASK=y
CONFIG_NETMASK="255.255.255.0"
CONFIG_USE_ROOTPATH=y
CONFIG_ROOTPATH="/nfsroot"
CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.168.1.1"
CONFIG_SPD_EEPROM=y
CONFIG_CHIP_SELECTS_PER_CTRL=2
CONFIG_DDR_ECC=y
Expand Down
2 changes: 2 additions & 0 deletions configs/P1010RDB-PA_36BIT_NAND_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ CONFIG_TARGET_P1010RDB_PA=y
CONFIG_ENABLE_36BIT_PHYS=y
CONFIG_SYS_MPC85XX_NO_RESETVEC=y
CONFIG_TPL_SYS_MPC85XX_NO_RESETVEC=y
CONFIG_USE_UBOOTPATH=y
CONFIG_PCIE1=y
CONFIG_PCIE2=y
CONFIG_PHYS_64BIT=y
Expand Down Expand Up @@ -81,6 +82,7 @@ CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="uImage"
CONFIG_USE_ETHPRIME=y
CONFIG_ETHPRIME="eTSEC1"
CONFIG_USE_ROOTPATH=y
CONFIG_FSL_SATA_V2=y
CONFIG_SYS_SATA_MAX_DEVICE=2
CONFIG_FSL_CAAM=y
Expand Down
2 changes: 2 additions & 0 deletions configs/P1010RDB-PA_36BIT_NOR_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CONFIG_TARGET_P1010RDB_PA=y
CONFIG_MPC85XX_HAVE_RESET_VECTOR=y
CONFIG_ENABLE_36BIT_PHYS=y
CONFIG_SYS_MPC85XX_NO_RESETVEC=y
CONFIG_USE_UBOOTPATH=y
CONFIG_PCIE1=y
CONFIG_PCIE2=y
CONFIG_PHYS_64BIT=y
Expand Down Expand Up @@ -49,6 +50,7 @@ CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="uImage"
CONFIG_USE_ETHPRIME=y
CONFIG_ETHPRIME="eTSEC1"
CONFIG_USE_ROOTPATH=y
CONFIG_FSL_SATA_V2=y
CONFIG_SYS_SATA_MAX_DEVICE=2
CONFIG_FSL_CAAM=y
Expand Down
2 changes: 2 additions & 0 deletions configs/P1010RDB-PA_36BIT_SDCARD_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ CONFIG_TARGET_P1010RDB_PA=y
CONFIG_ENABLE_36BIT_PHYS=y
CONFIG_SYS_MPC85XX_NO_RESETVEC=y
CONFIG_SPL_SYS_MPC85XX_NO_RESETVEC=y
CONFIG_USE_UBOOTPATH=y
CONFIG_PCIE1=y
CONFIG_PCIE2=y
CONFIG_PHYS_64BIT=y
Expand Down Expand Up @@ -71,6 +72,7 @@ CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="uImage"
CONFIG_USE_ETHPRIME=y
CONFIG_ETHPRIME="eTSEC1"
CONFIG_USE_ROOTPATH=y
CONFIG_FSL_SATA_V2=y
CONFIG_SYS_SATA_MAX_DEVICE=2
CONFIG_FSL_CAAM=y
Expand Down
Loading

0 comments on commit 54f80dd

Please sign in to comment.