[U-Boot] [PATCH 2/2] net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig
Marek Vasut
marek.vasut at gmail.com
Tue Jun 11 02:51:15 UTC 2019
Convert CONFIG_TFTP_BLOCKSIZE to Kconfig, update defconfigs,
headers and whitelist.
Signed-off-by: Marek Vasut <marek.vasut+renesas at gmail.com>
Cc: Christian Gmeiner <christian.gmeiner at gmail.com>
Cc: Joe Hershberger <joe.hershberger at ni.com>
---
configs/apalis-tk1_defconfig | 1 +
configs/apalis_imx6_defconfig | 1 +
configs/apalis_t30_defconfig | 1 +
configs/colibri-imx6ull_defconfig | 1 +
configs/colibri_imx6_defconfig | 1 +
configs/colibri_imx7_defconfig | 1 +
configs/colibri_imx7_emmc_defconfig | 1 +
configs/colibri_t20_defconfig | 1 +
configs/colibri_t30_defconfig | 1 +
configs/xilinx_versal_virt_defconfig | 1 +
include/configs/apalis-tk1.h | 1 -
include/configs/apalis_imx6.h | 1 -
include/configs/apalis_t30.h | 1 -
include/configs/colibri-imx6ull.h | 1 -
include/configs/colibri_imx6.h | 1 -
include/configs/colibri_imx7.h | 1 -
include/configs/colibri_t20.h | 1 -
include/configs/colibri_t30.h | 1 -
include/configs/xilinx_versal.h | 2 --
net/Kconfig | 6 ++++++
scripts/config_whitelist.txt | 1 -
21 files changed, 16 insertions(+), 11 deletions(-)
diff --git a/configs/apalis-tk1_defconfig b/configs/apalis-tk1_defconfig
index 54031aa3b7..820fc6e5f0 100644
--- a/configs/apalis-tk1_defconfig
+++ b/configs/apalis-tk1_defconfig
@@ -31,6 +31,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_LIVE=y
CONFIG_DEFAULT_DEVICE_TREE="tegra124-apalis"
CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
CONFIG_SPL_DM=y
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
index 26cd36efc7..248922cd56 100644
--- a/configs/apalis_imx6_defconfig
+++ b/configs/apalis_imx6_defconfig
@@ -54,6 +54,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6-apalis"
CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=4096
CONFIG_DWC_AHSATA=y
CONFIG_DFU_MMC=y
CONFIG_DM_GPIO=y
diff --git a/configs/apalis_t30_defconfig b/configs/apalis_t30_defconfig
index 1a48c553b9..9fde233220 100644
--- a/configs/apalis_t30_defconfig
+++ b/configs/apalis_t30_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_LIVE=y
CONFIG_DEFAULT_DEVICE_TREE="tegra30-apalis"
CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
CONFIG_SPL_DM=y
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
diff --git a/configs/colibri-imx6ull_defconfig b/configs/colibri-imx6ull_defconfig
index 9c92f49494..1c027299b6 100644
--- a/configs/colibri-imx6ull_defconfig
+++ b/configs/colibri-imx6ull_defconfig
@@ -46,6 +46,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6ull-colibri"
CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
CONFIG_DFU_MMC=y
CONFIG_DFU_NAND=y
CONFIG_DM_GPIO=y
diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
index 1ebdb5dcbb..56e512d529 100644
--- a/configs/colibri_imx6_defconfig
+++ b/configs/colibri_imx6_defconfig
@@ -54,6 +54,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6-colibri"
CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
CONFIG_DFU_MMC=y
CONFIG_DM_GPIO=y
CONFIG_DM_I2C=y
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig
index 8f9edf3b44..a689d886b7 100644
--- a/configs/colibri_imx7_defconfig
+++ b/configs/colibri_imx7_defconfig
@@ -46,6 +46,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-rawnand"
CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
CONFIG_FSL_CAAM=y
CONFIG_DFU_NAND=y
CONFIG_DM_GPIO=y
diff --git a/configs/colibri_imx7_emmc_defconfig b/configs/colibri_imx7_emmc_defconfig
index 08da620c50..50d8de5f8b 100644
--- a/configs/colibri_imx7_emmc_defconfig
+++ b/configs/colibri_imx7_emmc_defconfig
@@ -41,6 +41,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-emmc"
CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
CONFIG_FSL_CAAM=y
CONFIG_DFU_MMC=y
CONFIG_DM_GPIO=y
diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index 127523de9f..ee2ccd0e04 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -36,6 +36,7 @@ CONFIG_OF_LIVE=y
CONFIG_DEFAULT_DEVICE_TREE="tegra20-colibri"
CONFIG_ENV_IS_IN_NAND=y
CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=1536
CONFIG_SPL_DM=y
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
diff --git a/configs/colibri_t30_defconfig b/configs/colibri_t30_defconfig
index 326548e84a..04368d3e4e 100644
--- a/configs/colibri_t30_defconfig
+++ b/configs/colibri_t30_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT4_WRITE=y
CONFIG_OF_LIVE=y
CONFIG_DEFAULT_DEVICE_TREE="tegra30-colibri"
CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=16352
CONFIG_SPL_DM=y
CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
diff --git a/configs/xilinx_versal_virt_defconfig b/configs/xilinx_versal_virt_defconfig
index 9000573cda..3ce6c031ad 100644
--- a/configs/xilinx_versal_virt_defconfig
+++ b/configs/xilinx_versal_virt_defconfig
@@ -43,6 +43,7 @@ CONFIG_EFI_PARTITION=y
CONFIG_OF_BOARD=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=4096
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_DM_GPIO=y
CONFIG_DM_I2C=y
diff --git a/include/configs/apalis-tk1.h b/include/configs/apalis-tk1.h
index e43fd8fe5e..ec599d5332 100644
--- a/include/configs/apalis-tk1.h
+++ b/include/configs/apalis-tk1.h
@@ -31,7 +31,6 @@
#define CONFIG_E1000_NO_NVM
/* General networking support */
-#define CONFIG_TFTP_BLOCKSIZE 16352
#define CONFIG_TFTP_TSIZE
#undef CONFIG_IPADDR
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index f2cc898878..348f08d1a6 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -59,7 +59,6 @@
#define CONFIG_FEC_XCV_TYPE RGMII
#define CONFIG_ETHPRIME "FEC"
#define CONFIG_FEC_MXC_PHYADDR 6
-#define CONFIG_TFTP_BLOCKSIZE 4096
#define CONFIG_TFTP_TSIZE
/* USB Configs */
diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h
index c085be8b5f..f6adfeb96a 100644
--- a/include/configs/apalis_t30.h
+++ b/include/configs/apalis_t30.h
@@ -28,7 +28,6 @@
#define CONFIG_E1000_NO_NVM
/* General networking support */
-#define CONFIG_TFTP_BLOCKSIZE 16352
#define CONFIG_TFTP_TSIZE
/* Increase console I/O buffer size */
diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h
index aed22284e4..99540cc677 100644
--- a/include/configs/colibri-imx6ull.h
+++ b/include/configs/colibri-imx6ull.h
@@ -19,7 +19,6 @@
#define CONFIG_SYS_MALLOC_LEN (32 * SZ_1M)
/* Network */
-#define CONFIG_TFTP_BLOCKSIZE 16352
#define CONFIG_TFTP_TSIZE
/* ENET1 */
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index 44f63e6a2a..4f68f744b5 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -50,7 +50,6 @@
#define CONFIG_FEC_XCV_TYPE RMII
#define CONFIG_ETHPRIME "FEC"
#define CONFIG_FEC_MXC_PHYADDR 1
-#define CONFIG_TFTP_BLOCKSIZE 16352
#define CONFIG_TFTP_TSIZE
/* USB Configs */
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index 5b3817359a..3bd179149a 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -22,7 +22,6 @@
#define CONFIG_ETHPRIME "FEC"
#define CONFIG_FEC_MXC_PHYADDR 0
-#define CONFIG_TFTP_BLOCKSIZE 16352
#define CONFIG_TFTP_TSIZE
/* ENET1 */
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index dd9f7225a0..cd7e168781 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -18,7 +18,6 @@
#define CONFIG_MACH_TYPE MACH_TYPE_COLIBRI_TEGRA2
/* General networking support */
-#define CONFIG_TFTP_BLOCKSIZE 1536
#define CONFIG_TFTP_TSIZE
/* LCD support */
diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h
index a816ade310..8ff6433f45 100644
--- a/include/configs/colibri_t30.h
+++ b/include/configs/colibri_t30.h
@@ -27,7 +27,6 @@
#define CONFIG_SYS_MMC_ENV_PART 1
/* General networking support */
-#define CONFIG_TFTP_BLOCKSIZE 16352
#define CONFIG_TFTP_TSIZE
/* Increase console I/O buffer size */
diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h
index b2521df3db..296f4502c6 100644
--- a/include/configs/xilinx_versal.h
+++ b/include/configs/xilinx_versal.h
@@ -41,8 +41,6 @@
#define CONFIG_BOOTP_BOOTFILESIZE
#define CONFIG_BOOTP_MAY_FAIL
-#define CONFIG_TFTP_BLOCKSIZE 4096
-
/* Miscellaneous configurable options */
#define CONFIG_SYS_LOAD_ADDR 0x8000000
diff --git a/net/Kconfig b/net/Kconfig
index 1a6fda9ebc..68cecf75a2 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -29,4 +29,10 @@ config IP_DEFRAG
Selecting this will enable IP datagram reassembly according
to the algorithm in RFC815.
+config TFTP_BLOCKSIZE
+ int "TFTP block size"
+ default 512
+ help
+ Default TFTP block size.
+
endif # if NET
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 8ec700f6ca..2a465d0d55 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -4250,7 +4250,6 @@ CONFIG_TESTPIN_MASK
CONFIG_TESTPIN_REG
CONFIG_TEST_LIST_SORT
CONFIG_TFP410_I2C_ADDR
-CONFIG_TFTP_BLOCKSIZE
CONFIG_TFTP_FILE_NAME_MAX_LEN
CONFIG_TFTP_PORT
CONFIG_TFTP_TSIZE
--
2.20.1
More information about the U-Boot
mailing list