[U-Boot] [PATCH 1/5] fs: Migrate ext4 to Kconfig

Migrate the following symbols to Kconfig:
CONFIG_FS_EXT4 CONFIG_EXT4_WRITE
The definitions in config_fallbacks.h can now be expressed in Kconfig.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com --- cmd/Kconfig | 3 +++ configs/ds109_defconfig | 1 + configs/mx25pdk_defconfig | 1 + doc/README.ext4 | 22 +++++++++++----------- fs/ext4/Kconfig | 13 +++++++++++++ include/config_fallbacks.h | 9 --------- include/configs/am335x_shc.h | 2 -- include/configs/brppt1.h | 8 -------- include/configs/hikey.h | 2 -- include/configs/mx25pdk.h | 5 ----- include/configs/pic32mzdask.h | 3 --- include/configs/rcar-gen2-common.h | 2 -- include/configs/rcar-gen3-common.h | 2 -- include/configs/rk3128_common.h | 1 - include/configs/rk3328_common.h | 1 - include/configs/rk3399_common.h | 1 - include/configs/s5p_goni.h | 5 ----- include/configs/sandbox.h | 2 -- include/configs/tegra-common-post.h | 5 ----- scripts/config_whitelist.txt | 2 -- 20 files changed, 29 insertions(+), 61 deletions(-)
diff --git cmd/Kconfig cmd/Kconfig index c033223526..797f4bf597 100644 --- cmd/Kconfig +++ cmd/Kconfig @@ -1357,17 +1357,20 @@ config CMD_CRAMFS
config CMD_EXT2 bool "ext2 command support" + select FS_EXT4 help Enables EXT2 FS command
config CMD_EXT4 bool "ext4 command support" + select FS_EXT4 help Enables EXT4 FS command
config CMD_EXT4_WRITE depends on CMD_EXT4 bool "ext4 write command support" + select EXT4_WRITE help Enables EXT4 FS write command
diff --git configs/ds109_defconfig configs/ds109_defconfig index 6d513cf584..428ac8ce64 100644 --- configs/ds109_defconfig +++ configs/ds109_defconfig @@ -22,3 +22,4 @@ CONFIG_SPI_FLASH_STMICRO=y CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_EHCI_HCD=y +CONFIG_FS_EXT4=y diff --git configs/mx25pdk_defconfig configs/mx25pdk_defconfig index 2905614c28..563c7acd60 100644 --- configs/mx25pdk_defconfig +++ configs/mx25pdk_defconfig @@ -17,5 +17,6 @@ CONFIG_CMD_DATE=y CONFIG_CMD_FS_GENERIC=y CONFIG_DOS_PARTITION=y CONFIG_ENV_IS_IN_MMC=y +CONFIG_FS_EXT4=y CONFIG_FS_FAT=y CONFIG_OF_LIBFDT=y diff --git doc/README.ext4 doc/README.ext4 index 2b0eab5dde..8ecd21eee3 100644 --- doc/README.ext4 +++ doc/README.ext4 @@ -2,10 +2,10 @@ U-Boot supports access of both ext2 and ext4 filesystems, either in read-only mode or in read-write mode.
First, to enable support for both ext4 (and, automatically, ext2 as well), -but without selecting the corresponding commands, use one of: +but without selecting the corresponding commands, enable one of the following:
- #define CONFIG_FS_EXT4 (for read-only) - #define CONFIG_EXT4_WRITE (for read-write) + CONFIG_FS_EXT4 (for read-only) + CONFIG_EXT4_WRITE (for read-write)
Next, to select the ext2-related commands:
@@ -20,22 +20,22 @@ or ext4-related commands:
use one or both of:
- #define CONFIG_CMD_EXT2 - #define CONFIG_CMD_EXT4 + CONFIG_CMD_EXT2 + CONFIG_CMD_EXT4
-Selecting either of the above automatically defines CONFIG_FS_EXT4 if it -wasn't defined already. +Selecting either of the above automatically selects CONFIG_FS_EXT4 if it +wasn't enabled already.
-In addition, to get the write access command "ext4write", use: +In addition, to get the write access command "ext4write", enable:
- #define CONFIG_CMD_EXT4_WRITE + CONFIG_CMD_EXT4_WRITE
-which automatically defines CONFIG_EXT4_WRITE if it wasn't defined +which automatically selects CONFIG_EXT4_WRITE if it wasn't defined already.
Also relevant are the generic filesystem commands, selected by:
- #define CONFIG_CMD_FS_GENERIC + CONFIG_CMD_FS_GENERIC
This does not automatically enable EXT4 support for you, you still need to do that yourself. diff --git fs/ext4/Kconfig fs/ext4/Kconfig index e69de29bb2..1a913d2b6d 100644 --- fs/ext4/Kconfig +++ fs/ext4/Kconfig @@ -0,0 +1,13 @@ +config FS_EXT4 + bool "Enable ext4 filesystem support" + help + This provides support for reading images from the ext4 filesystem. + ext4 is a widely used general-purpose filesystem for Linux. + You can also enable CMD_EXT4 to get access to ext4 commands. + +config EXT4_WRITE + bool "Enable ext4 filesystem write support" + depends on FS_EXT4 + help + This provides support for creating and writing new files to an + existing ext4 filesystem partition. diff --git include/config_fallbacks.h include/config_fallbacks.h index 2c4d43d672..527dfc71fa 100644 --- include/config_fallbacks.h +++ include/config_fallbacks.h @@ -33,15 +33,6 @@ #define CONFIG_FS_FAT #endif
-#if (defined(CONFIG_CMD_EXT4) || defined(CONFIG_CMD_EXT2)) && \ - !defined(CONFIG_FS_EXT4) -#define CONFIG_FS_EXT4 -#endif - -#if defined(CONFIG_CMD_EXT4_WRITE) && !defined(CONFIG_EXT4_WRITE) -#define CONFIG_EXT4_WRITE -#endif - /* Rather than repeat this expression each time, add a define for it */ #if defined(CONFIG_IDE) || \ defined(CONFIG_SATA) || \ diff --git include/configs/am335x_shc.h include/configs/am335x_shc.h index 32439f5c47..e2d329acab 100644 --- include/configs/am335x_shc.h +++ include/configs/am335x_shc.h @@ -17,8 +17,6 @@
/* settings we don;t want on this board */ #undef CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC -#undef CONFIG_CMD_EXT4 -#undef CONFIG_CMD_EXT4_WRITE #undef CONFIG_CMD_SPI
#define CONFIG_CMD_CACHE diff --git include/configs/brppt1.h include/configs/brppt1.h index 2dadcaecf5..ad83753647 100644 --- include/configs/brppt1.h +++ include/configs/brppt1.h @@ -245,13 +245,5 @@ MMCARGS #else #error "no storage for Environment defined!" #endif -/* - * Common filesystems support. When we have removable storage we - * enabled a number of useful commands and support. - */ -#if defined(CONFIG_MMC) || defined(CONFIG_USB_STORAGE) -#define CONFIG_FS_EXT4 -#define CONFIG_EXT4_WRITE -#endif /* CONFIG_MMC, ... */
#endif /* ! __CONFIG_BRPPT1_H__ */ diff --git include/configs/hikey.h include/configs/hikey.h index 7eaa6e4667..130c7694bf 100644 --- include/configs/hikey.h +++ include/configs/hikey.h @@ -66,8 +66,6 @@ /* SD/MMC configuration */ #define CONFIG_BOUNCE_BUFFER
-#define CONFIG_FS_EXT4 - /* Command line configuration */
#define CONFIG_MTD_PARTITIONS diff --git include/configs/mx25pdk.h include/configs/mx25pdk.h index 8e8946a6b4..f82c4ccbde 100644 --- include/configs/mx25pdk.h +++ include/configs/mx25pdk.h @@ -65,11 +65,6 @@ #define CONFIG_CMDLINE_EDITING #define CONFIG_SYS_LONGHELP
-/* U-Boot commands */ - -/* Filesystem support */ -#define CONFIG_FS_EXT4 - /* Ethernet */ #define CONFIG_FEC_MXC #define CONFIG_FEC_MXC_PHYADDR 0x1f diff --git include/configs/pic32mzdask.h include/configs/pic32mzdask.h index 97636fee38..cf31a38c86 100644 --- include/configs/pic32mzdask.h +++ include/configs/pic32mzdask.h @@ -88,9 +88,6 @@ /* FAT FS */ #define CONFIG_SUPPORT_VFAT
-/* EXT4 FS */ -#define CONFIG_FS_EXT4 - /* ------------------------------------------------- * Environment */ diff --git include/configs/rcar-gen2-common.h include/configs/rcar-gen2-common.h index 2c10e6152d..19c4c4c72b 100644 --- include/configs/rcar-gen2-common.h +++ include/configs/rcar-gen2-common.h @@ -13,8 +13,6 @@
/* Support File sytems */ #define CONFIG_SUPPORT_VFAT -#define CONFIG_FS_EXT4 -#define CONFIG_EXT4_WRITE
#define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS diff --git include/configs/rcar-gen3-common.h include/configs/rcar-gen3-common.h index 30a98b8ada..7e23b5e054 100644 --- include/configs/rcar-gen3-common.h +++ include/configs/rcar-gen3-common.h @@ -19,8 +19,6 @@
/* Support File sytems */ #define CONFIG_SUPPORT_VFAT -#define CONFIG_FS_EXT4 -#define CONFIG_EXT4_WRITE
#define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS diff --git include/configs/rk3128_common.h include/configs/rk3128_common.h index e915a562b9..b83528edd1 100644 --- include/configs/rk3128_common.h +++ include/configs/rk3128_common.h @@ -31,7 +31,6 @@ #define CONFIG_BOUNCE_BUFFER
#define CONFIG_SUPPORT_VFAT -#define CONFIG_FS_EXT4
/* RAW SD card / eMMC locations. */ #define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10) diff --git include/configs/rk3328_common.h include/configs/rk3328_common.h index af556323f8..8c1a0e9260 100644 --- include/configs/rk3328_common.h +++ include/configs/rk3328_common.h @@ -25,7 +25,6 @@ #define CONFIG_BOUNCE_BUFFER
#define CONFIG_SUPPORT_VFAT -#define CONFIG_FS_EXT4
/* RAW SD card / eMMC locations. */ #define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10) diff --git include/configs/rk3399_common.h include/configs/rk3399_common.h index 561bfa73b6..21395bab8a 100644 --- include/configs/rk3399_common.h +++ include/configs/rk3399_common.h @@ -39,7 +39,6 @@ #define CONFIG_ROCKCHIP_SDHCI_MAX_FREQ 200000000
#define CONFIG_SUPPORT_VFAT -#define CONFIG_FS_EXT4
/* RAW SD card / eMMC locations. */ #define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10) diff --git include/configs/s5p_goni.h include/configs/s5p_goni.h index 86835e735e..fef4d55351 100644 --- include/configs/s5p_goni.h +++ include/configs/s5p_goni.h @@ -188,11 +188,6 @@ #define CONFIG_SAMSUNG_ONENAND 1 #define CONFIG_SYS_ONENAND_BASE 0xB0000000
-/* write support for filesystems */ -#define CONFIG_EXT4_WRITE - -/* GPT */ - #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR - 0x1000000)
#define CONFIG_USB_GADGET_DWC2_OTG_PHY diff --git include/configs/sandbox.h include/configs/sandbox.h index f0426567fd..cfb3e7affd 100644 --- include/configs/sandbox.h +++ include/configs/sandbox.h @@ -25,8 +25,6 @@
#define CONFIG_LMB
-#define CONFIG_FS_EXT4 -#define CONFIG_EXT4_WRITE #define CONFIG_HOST_MAX_DEVICES 4
/* diff --git include/configs/tegra-common-post.h include/configs/tegra-common-post.h index 743be6bb56..aea8f1fb8e 100644 --- include/configs/tegra-common-post.h +++ include/configs/tegra-common-post.h @@ -113,11 +113,6 @@ #ifdef CONFIG_CMD_I2C #endif
-/* remove partitions/filesystems */ -#ifdef CONFIG_FS_EXT4 -#undef CONFIG_FS_EXT4 -#endif - /* remove USB */ #ifdef CONFIG_USB_EHCI_TEGRA #undef CONFIG_USB_EHCI_TEGRA diff --git scripts/config_whitelist.txt scripts/config_whitelist.txt index 43a4ff0892..0433399a88 100644 --- scripts/config_whitelist.txt +++ scripts/config_whitelist.txt @@ -610,7 +610,6 @@ CONFIG_ETHER_ON_FCC3 CONFIG_ETHPRIME CONFIG_ETH_BUFSIZE CONFIG_ETH_RXSIZE -CONFIG_EXT4_WRITE CONFIG_EXTRA_BOOTARGS CONFIG_EXTRA_CLOCK CONFIG_EXTRA_ENV @@ -760,7 +759,6 @@ CONFIG_FSL_VIA CONFIG_FSMC_NAND_BASE CONFIG_FSMTDBLK CONFIG_FSNOTIFY -CONFIG_FS_EXT4 CONFIG_FS_POSIX_ACL CONFIG_FTAHBC020S CONFIG_FTAHBC020S_BASE

The symbol's been converted to Kconfig for a while, poplar is the only one #defining it.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com --- configs/poplar_defconfig | 1 + include/configs/poplar.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-)
diff --git configs/poplar_defconfig configs/poplar_defconfig index 8f6ac2de19..71ff228cad 100644 --- configs/poplar_defconfig +++ configs/poplar_defconfig @@ -17,4 +17,5 @@ CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_STORAGE=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y +CONFIG_FAT_WRITE=y CONFIG_LIB_RAND=y diff --git include/configs/poplar.h include/configs/poplar.h index 1c39ed153f..8c67002919 100644 --- include/configs/poplar.h +++ include/configs/poplar.h @@ -66,7 +66,6 @@ #define CONFIG_SYS_MMC_ENV_DEV 0 #define CONFIG_ENV_OFFSET (0x780 * 512) /* env_mmc_blknum */ #define CONFIG_ENV_SIZE 0x10000 /* env_mmc_nblks bytes */ -#define CONFIG_FAT_WRITE #define CONFIG_ENV_VARS_UBOOT_CONFIG
/* Monitor Command Prompt */

On Fri, Jan 05, 2018 at 02:45:18AM +0200, Tuomas Tynkkynen wrote:
The symbol's been converted to Kconfig for a while, poplar is the only one #defining it.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com
Applied to u-boot/master, thanks!

Make it select FS_FAT as well, because if it's not selected, enabling ENV_IS_IN_FAT causes a Kconfig warning:
warning: (ENV_IS_IN_FAT) selects FAT_WRITE which has unmet direct dependencies (FS_FAT)
This also allows dropping some code from config_fallbacks.
Also drop the unnecessary help text about having to enable CONFIG_FAT_WRITE - Kconfig automatically handles that.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com --- env/Kconfig | 4 +--- include/config_fallbacks.h | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-)
diff --git env/Kconfig env/Kconfig index bef6e89bfc..063c2bdc56 100644 --- env/Kconfig +++ env/Kconfig @@ -74,13 +74,11 @@ config ENV_IS_IN_EEPROM config ENV_IS_IN_FAT bool "Environment is in a FAT filesystem" depends on !CHAIN_OF_TRUST + select FS_FAT select FAT_WRITE help Define this if you want to use the FAT file system for the environment.
- - CONFIG_FAT_WRITE: - This must be enabled. Otherwise it cannot save the environment file. - config ENV_IS_IN_FLASH bool "Environment in flash memory" depends on !CHAIN_OF_TRUST diff --git include/config_fallbacks.h include/config_fallbacks.h index 527dfc71fa..76b13c3b30 100644 --- include/config_fallbacks.h +++ include/config_fallbacks.h @@ -29,10 +29,6 @@ #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } #endif
-#if defined(CONFIG_ENV_IS_IN_FAT) && !defined(CONFIG_FS_FAT) -#define CONFIG_FS_FAT -#endif - /* Rather than repeat this expression each time, add a define for it */ #if defined(CONFIG_IDE) || \ defined(CONFIG_SATA) || \

On Fri, Jan 05, 2018 at 02:45:19AM +0200, Tuomas Tynkkynen wrote:
Make it select FS_FAT as well, because if it's not selected, enabling ENV_IS_IN_FAT causes a Kconfig warning:
warning: (ENV_IS_IN_FAT) selects FAT_WRITE which has unmet direct dependencies (FS_FAT)
This also allows dropping some code from config_fallbacks.
Also drop the unnecessary help text about having to enable CONFIG_FAT_WRITE - Kconfig automatically handles that.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com
Applied to u-boot/master, thanks!

Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com --- fs/fat/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git fs/fat/Kconfig fs/fat/Kconfig index e7978aae67..9bb11eac9f 100644 --- fs/fat/Kconfig +++ fs/fat/Kconfig @@ -14,7 +14,7 @@ config FAT_WRITE existing FAT filesystem partition.
config FS_FAT_MAX_CLUSTSIZE - int "Set maximum possible clusersize" + int "Set maximum possible clustersize" default 65536 depends on FS_FAT help

On Fri, Jan 05, 2018 at 02:45:20AM +0200, Tuomas Tynkkynen wrote:
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com
Applied to u-boot/master, thanks!

fat.h unconditionally defines CONFIG_SUPPORT_VFAT (and has done since 2003), so as a result VFAT support is always enabled regardless of whether a board config defines it or not. Drop this unnecessary option.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com --- fs/fat/fat.c | 12 +----------- fs/fat/fat_write.c | 3 +-- include/configs/MPC8349ITX.h | 8 -------- include/configs/apf27.h | 1 - include/configs/clearfog.h | 5 ----- include/configs/controlcenterdc.h | 3 --- include/configs/db-88f6720.h | 3 --- include/configs/db-88f6820-amc.h | 5 ----- include/configs/db-88f6820-gp.h | 5 ----- include/configs/db-mv784mp-gp.h | 3 --- include/configs/ds414.h | 1 - include/configs/edminiv2.h | 1 - include/configs/gplugd.h | 2 -- include/configs/mv-common.h | 7 ------- include/configs/mvebu_armada-37xx.h | 2 -- include/configs/mvebu_armada-8k.h | 2 -- include/configs/nas220.h | 1 - include/configs/pic32mzdask.h | 6 ------ include/configs/rcar-gen2-common.h | 3 --- include/configs/rcar-gen3-common.h | 3 --- include/configs/rk3128_common.h | 2 -- include/configs/rk3328_common.h | 2 -- include/configs/rk3399_common.h | 2 -- include/configs/theadorable.h | 3 --- include/configs/turris_omnia.h | 3 --- include/configs/vct.h | 1 - include/configs/x600.h | 4 ---- include/configs/x86-common.h | 2 -- include/configs/zmx25.h | 1 - include/configs/zynq-common.h | 4 ---- include/fat.h | 1 - scripts/config_whitelist.txt | 1 - 32 files changed, 2 insertions(+), 100 deletions(-)
diff --git fs/fat/fat.c fs/fat/fat.c index d16883fa10..a87034b24b 100644 --- fs/fat/fat.c +++ fs/fat/fat.c @@ -22,12 +22,6 @@ #include <linux/compiler.h> #include <linux/ctype.h>
-#ifdef CONFIG_SUPPORT_VFAT -static const int vfat_enabled = 1; -#else -static const int vfat_enabled = 0; -#endif - /* * Convert a string to lowercase. Converts at most 'len' characters, * 'len' may be larger than the length of 'str' if 'str' is NULL @@ -605,9 +599,6 @@ static int get_fs_info(fsdata *mydata) return -1; }
- if (vfat_enabled) - debug("VFAT Support enabled\n"); - debug("FAT%d, fat_sect: %d, fatlength: %d\n", mydata->fatsize, mydata->fat_sect, mydata->fatlength); debug("Rootdir begins at cluster: %d, sector: %d, offset: %x\n" @@ -857,8 +848,7 @@ static int fat_itr_next(fat_itr *itr) continue;
if (dent->attr & ATTR_VOLUME) { - if (vfat_enabled && - (dent->attr & ATTR_VFAT) == ATTR_VFAT && + if ((dent->attr & ATTR_VFAT) == ATTR_VFAT && (dent->name[0] & LAST_LONG_ENTRY_MASK)) { dent = extract_vfat_name(itr); if (!dent) diff --git fs/fat/fat_write.c fs/fat/fat_write.c index 9d2e0ed74c..2e0de8d50c 100644 --- fs/fat/fat_write.c +++ fs/fat/fat_write.c @@ -819,8 +819,7 @@ static dir_entry *find_directory_entry(fsdata *mydata, int startsect, continue; } if ((dentptr->attr & ATTR_VOLUME)) { - if (vfat_enabled && - (dentptr->attr & ATTR_VFAT) && + if ((dentptr->attr & ATTR_VFAT) && (dentptr->name[0] & LAST_LONG_ENTRY_MASK)) { get_long_file_name(mydata, curclust, get_dentfromdir_block, diff --git include/configs/MPC8349ITX.h include/configs/MPC8349ITX.h index c88aa95632..e2807a6b4f 100644 --- include/configs/MPC8349ITX.h +++ include/configs/MPC8349ITX.h @@ -470,14 +470,6 @@ boards, we say we have two, but don't display a message if we find only one. */ #define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_HOSTNAME
-#if defined(CONFIG_COMPACT_FLASH) || defined(CONFIG_SATA_SIL3114) \ - || defined(CONFIG_USB_STORAGE) - #define CONFIG_SUPPORT_VFAT -#endif - -#if defined(CONFIG_SATA_SIL3114) || defined(CONFIG_USB_STORAGE) -#endif - /* Watchdog */ #undef CONFIG_WATCHDOG /* watchdog disabled */
diff --git include/configs/apf27.h include/configs/apf27.h index 8294101029..24afc84a02 100644 --- include/configs/apf27.h +++ include/configs/apf27.h @@ -204,7 +204,6 @@ */ #define CONFIG_MTD_DEVICE #define CONFIG_MTD_PARTITIONS -#define CONFIG_SUPPORT_VFAT
/* * Ethernet (on SOC imx FEC) diff --git include/configs/clearfog.h include/configs/clearfog.h index bf87bac300..512c4632f1 100644 --- include/configs/clearfog.h +++ include/configs/clearfog.h @@ -40,11 +40,6 @@ */ #define CONFIG_SYS_MMC_BASE MVEBU_SDIO_BASE
-/* Partition support */ - -/* Additional FS support/configuration */ -#define CONFIG_SUPPORT_VFAT - /* USB/EHCI configuration */ #define CONFIG_EHCI_IS_TDI
diff --git include/configs/controlcenterdc.h include/configs/controlcenterdc.h index a882fa650b..bf324bbbbd 100644 --- include/configs/controlcenterdc.h +++ include/configs/controlcenterdc.h @@ -54,9 +54,6 @@ #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ CONFIG_SYS_SCSI_MAX_LUN)
-/* Additional FS support/configuration */ -#define CONFIG_SUPPORT_VFAT - /* USB/EHCI configuration */ #define CONFIG_EHCI_IS_TDI
diff --git include/configs/db-88f6720.h include/configs/db-88f6720.h index cdaaced2eb..67943bab3d 100644 --- include/configs/db-88f6720.h +++ include/configs/db-88f6720.h @@ -49,9 +49,6 @@
#define CONFIG_SYS_ALT_MEMTEST
-/* Additional FS support/configuration */ -#define CONFIG_SUPPORT_VFAT - /* * mv-common.h should be defined after CMD configs since it used them * to enable certain macros diff --git include/configs/db-88f6820-amc.h include/configs/db-88f6820-amc.h index b0e988d234..69ec662454 100644 --- include/configs/db-88f6820-amc.h +++ include/configs/db-88f6820-amc.h @@ -30,11 +30,6 @@ #define CONFIG_SF_DEFAULT_SPEED 1000000 #define CONFIG_SF_DEFAULT_MODE SPI_MODE_3
-/* Partition support */ - -/* Additional FS support/configuration */ -#define CONFIG_SUPPORT_VFAT - /* USB/EHCI configuration */ #define CONFIG_EHCI_IS_TDI
diff --git include/configs/db-88f6820-gp.h include/configs/db-88f6820-gp.h index 32f93f2f46..a3ab6ef037 100644 --- include/configs/db-88f6820-gp.h +++ include/configs/db-88f6820-gp.h @@ -50,11 +50,6 @@ #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ CONFIG_SYS_SCSI_MAX_LUN)
-/* Partition support */ - -/* Additional FS support/configuration */ -#define CONFIG_SUPPORT_VFAT - /* USB/EHCI configuration */ #define CONFIG_EHCI_IS_TDI
diff --git include/configs/db-mv784mp-gp.h include/configs/db-mv784mp-gp.h index 3dcc28710b..524a1cabc6 100644 --- include/configs/db-mv784mp-gp.h +++ include/configs/db-mv784mp-gp.h @@ -51,9 +51,6 @@ #define CONFIG_SYS_SATA_MAX_DEVICE 2 #define CONFIG_LBA48
-/* Additional FS support/configuration */ -#define CONFIG_SUPPORT_VFAT - /* PCIe support */ #ifndef CONFIG_SPL_BUILD #define CONFIG_PCI_MVEBU diff --git include/configs/ds414.h include/configs/ds414.h index c201dbf4d3..c840c935b2 100644 --- include/configs/ds414.h +++ include/configs/ds414.h @@ -68,7 +68,6 @@ #endif
/* why is this only defined in mv-common.h if CONFIG_DM is undefined? */ -#define CONFIG_SUPPORT_VFAT #define CONFIG_SYS_MVFS
/* diff --git include/configs/edminiv2.h include/configs/edminiv2.h index 2b7a5d7c5c..3473979c8f 100644 --- include/configs/edminiv2.h +++ include/configs/edminiv2.h @@ -166,7 +166,6 @@ */ #ifdef CONFIG_CMD_USB #define ORION5X_USB20_HOST_PORT_BASE ORION5X_USB20_PORT0_BASE -#define CONFIG_SUPPORT_VFAT #endif /* CONFIG_CMD_USB */
/* diff --git include/configs/gplugd.h include/configs/gplugd.h index dddd300fb5..67f06722f2 100644 --- include/configs/gplugd.h +++ include/configs/gplugd.h @@ -85,6 +85,4 @@ #define CONFIG_EHCI_IS_TDI #endif /* CONFIG_CMD_USB */
-#define CONFIG_SUPPORT_VFAT - #endif /* __CONFIG_GPLUGD_H */ diff --git include/configs/mv-common.h include/configs/mv-common.h index 7c2bab2fc6..1721fefd14 100644 --- include/configs/mv-common.h +++ include/configs/mv-common.h @@ -115,13 +115,6 @@ #ifdef CONFIG_CMD_SF #endif
-/* - * Common USB/EHCI configuration - */ -#if defined(CONFIG_CMD_USB) && !defined(CONFIG_DM) -#define CONFIG_SUPPORT_VFAT -#endif /* CONFIG_CMD_USB */ - /* * File system */ diff --git include/configs/mvebu_armada-37xx.h include/configs/mvebu_armada-37xx.h index af16b9454a..cd63133888 100644 --- include/configs/mvebu_armada-37xx.h +++ include/configs/mvebu_armada-37xx.h @@ -105,6 +105,4 @@ #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ CONFIG_SYS_SCSI_MAX_LUN)
-#define CONFIG_SUPPORT_VFAT - #endif /* _CONFIG_MVEBU_ARMADA_37XX_H */ diff --git include/configs/mvebu_armada-8k.h include/configs/mvebu_armada-8k.h index 7f143164c3..86e0d43821 100644 --- include/configs/mvebu_armada-8k.h +++ include/configs/mvebu_armada-8k.h @@ -105,8 +105,6 @@ #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ CONFIG_SYS_SCSI_MAX_LUN)
-#define CONFIG_SUPPORT_VFAT - /* * PCI configuration */ diff --git include/configs/nas220.h include/configs/nas220.h index 089263f96f..90be7bd010 100644 --- include/configs/nas220.h +++ include/configs/nas220.h @@ -91,7 +91,6 @@ #ifdef CONFIG_CMD_USB #define CONFIG_USB_EHCI_KIRKWOOD /* on Kirkwood platform */ #define CONFIG_EHCI_IS_TDI -#define CONFIG_SUPPORT_VFAT #endif /* CONFIG_CMD_USB */
/* diff --git include/configs/pic32mzdask.h include/configs/pic32mzdask.h index cf31a38c86..bb0eec66ff 100644 --- include/configs/pic32mzdask.h +++ include/configs/pic32mzdask.h @@ -82,12 +82,6 @@ */ #define CONFIG_USB_MUSB_PIO_ONLY
-/*----------------------------------------------------------------------- - * File System Configuration - */ -/* FAT FS */ -#define CONFIG_SUPPORT_VFAT - /* ------------------------------------------------- * Environment */ diff --git include/configs/rcar-gen2-common.h include/configs/rcar-gen2-common.h index 19c4c4c72b..d7792978f7 100644 --- include/configs/rcar-gen2-common.h +++ include/configs/rcar-gen2-common.h @@ -11,9 +11,6 @@
#include <asm/arch/rmobile.h>
-/* Support File sytems */ -#define CONFIG_SUPPORT_VFAT - #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG diff --git include/configs/rcar-gen3-common.h include/configs/rcar-gen3-common.h index 7e23b5e054..e9e5fecc12 100644 --- include/configs/rcar-gen3-common.h +++ include/configs/rcar-gen3-common.h @@ -17,9 +17,6 @@ /* boot option */ #define CONFIG_SUPPORT_RAW_INITRD
-/* Support File sytems */ -#define CONFIG_SUPPORT_VFAT - #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_INITRD_TAG diff --git include/configs/rk3128_common.h include/configs/rk3128_common.h index b83528edd1..8889046f2b 100644 --- include/configs/rk3128_common.h +++ include/configs/rk3128_common.h @@ -30,8 +30,6 @@ /* MMC/SD IP block */ #define CONFIG_BOUNCE_BUFFER
-#define CONFIG_SUPPORT_VFAT - /* RAW SD card / eMMC locations. */ #define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10)
diff --git include/configs/rk3328_common.h include/configs/rk3328_common.h index 8c1a0e9260..eba5a22e06 100644 --- include/configs/rk3328_common.h +++ include/configs/rk3328_common.h @@ -24,8 +24,6 @@ /* MMC/SD IP block */ #define CONFIG_BOUNCE_BUFFER
-#define CONFIG_SUPPORT_VFAT - /* RAW SD card / eMMC locations. */ #define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10)
diff --git include/configs/rk3399_common.h include/configs/rk3399_common.h index 21395bab8a..95f544ee58 100644 --- include/configs/rk3399_common.h +++ include/configs/rk3399_common.h @@ -38,8 +38,6 @@ #define CONFIG_BOUNCE_BUFFER #define CONFIG_ROCKCHIP_SDHCI_MAX_FREQ 200000000
-#define CONFIG_SUPPORT_VFAT - /* RAW SD card / eMMC locations. */ #define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10)
diff --git include/configs/theadorable.h include/configs/theadorable.h index 6e95aa1626..438abf10cc 100644 --- include/configs/theadorable.h +++ include/configs/theadorable.h @@ -67,9 +67,6 @@ #define CONFIG_SYS_SATA_MAX_DEVICE 1 #define CONFIG_LBA48
-/* Additional FS support/configuration */ -#define CONFIG_SUPPORT_VFAT - /* PCIe support */ #ifdef CONFIG_CMD_PCI #ifndef CONFIG_SPL_BUILD diff --git include/configs/turris_omnia.h include/configs/turris_omnia.h index 3dbd2cacba..40d94a2d24 100644 --- include/configs/turris_omnia.h +++ include/configs/turris_omnia.h @@ -59,9 +59,6 @@ #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ CONFIG_SYS_SCSI_MAX_LUN)
-/* Additional FS support/configuration */ -#define CONFIG_SUPPORT_VFAT - /* USB/EHCI configuration */ #define CONFIG_EHCI_IS_TDI
diff --git include/configs/vct.h include/configs/vct.h index 00ad134382..a5b5aafb40 100644 --- include/configs/vct.h +++ include/configs/vct.h @@ -72,7 +72,6 @@ * Commands */ #if defined(CONFIG_CMD_USB) -#define CONFIG_SUPPORT_VFAT
/* * USB/EHCI diff --git include/configs/x600.h include/configs/x600.h index 7363057a5c..4aa5a2a924 100644 --- include/configs/x600.h +++ include/configs/x600.h @@ -96,10 +96,6 @@ #define CONFIG_USB_EHCI_SPEAR #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
-/* Filesystem support (for USB key) */ -#define CONFIG_SUPPORT_VFAT - - /* * U-Boot Environment placing definitions. */ diff --git include/configs/x86-common.h include/configs/x86-common.h index 064c546403..994214ea48 100644 --- include/configs/x86-common.h +++ include/configs/x86-common.h @@ -58,8 +58,6 @@ #define CONFIG_CMDLINE_EDITING #define CONFIG_AUTO_COMPLETE
-#define CONFIG_SUPPORT_VFAT - /*----------------------------------------------------------------------- * Command line configuration. */ diff --git include/configs/zmx25.h include/configs/zmx25.h index 1ae1ca4317..f9783a21c2 100644 --- include/configs/zmx25.h +++ include/configs/zmx25.h @@ -82,7 +82,6 @@ #define CONFIG_MXC_USB_PORTSC MXC_EHCI_MODE_SERIAL #define CONFIG_MXC_USB_FLAGS (MXC_EHCI_INTERNAL_PHY | MXC_EHCI_IPPUE_DOWN) #define CONFIG_EHCI_IS_TDI -#define CONFIG_SUPPORT_VFAT #endif /* CONFIG_CMD_USB */
/* SDRAM */ diff --git include/configs/zynq-common.h include/configs/zynq-common.h index b10cb3f572..28cee15b37 100644 --- include/configs/zynq-common.h +++ include/configs/zynq-common.h @@ -124,10 +124,6 @@ # define DFU_ALT_INFO #endif
-#if defined(CONFIG_MMC_SDHCI_ZYNQ) || defined(CONFIG_ZYNQ_USB) -# define CONFIG_SUPPORT_VFAT -#endif - #if defined(CONFIG_ZYNQ_I2C0) || defined(CONFIG_ZYNQ_I2C1) #define CONFIG_SYS_I2C_ZYNQ #endif diff --git include/fat.h include/fat.h index bdeda95e6d..fa956441c6 100644 --- include/fat.h +++ include/fat.h @@ -13,7 +13,6 @@ #include <asm/byteorder.h> #include <fs.h>
-#define CONFIG_SUPPORT_VFAT /* Maximum Long File Name length supported here is 128 UTF-16 code units */ #define VFAT_MAXLEN_BYTES 256 /* Maximum LFN buffer in bytes */ #define VFAT_MAXSEQ 9 /* Up to 9 of 13 2-byte UTF-16 entries */ diff --git scripts/config_whitelist.txt scripts/config_whitelist.txt index 0433399a88..7f8bfefc6e 100644 --- scripts/config_whitelist.txt +++ scripts/config_whitelist.txt @@ -2214,7 +2214,6 @@ CONFIG_SUPERH_ON_CHIP_R8A66597 CONFIG_SUPPORT_EMMC_BOOT CONFIG_SUPPORT_EMMC_RPMB CONFIG_SUPPORT_RAW_INITRD -CONFIG_SUPPORT_VFAT CONFIG_SUVD3 CONFIG_SXNI855T CONFIG_SYSCOUNTER_TIMER

On Fri, Jan 05, 2018 at 02:45:21AM +0200, Tuomas Tynkkynen wrote:
fat.h unconditionally defines CONFIG_SUPPORT_VFAT (and has done since 2003), so as a result VFAT support is always enabled regardless of whether a board config defines it or not. Drop this unnecessary option.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com
Applied to u-boot/master, thanks!

On Fri, Jan 05, 2018 at 02:45:17AM +0200, Tuomas Tynkkynen wrote:
Migrate the following symbols to Kconfig:
CONFIG_FS_EXT4 CONFIG_EXT4_WRITE
The definitions in config_fallbacks.h can now be expressed in Kconfig.
Signed-off-by: Tuomas Tynkkynen tuomas@tuxera.com
Applied to u-boot/master, thanks!
participants (2)
-
Tom Rini
-
Tuomas Tynkkynen