aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-03-18 08:38:23 -0400
committerTom Rini <trini@konsulko.com>2022-03-25 12:01:15 +0000
commit5842c8107d9a13b958fa894b22485b32e078f75b (patch)
tree82685b53c87cd4a2483181e573de6503f1f129fc
parent03d14ccdf6c4ae56e3351ca828d9b1ac6467aea5 (diff)
downloadu-boot-5842c8107d9a13b958fa894b22485b32e078f75b.zip
u-boot-5842c8107d9a13b958fa894b22485b32e078f75b.tar.gz
u-boot-5842c8107d9a13b958fa894b22485b32e078f75b.tar.bz2
Convert CONFIG_TFTP_PORT to Kconfig
This converts the following to Kconfig: CONFIG_TFTP_PORT Cc: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--README20
-rw-r--r--configs/gurnard_defconfig1
-rw-r--r--configs/snapper9260_defconfig1
-rw-r--r--configs/snapper9g20_defconfig1
-rw-r--r--include/configs/snapper9260.h3
-rw-r--r--include/configs/snapper9g45.h3
-rw-r--r--net/Kconfig18
7 files changed, 21 insertions, 26 deletions
diff --git a/README b/README
index 9cddb13..c704d0a 100644
--- a/README
+++ b/README
@@ -1612,26 +1612,6 @@ The following options need to be configured:
this is instead controlled by the value of
/config/load-environment.
-- TFTP Fixed UDP Port:
- CONFIG_TFTP_PORT
-
- If this is defined, the environment variable tftpsrcp
- is used to supply the TFTP UDP source port value.
- If tftpsrcp isn't defined, the normal pseudo-random port
- number generator is used.
-
- Also, the environment variable tftpdstp is used to supply
- the TFTP UDP destination port value. If tftpdstp isn't
- defined, the normal port 69 is used.
-
- The purpose for tftpsrcp is to allow a TFTP server to
- blindly start the TFTP transfer using the pre-configured
- target IP address and UDP port. This has the effect of
- "punching through" the (Windows XP) firewall, allowing
- the remainder of the TFTP transfer to proceed normally.
- A better solution is to properly configure the firewall,
- but sometimes that is not allowed.
-
CONFIG_STANDALONE_LOAD_ADDR
This option defines a board specific value for the
diff --git a/configs/gurnard_defconfig b/configs/gurnard_defconfig
index 47678e6..fc6c2b9 100644
--- a/configs/gurnard_defconfig
+++ b/configs/gurnard_defconfig
@@ -40,6 +40,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_NET_RETRY_COUNT=20
+CONFIG_TFTP_PORT=y
CONFIG_TFTP_TSIZE=y
CONFIG_AT91_GPIO=y
CONFIG_GENERIC_ATMEL_MCI=y
diff --git a/configs/snapper9260_defconfig b/configs/snapper9260_defconfig
index 76b51d9..04b3f7c 100644
--- a/configs/snapper9260_defconfig
+++ b/configs/snapper9260_defconfig
@@ -38,6 +38,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_NET_RETRY_COUNT=20
+CONFIG_TFTP_PORT=y
CONFIG_TFTP_TSIZE=y
CONFIG_AT91_GPIO=y
CONFIG_CMD_PCA953X=y
diff --git a/configs/snapper9g20_defconfig b/configs/snapper9g20_defconfig
index c6eca22..7eb512d 100644
--- a/configs/snapper9g20_defconfig
+++ b/configs/snapper9g20_defconfig
@@ -37,6 +37,7 @@ CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_NET_RETRY_COUNT=20
+CONFIG_TFTP_PORT=y
CONFIG_TFTP_TSIZE=y
CONFIG_AT91_GPIO=y
CONFIG_CMD_PCA953X=y
diff --git a/include/configs/snapper9260.h b/include/configs/snapper9260.h
index 2f0309f..f7ee9db 100644
--- a/include/configs/snapper9260.h
+++ b/include/configs/snapper9260.h
@@ -37,9 +37,6 @@
#define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PC14
#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PC13
-/* Ethernet */
-#define CONFIG_TFTP_PORT
-
/* USB */
#define CONFIG_USB_ATMEL
#define CONFIG_USB_ATMEL_CLK_SEL_PLLB
diff --git a/include/configs/snapper9g45.h b/include/configs/snapper9g45.h
index 72611fe..9e78fd2 100644
--- a/include/configs/snapper9g45.h
+++ b/include/configs/snapper9g45.h
@@ -38,9 +38,6 @@
#define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PC14
#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PC8
-/* Ethernet */
-#define CONFIG_TFTP_PORT
-
/* LCD */
#define CONFIG_ATMEL_LCD
#define CONFIG_GURNARD_SPLASH
diff --git a/net/Kconfig b/net/Kconfig
index 6505516..af6856f 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -83,6 +83,24 @@ config TFTP_BLOCKSIZE
almost-MTU block sizes.
You can also activate CONFIG_IP_DEFRAG to set a larger block.
+config TFTP_PORT
+ bool "Set TFTP UDP source/destination ports via the environment"
+ help
+ If this is defined, the environment variable tftpsrcp is used to
+ supply the TFTP UDP source port value. If tftpsrcp isn't defined,
+ the normal pseudo-random port number generator is used.
+
+ Also, the environment variable tftpdstp is used to supply the TFTP
+ UDP destination port value. If tftpdstp isn't defined, the normal
+ port 69 is used.
+
+ The purpose for tftpsrcp is to allow a TFTP server to blindly start
+ the TFTP transfer using the pre-configured target IP address and UDP
+ port. This has the effect of "punching through" the (Windows XP)
+ firewall, allowing the remainder of the TFTP transfer to proceed
+ normally. A better solution is to properly configure the firewall,
+ but sometimes that is not allowed.
+
config TFTP_WINDOWSIZE
int "TFTP window size"
default 1