Skip to content

Commit

Permalink
Merge git://git.denx.de/u-boot-net
Browse files Browse the repository at this point in the history
  • Loading branch information
trini committed Apr 15, 2018
2 parents 6d0409f + 16879cd commit df13a44
Show file tree
Hide file tree
Showing 33 changed files with 221 additions and 118 deletions.
12 changes: 3 additions & 9 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -76,22 +76,16 @@ config DISTRO_DEFAULTS
imply USE_BOOTCOMMAND
select CMD_BOOTZ if ARM && !ARM64
select CMD_BOOTI if ARM64
select CMD_DHCP if NET && CMD_NET
select CMD_PXE if NET && CMD_NET
select CMD_DHCP if CMD_NET
select CMD_PING if CMD_NET
select CMD_PXE if NET
select CMD_EXT2
select CMD_EXT4
select CMD_FAT
select CMD_FS_GENERIC
imply CMD_MII if NET
select CMD_PING if NET
select CMD_PART if PARTITIONS
select HUSH_PARSER
select BOOTP_BOOTPATH if NET && CMD_NET
select BOOTP_DNS if NET && CMD_NET
select BOOTP_GATEWAY if NET && CMD_NET
select BOOTP_HOSTNAME if NET && CMD_NET
select BOOTP_PXE if NET && CMD_NET
select BOOTP_SUBNETMASK if NET && CMD_NET
select CMDLINE_EDITING
select AUTO_COMPLETE
select SYS_LONGHELP
Expand Down
127 changes: 107 additions & 20 deletions cmd/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1021,46 +1021,127 @@ config CMD_SETEXPR

endmenu

menu "Network commands"

if NET

config CMD_NET
bool "bootp, tftpboot"
menuconfig CMD_NET
bool "Network commands"
default y

if CMD_NET

config CMD_BOOTP
bool "bootp"
default y
help
Network commands.
bootp - boot image via network using BOOTP/TFTP protocol

config CMD_DHCP
bool "dhcp"
depends on CMD_BOOTP
help
Boot image via network using DHCP/TFTP protocol

config BOOTP_BOOTPATH
bool "Request & store 'rootpath' from BOOTP/DHCP server"
default y
depends on CMD_BOOTP
help
Even though the config is called BOOTP_BOOTPATH, it stores the
path in the variable 'rootpath'.

config BOOTP_DNS
bool "Request & store 'dnsip' from BOOTP/DHCP server"
default y
depends on CMD_BOOTP
help
The primary DNS server is stored as 'dnsip'. If two servers are
returned, you must set BOOTP_DNS2 to store that second server IP
also.

config BOOTP_DNS2
bool "Store 'dnsip2' from BOOTP/DHCP server"
depends on BOOTP_DNS
help
If a DHCP client requests the DNS server IP from a DHCP server,
it is possible that more than one DNS serverip is offered to the
client. If CONFIG_BOOTP_DNS2 is enabled, the secondary DNS
server IP will be stored in the additional environment
variable "dnsip2". The first DNS serverip is always
stored in the variable "dnsip", when BOOTP_DNS is defined.

config BOOTP_GATEWAY
bool "Request & store 'gatewayip' from BOOTP/DHCP server"
default y
depends on CMD_BOOTP

config BOOTP_HOSTNAME
bool "Request & store 'hostname' from BOOTP/DHCP server"
default y
depends on CMD_BOOTP
help
The name may or may not be qualified with the local domain name.

config BOOTP_SUBNETMASK
bool "Request & store 'netmask' from BOOTP/DHCP server"
default y
depends on CMD_BOOTP

config BOOTP_PXE
bool "Send PXE client arch to BOOTP/DHCP server"
default y
depends on CMD_BOOTP && CMD_PXE
help
Supported for ARM, ARM64, and x86 for now.

config BOOTP_PXE_CLIENTARCH
hex
depends on BOOTP_PXE
default 0x16 if ARM64
default 0x15 if ARM
default 0 if X86

config BOOTP_VCI_STRING
string
depends on CMD_BOOTP
default "U-Boot.armv7" if CPU_V7 || CPU_V7M
default "U-Boot.armv8" if ARM64
default "U-Boot.arm" if ARM
default "U-Boot"

config CMD_TFTPBOOT
bool "tftpboot"
default y
help
tftpboot - boot image via network using TFTP protocol

config CMD_TFTPPUT
bool "tftp put"
depends on CMD_TFTPBOOT
help
TFTP put command, for uploading files to a server

config CMD_TFTPSRV
bool "tftpsrv"
depends on CMD_TFTPBOOT
help
Act as a TFTP server and boot the first received file

config NET_TFTP_VARS
bool "Control TFTP timeout and count through environment"
depends on CMD_TFTPBOOT
default y
help
If set, allows controlling the TFTP timeout through the
environment variable tftptimeout, and the TFTP maximum
timeout count through the variable tftptimeoutcountmax.
If unset, timeout and maximum are hard-defined as 1 second
and 10 timouts per TFTP transfer.

config CMD_RARP
bool "rarpboot"
help
Boot image via network using RARP/TFTP protocol

config CMD_DHCP
bool "dhcp"
depends on CMD_NET
help
Boot image via network using DHCP/TFTP protocol

config CMD_PXE
bool "pxe"
depends on CMD_NET
select MENU
help
Boot image via network using PXE protocol

config CMD_NFS
bool "nfs"
default y
Expand Down Expand Up @@ -1097,6 +1178,8 @@ config CMD_LINK_LOCAL
help
Acquire a network IP address using the link-local protocol

endif

config CMD_ETHSW
bool "ethsw"
help
Expand All @@ -1105,9 +1188,13 @@ config CMD_ETHSW
operations such as enabling / disabling a port and
viewing/maintaining the filtering database (FDB)

endif
config CMD_PXE
bool "pxe"
select MENU
help
Boot image via network using PXE protocol

endmenu
endif

menu "Misc commands"

Expand Down
4 changes: 2 additions & 2 deletions cmd/bootefi.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ efi_status_t efi_init_obj_list(void)
if (ret != EFI_SUCCESS)
goto out;
#endif
#ifdef CONFIG_CMD_NET
#ifdef CONFIG_NET
ret = efi_net_register();
if (ret != EFI_SUCCESS)
goto out;
Expand Down Expand Up @@ -511,7 +511,7 @@ void efi_set_bootdev(const char *dev, const char *devnr, const char *path)

bootefi_device_path = efi_dp_from_part(desc, part);
} else {
#ifdef CONFIG_CMD_NET
#ifdef CONFIG_NET
bootefi_device_path = efi_dp_from_eth();
#endif
}
Expand Down
4 changes: 4 additions & 0 deletions cmd/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

static int netboot_common(enum proto_t, cmd_tbl_t *, int, char * const []);

#ifdef CONFIG_CMD_BOOTP
static int do_bootp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
return netboot_common(BOOTP, cmdtp, argc, argv);
Expand All @@ -24,7 +25,9 @@ U_BOOT_CMD(
"boot image via network using BOOTP/TFTP protocol",
"[loadAddress] [[hostIPaddr:]bootfilename]"
);
#endif

#ifdef CONFIG_CMD_TFTPBOOT
int do_tftpb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
int ret;
Expand All @@ -40,6 +43,7 @@ U_BOOT_CMD(
"boot image via network using TFTP protocol",
"[loadAddress] [[hostIPaddr:]bootfilename]"
);
#endif

#ifdef CONFIG_CMD_TFTPPUT
static int do_tftpput(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
Expand Down
1 change: 1 addition & 0 deletions configs/am335x_baltos_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ CONFIG_SYS_OMAP24_I2C_SPEED=1000
CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_USB=y
Expand Down
1 change: 1 addition & 0 deletions configs/am335x_shc_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_MMC_OMAP_HS=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
Expand Down
1 change: 1 addition & 0 deletions configs/am335x_shc_ict_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_MMC_OMAP_HS=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
Expand Down
1 change: 1 addition & 0 deletions configs/am335x_shc_netboot_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_MMC_OMAP_HS=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
Expand Down
1 change: 1 addition & 0 deletions configs/am335x_shc_prompt_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_MMC_OMAP_HS=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
Expand Down
1 change: 1 addition & 0 deletions configs/am335x_shc_sdboot_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_MMC_OMAP_HS=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
Expand Down
1 change: 1 addition & 0 deletions configs/am335x_shc_sdboot_prompt_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_MMC_OMAP_HS=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
CONFIG_FAT_WRITE=y
Expand Down
1 change: 1 addition & 0 deletions configs/devkit3250_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ CONFIG_MTD_NOR_FLASH=y
CONFIG_NAND=y
CONFIG_SPL_NAND_SIMPLE=y
CONFIG_PHYLIB=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_ADDR=31
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
Expand Down
1 change: 1 addition & 0 deletions configs/ds414_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ CONFIG_SPL_OF_TRANSLATE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_GIGE=y
CONFIG_MVNETA=y
CONFIG_PCI=y
Expand Down
1 change: 1 addition & 0 deletions configs/khadas-vim_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_MMC_MESON_GX=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_ADDR=8
CONFIG_PHY_MESON_GXL=y
CONFIG_DM_ETH=y
Expand Down
1 change: 1 addition & 0 deletions configs/libretech-cc_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_MMC_MESON_GX=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_ADDR=8
CONFIG_PHY_MESON_GXL=y
CONFIG_DM_ETH=y
Expand Down
1 change: 1 addition & 0 deletions configs/p212_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_MMC_MESON_GX=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_ADDR=8
CONFIG_PHY_MESON_GXL=y
CONFIG_DM_ETH=y
Expand Down
1 change: 1 addition & 0 deletions configs/pepper_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ CONFIG_MMC_OMAP_HS=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_DRIVER_TI_CPSW=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_NETDEVICES=y
CONFIG_SYS_NS16550=y
CONFIG_OMAP3_SPI=y
Expand Down
1 change: 1 addition & 0 deletions configs/work_92105_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ CONFIG_SPL_DM=y
CONFIG_DM_GPIO=y
# CONFIG_MMC is not set
CONFIG_PHYLIB=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_DM_SERIAL=y
CONFIG_SYS_NS16550=y
CONFIG_LPC32XX_SSP=y
1 change: 1 addition & 0 deletions configs/x600_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ CONFIG_FPGA_SPARTAN3=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_NETDEVICES=y
Expand Down
13 changes: 12 additions & 1 deletion drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,20 @@ config ETHOC
help
This MAC is present in OpenRISC and Xtensa XTFPGA boards.

config FEC_MXC_SHARE_MDIO
bool "Share the MDIO bus for FEC controller"
depends on FEC_MXC

config FEC_MXC_MDIO_BASE
hex "MDIO base address for the FEC controller"
depends on FEC_MXC_SHARE_MDIO
help
This specifies the MDIO registers base address. It is used when
two FEC controllers share MDIO bus.

config FEC_MXC
bool "FEC Ethernet controller"
depends on MX5 || MX6
depends on MX5 || MX6 || MX7
help
This driver supports the 10/100 Fast Ethernet controller for
NXP i.MX processors.
Expand Down
Loading

0 comments on commit df13a44

Please sign in to comment.