summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/Kconfig12
-rw-r--r--configs/PLU405_defconfig1
-rw-r--r--configs/VCMA9_defconfig1
-rw-r--r--configs/a3m071_defconfig1
-rw-r--r--configs/a4m2k_defconfig1
-rw-r--r--configs/am335x_baltos_defconfig1
-rw-r--r--configs/am3517_evm_defconfig1
-rw-r--r--configs/apf27_defconfig1
-rw-r--r--configs/apx4devkit_defconfig1
-rw-r--r--configs/aristainetos2_defconfig3
-rw-r--r--configs/aristainetos2b_defconfig3
-rw-r--r--configs/aristainetos_defconfig3
-rw-r--r--configs/at91sam9x5ek_dataflash_defconfig1
-rw-r--r--configs/at91sam9x5ek_mmc_defconfig1
-rw-r--r--configs/at91sam9x5ek_nandflash_defconfig1
-rw-r--r--configs/at91sam9x5ek_spiflash_defconfig1
-rw-r--r--configs/colibri_imx7_defconfig2
-rw-r--r--configs/colibri_t20_defconfig2
-rw-r--r--configs/colibri_vf_defconfig2
-rw-r--r--configs/dns325_defconfig1
-rw-r--r--configs/dockstar_defconfig1
-rw-r--r--configs/draco_defconfig3
-rw-r--r--configs/ds414_defconfig1
-rw-r--r--configs/ea20_defconfig1
-rw-r--r--configs/eco5pk_defconfig1
-rw-r--r--configs/etamin_defconfig3
-rw-r--r--configs/ethernut5_defconfig1
-rw-r--r--configs/goflexhome_defconfig1
-rw-r--r--configs/guruplug_defconfig1
-rw-r--r--configs/gwventana_defconfig1
-rw-r--r--configs/ib62x0_defconfig1
-rw-r--r--configs/iconnect_defconfig1
-rw-r--r--configs/ids8313_defconfig1
-rw-r--r--configs/igep0020_defconfig1
-rw-r--r--configs/igep0030_defconfig1
-rw-r--r--configs/igep0030_nand_defconfig1
-rw-r--r--configs/igep0032_defconfig1
-rw-r--r--configs/ipam390_defconfig1
-rw-r--r--configs/k2e_evm_defconfig1
-rw-r--r--configs/k2g_evm_defconfig1
-rw-r--r--configs/k2hk_evm_defconfig1
-rw-r--r--configs/k2l_evm_defconfig1
-rw-r--r--configs/km_kirkwood_128m16_defconfig1
-rw-r--r--configs/km_kirkwood_defconfig1
-rw-r--r--configs/km_kirkwood_pci_defconfig1
-rw-r--r--configs/kmcoge4_defconfig1
-rw-r--r--configs/kmcoge5ne_defconfig1
-rw-r--r--configs/kmcoge5un_defconfig1
-rw-r--r--configs/kmeter1_defconfig1
-rw-r--r--configs/kmlion1_defconfig1
-rw-r--r--configs/kmnusa_defconfig1
-rw-r--r--configs/kmopti2_defconfig1
-rw-r--r--configs/kmsugp1_defconfig1
-rw-r--r--configs/kmsupx5_defconfig1
-rw-r--r--configs/kmsuv31_defconfig1
-rw-r--r--configs/kmtegr1_defconfig1
-rw-r--r--configs/kmtepr2_defconfig1
-rw-r--r--configs/kmvect1_defconfig1
-rw-r--r--configs/m28evk_defconfig1
-rw-r--r--configs/m53evk_defconfig1
-rw-r--r--configs/mcx_defconfig1
-rw-r--r--configs/mgcoge3ne_defconfig1
-rw-r--r--configs/mgcoge3un_defconfig1
-rw-r--r--configs/mgcoge_defconfig1
-rw-r--r--configs/microblaze-generic_defconfig1
-rw-r--r--configs/mt_ventoux_defconfig1
-rw-r--r--configs/mx28evk_auart_console_defconfig1
-rw-r--r--configs/mx28evk_defconfig1
-rw-r--r--configs/mx28evk_nand_defconfig1
-rw-r--r--configs/mx28evk_spi_defconfig1
-rw-r--r--configs/nas220_defconfig1
-rw-r--r--configs/nsa310s_defconfig1
-rw-r--r--configs/omap3_logic_defconfig1
-rw-r--r--configs/omap3_overo_defconfig1
-rw-r--r--configs/omap3_pandora_defconfig1
-rw-r--r--configs/omapl138_lcdk_defconfig1
-rw-r--r--configs/openrd_base_defconfig1
-rw-r--r--configs/openrd_client_defconfig1
-rw-r--r--configs/openrd_ultimate_defconfig1
-rw-r--r--configs/pcm052_defconfig1
-rw-r--r--configs/pcm058_defconfig1
-rw-r--r--configs/platinum_picon_defconfig1
-rw-r--r--configs/platinum_titanium_defconfig1
-rw-r--r--configs/pogo_e02_defconfig1
-rw-r--r--configs/portl2_defconfig1
-rw-r--r--configs/pxm2_defconfig3
-rw-r--r--configs/rastaban_defconfig3
-rw-r--r--configs/rut_defconfig3
-rw-r--r--configs/sama5d3_xplained_mmc_defconfig1
-rw-r--r--configs/sama5d3_xplained_nandflash_defconfig1
-rw-r--r--configs/sheevaplug_defconfig1
-rw-r--r--configs/smdk2410_defconfig1
-rw-r--r--configs/socfpga_arria5_defconfig1
-rw-r--r--configs/socfpga_cyclone5_defconfig1
-rw-r--r--configs/socfpga_de0_nano_soc_defconfig1
-rw-r--r--configs/socfpga_is1_defconfig1
-rw-r--r--configs/socfpga_mcvevk_defconfig1
-rw-r--r--configs/socfpga_sockit_defconfig1
-rw-r--r--configs/socfpga_socrates_defconfig1
-rw-r--r--configs/socfpga_sr1500_defconfig1
-rw-r--r--configs/socfpga_vining_fpga_defconfig2
-rw-r--r--configs/suvd3_defconfig1
-rw-r--r--configs/thuban_defconfig3
-rw-r--r--configs/titanium_defconfig1
-rw-r--r--configs/tricorder_defconfig1
-rw-r--r--configs/tricorder_flash_defconfig1
-rw-r--r--configs/tuge1_defconfig1
-rw-r--r--configs/tuxx1_defconfig1
-rw-r--r--configs/twister_defconfig1
-rw-r--r--configs/vct_platinum_onenand_defconfig1
-rw-r--r--configs/vct_platinum_onenand_small_defconfig1
-rw-r--r--configs/vct_platinumavc_onenand_defconfig1
-rw-r--r--configs/vct_platinumavc_onenand_small_defconfig1
-rw-r--r--configs/vct_premium_onenand_defconfig1
-rw-r--r--configs/vct_premium_onenand_small_defconfig1
-rw-r--r--configs/vf610twr_defconfig1
-rw-r--r--configs/vf610twr_nand_defconfig1
-rw-r--r--configs/x600_defconfig1
-rw-r--r--drivers/mtd/Kconfig2
-rw-r--r--drivers/mtd/ubi/Kconfig98
-rw-r--r--include/config_cmd_all.h1
-rw-r--r--include/configs/M54418TWR.h1
-rw-r--r--include/configs/PLU405.h1
-rw-r--r--include/configs/VCMA9.h1
-rw-r--r--include/configs/a3m071.h1
-rw-r--r--include/configs/am3517_evm.h1
-rw-r--r--include/configs/apf27.h1
-rw-r--r--include/configs/apx4devkit.h1
-rw-r--r--include/configs/aristainetos-common.h4
-rw-r--r--include/configs/at91sam9x5ek.h1
-rw-r--r--include/configs/baltos.h1
-rw-r--r--include/configs/colibri_imx7.h2
-rw-r--r--include/configs/colibri_t20.h2
-rw-r--r--include/configs/colibri_vf.h2
-rw-r--r--include/configs/da850evm.h1
-rw-r--r--include/configs/dockstar.h1
-rw-r--r--include/configs/ea20.h1
-rw-r--r--include/configs/ethernut5.h1
-rw-r--r--include/configs/gw_ventana.h1
-rw-r--r--include/configs/iconnect.h1
-rw-r--r--include/configs/ids8313.h1
-rw-r--r--include/configs/ipam390.h1
-rw-r--r--include/configs/km/keymile-common.h1
-rw-r--r--include/configs/m28evk.h1
-rw-r--r--include/configs/m53evk.h1
-rw-r--r--include/configs/mcx.h1
-rw-r--r--include/configs/microblaze-generic.h3
-rw-r--r--include/configs/mv-common.h1
-rw-r--r--include/configs/mx28evk.h1
-rw-r--r--include/configs/nas220.h1
-rw-r--r--include/configs/nokia_rx51.h1
-rw-r--r--include/configs/omap3_igep00x0.h1
-rw-r--r--include/configs/omap3_logic.h1
-rw-r--r--include/configs/omap3_overo.h1
-rw-r--r--include/configs/omap3_pandora.h1
-rw-r--r--include/configs/omapl138_lcdk.h1
-rw-r--r--include/configs/pcm052.h1
-rw-r--r--include/configs/pcm058.h1
-rw-r--r--include/configs/platinum.h1
-rw-r--r--include/configs/pogo_e02.h1
-rw-r--r--include/configs/sama5d3_xplained.h1
-rw-r--r--include/configs/siemens-am33x-common.h3
-rw-r--r--include/configs/smdk2410.h1
-rw-r--r--include/configs/socfpga_common.h1
-rw-r--r--include/configs/socfpga_vining_fpga.h2
-rw-r--r--include/configs/tam3517-common.h1
-rw-r--r--include/configs/ti_armv7_keystone2.h1
-rw-r--r--include/configs/titanium.h1
-rw-r--r--include/configs/tricorder.h1
-rw-r--r--include/configs/vct.h1
-rw-r--r--include/configs/vf610twr.h1
-rw-r--r--include/configs/x600.h1
-rw-r--r--include/ubi_uboot.h7
-rw-r--r--scripts/config_whitelist.txt6
174 files changed, 251 insertions, 76 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index d28da54ed65..9ed7976f585 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -705,4 +705,16 @@ config CMD_FS_GENERIC
fs types.
endmenu
+config CMD_UBI
+ tristate "Enable UBI - Unsorted block images commands"
+ select CRC32
+ select MTD_UBI
+ help
+ UBI is a software layer above MTD layer which admits use of LVM-like
+ logical volumes on top of MTD devices, hides some complexities of
+ flash chips like wear and bad blocks and provides some other useful
+ capabilities. Please, consult the MTD web site for more details
+ (www.linux-mtd.infradead.org). Activate this option if you want
+ to use U-Boot UBI commands.
+
endmenu
diff --git a/configs/PLU405_defconfig b/configs/PLU405_defconfig
index e84a88e44b9..f694f775096 100644
--- a/configs/PLU405_defconfig
+++ b/configs/PLU405_defconfig
@@ -14,6 +14,7 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/VCMA9_defconfig b/configs/VCMA9_defconfig
index e6646fabde1..da568a167bb 100644
--- a/configs/VCMA9_defconfig
+++ b/configs/VCMA9_defconfig
@@ -11,5 +11,6 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/a3m071_defconfig b/configs/a3m071_defconfig
index 18237b7aa11..9e573a7b38c 100644
--- a/configs/a3m071_defconfig
+++ b/configs/a3m071_defconfig
@@ -18,5 +18,6 @@ CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_LINK_LOCAL=y
CONFIG_CMD_CACHE=y
+CONFIG_CMD_UBI=y
CONFIG_LIB_RAND=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/a4m2k_defconfig b/configs/a4m2k_defconfig
index 3f2a58a6f1a..aa09bf5e647 100644
--- a/configs/a4m2k_defconfig
+++ b/configs/a4m2k_defconfig
@@ -19,5 +19,6 @@ CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_LINK_LOCAL=y
CONFIG_CMD_CACHE=y
+CONFIG_CMD_UBI=y
CONFIG_LIB_RAND=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/am335x_baltos_defconfig b/configs/am335x_baltos_defconfig
index cc26882c429..16cdea10a44 100644
--- a/configs/am335x_baltos_defconfig
+++ b/configs/am335x_baltos_defconfig
@@ -41,6 +41,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig
index 6fd6fb1a74f..291f570ada0 100644
--- a/configs/am3517_evm_defconfig
+++ b/configs/am3517_evm_defconfig
@@ -30,6 +30,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/apf27_defconfig b/configs/apf27_defconfig
index 320fb3cfd4a..a02e180d2f2 100644
--- a/configs/apf27_defconfig
+++ b/configs/apf27_defconfig
@@ -20,4 +20,5 @@ CONFIG_CMD_DNS=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/apx4devkit_defconfig b/configs/apx4devkit_defconfig
index 8213a896a83..5b9c0afde75 100644
--- a/configs/apx4devkit_defconfig
+++ b/configs/apx4devkit_defconfig
@@ -20,6 +20,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/aristainetos2_defconfig b/configs/aristainetos2_defconfig
index 84e3bf6882a..35d7e944f27 100644
--- a/configs/aristainetos2_defconfig
+++ b/configs/aristainetos2_defconfig
@@ -22,8 +22,11 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/aristainetos2b_defconfig b/configs/aristainetos2b_defconfig
index 21765aa8bb1..6b2c44dc124 100644
--- a/configs/aristainetos2b_defconfig
+++ b/configs/aristainetos2b_defconfig
@@ -22,8 +22,11 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/aristainetos_defconfig b/configs/aristainetos_defconfig
index 1e6954e2a75..a06d9ee1d4e 100644
--- a/configs/aristainetos_defconfig
+++ b/configs/aristainetos_defconfig
@@ -22,8 +22,11 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/at91sam9x5ek_dataflash_defconfig b/configs/at91sam9x5ek_dataflash_defconfig
index 6771f57dd84..beeb8cc0633 100644
--- a/configs/at91sam9x5ek_dataflash_defconfig
+++ b/configs/at91sam9x5ek_dataflash_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_USB=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
CONFIG_USB=y
diff --git a/configs/at91sam9x5ek_mmc_defconfig b/configs/at91sam9x5ek_mmc_defconfig
index 7995c23fb48..eb88bbbf14d 100644
--- a/configs/at91sam9x5ek_mmc_defconfig
+++ b/configs/at91sam9x5ek_mmc_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_USB=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
CONFIG_USB=y
diff --git a/configs/at91sam9x5ek_nandflash_defconfig b/configs/at91sam9x5ek_nandflash_defconfig
index b8766fd8616..4b28d745c23 100644
--- a/configs/at91sam9x5ek_nandflash_defconfig
+++ b/configs/at91sam9x5ek_nandflash_defconfig
@@ -23,6 +23,7 @@ CONFIG_CMD_USB=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
CONFIG_USB=y
diff --git a/configs/at91sam9x5ek_spiflash_defconfig b/configs/at91sam9x5ek_spiflash_defconfig
index b6ed43ac2a6..4a1ea42feb2 100644
--- a/configs/at91sam9x5ek_spiflash_defconfig
+++ b/configs/at91sam9x5ek_spiflash_defconfig
@@ -24,6 +24,7 @@ CONFIG_CMD_USB=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
CONFIG_USB=y
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig
index 5302fe314fa..439bb19701a 100644
--- a/configs/colibri_imx7_defconfig
+++ b/configs/colibri_imx7_defconfig
@@ -29,6 +29,8 @@ CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
+CONFIG_MTD_UBI_FASTMAP=y
CONFIG_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index fb5055b308e..4eb391634ed 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -29,7 +29,9 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPL_DM=y
+CONFIG_MTD_UBI_FASTMAP=y
CONFIG_DM_PMIC=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig
index a045a3f39d3..c7fc7991f74 100644
--- a/configs/colibri_vf_defconfig
+++ b/configs/colibri_vf_defconfig
@@ -23,12 +23,14 @@ CONFIG_CMD_PING=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_DM=y
CONFIG_DM_GPIO=y
CONFIG_VYBRID_GPIO=y
CONFIG_NAND_VF610_NFC=y
CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y
+CONFIG_MTD_UBI_FASTMAP=y
CONFIG_DM_SERIAL=y
CONFIG_FSL_LPUART=y
CONFIG_DM_SPI=y
diff --git a/configs/dns325_defconfig b/configs/dns325_defconfig
index 450e13ec74a..a26629d4014 100644
--- a/configs/dns325_defconfig
+++ b/configs/dns325_defconfig
@@ -13,6 +13,7 @@ CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/dockstar_defconfig b/configs/dockstar_defconfig
index 15b54c809d9..645f6521140 100644
--- a/configs/dockstar_defconfig
+++ b/configs/dockstar_defconfig
@@ -13,6 +13,7 @@ CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/draco_defconfig b/configs/draco_defconfig
index fe51e24548b..6c432f31dac 100644
--- a/configs/draco_defconfig
+++ b/configs/draco_defconfig
@@ -38,10 +38,13 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_EXT2=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig
index 916ea23e2ca..1d16833c8f0 100644
--- a/configs/ds414_defconfig
+++ b/configs/ds414_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_TIME=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SPL_OF_TRANSLATE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
diff --git a/configs/ea20_defconfig b/configs/ea20_defconfig
index 5e31c1b2ef7..0e2887886d0 100644
--- a/configs/ea20_defconfig
+++ b/configs/ea20_defconfig
@@ -16,6 +16,7 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
diff --git a/configs/eco5pk_defconfig b/configs/eco5pk_defconfig
index 03aaa2a5615..77f3cd57002 100644
--- a/configs/eco5pk_defconfig
+++ b/configs/eco5pk_defconfig
@@ -19,6 +19,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/etamin_defconfig b/configs/etamin_defconfig
index af6a80a513a..6fc76bd57af 100644
--- a/configs/etamin_defconfig
+++ b/configs/etamin_defconfig
@@ -38,10 +38,13 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_EXT2=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/ethernut5_defconfig b/configs/ethernut5_defconfig
index 58f0f7c2904..a89aa522866 100644
--- a/configs/ethernut5_defconfig
+++ b/configs/ethernut5_defconfig
@@ -24,6 +24,7 @@ CONFIG_CMD_DNS=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
CONFIG_USB=y
diff --git a/configs/goflexhome_defconfig b/configs/goflexhome_defconfig
index 8d67f77a6f2..22e8452c9be 100644
--- a/configs/goflexhome_defconfig
+++ b/configs/goflexhome_defconfig
@@ -14,6 +14,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/guruplug_defconfig b/configs/guruplug_defconfig
index 3ac89e353d0..becc5872cb7 100644
--- a/configs/guruplug_defconfig
+++ b/configs/guruplug_defconfig
@@ -16,6 +16,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/gwventana_defconfig b/configs/gwventana_defconfig
index 51989629576..0f726aefd53 100644
--- a/configs/gwventana_defconfig
+++ b/configs/gwventana_defconfig
@@ -39,6 +39,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_DM=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
diff --git a/configs/ib62x0_defconfig b/configs/ib62x0_defconfig
index f79f938d7d3..bfeb06ecefe 100644
--- a/configs/ib62x0_defconfig
+++ b/configs/ib62x0_defconfig
@@ -16,6 +16,7 @@ CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/iconnect_defconfig b/configs/iconnect_defconfig
index c35ce082600..b59ff0920f9 100644
--- a/configs/iconnect_defconfig
+++ b/configs/iconnect_defconfig
@@ -12,6 +12,7 @@ CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/ids8313_defconfig b/configs/ids8313_defconfig
index 02ca830dc76..c083f8ae50a 100644
--- a/configs/ids8313_defconfig
+++ b/configs/ids8313_defconfig
@@ -19,5 +19,6 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_SNTP=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/igep0020_defconfig b/configs/igep0020_defconfig
index 6da10bab2ff..0ec4ebc04fe 100644
--- a/configs/igep0020_defconfig
+++ b/configs/igep0020_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/igep0030_defconfig b/configs/igep0030_defconfig
index 66371d6964e..bc0ec6ab70f 100644
--- a/configs/igep0030_defconfig
+++ b/configs/igep0030_defconfig
@@ -26,5 +26,6 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/igep0030_nand_defconfig b/configs/igep0030_nand_defconfig
index f63bcacad17..075088149b9 100644
--- a/configs/igep0030_nand_defconfig
+++ b/configs/igep0030_nand_defconfig
@@ -26,5 +26,6 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/igep0032_defconfig b/configs/igep0032_defconfig
index 991d9d7e501..280afbde1b4 100644
--- a/configs/igep0032_defconfig
+++ b/configs/igep0032_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/ipam390_defconfig b/configs/ipam390_defconfig
index 545d5584b12..d0fdcac1076 100644
--- a/configs/ipam390_defconfig
+++ b/configs/ipam390_defconfig
@@ -17,4 +17,5 @@ CONFIG_CMD_ASKENV=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
diff --git a/configs/k2e_evm_defconfig b/configs/k2e_evm_defconfig
index da61a4ac2d4..1c040aa17dd 100644
--- a/configs/k2e_evm_defconfig
+++ b/configs/k2e_evm_defconfig
@@ -32,6 +32,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig
index 2e31a74bd7b..13b91cd638b 100644
--- a/configs/k2g_evm_defconfig
+++ b/configs/k2g_evm_defconfig
@@ -32,6 +32,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_DM=y
CONFIG_DM_MMC=y
diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig
index 83e9d55272d..4ba0778e8f3 100644
--- a/configs/k2hk_evm_defconfig
+++ b/configs/k2hk_evm_defconfig
@@ -32,6 +32,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig
index 9205c927ea3..e91d1d0efd6 100644
--- a/configs/k2l_evm_defconfig
+++ b/configs/k2l_evm_defconfig
@@ -32,6 +32,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
diff --git a/configs/km_kirkwood_128m16_defconfig b/configs/km_kirkwood_128m16_defconfig
index c4b542a9f7d..b3045c798db 100644
--- a/configs/km_kirkwood_128m16_defconfig
+++ b/configs/km_kirkwood_128m16_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
diff --git a/configs/km_kirkwood_defconfig b/configs/km_kirkwood_defconfig
index 228f50e5ab3..f261bd40d81 100644
--- a/configs/km_kirkwood_defconfig
+++ b/configs/km_kirkwood_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
diff --git a/configs/km_kirkwood_pci_defconfig b/configs/km_kirkwood_pci_defconfig
index 04c3dcb8638..c2a6a433df3 100644
--- a/configs/km_kirkwood_pci_defconfig
+++ b/configs/km_kirkwood_pci_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
diff --git a/configs/kmcoge4_defconfig b/configs/kmcoge4_defconfig
index 3125387c371..02a352a1138 100644
--- a/configs/kmcoge4_defconfig
+++ b/configs/kmcoge4_defconfig
@@ -20,6 +20,7 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/kmcoge5ne_defconfig b/configs/kmcoge5ne_defconfig
index e03d71b2968..09b29b5e474 100644
--- a/configs/kmcoge5ne_defconfig
+++ b/configs/kmcoge5ne_defconfig
@@ -15,5 +15,6 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/kmcoge5un_defconfig b/configs/kmcoge5un_defconfig
index d35cf116e8a..b0e5ab1cbfc 100644
--- a/configs/kmcoge5un_defconfig
+++ b/configs/kmcoge5un_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
diff --git a/configs/kmeter1_defconfig b/configs/kmeter1_defconfig
index 52f8be1c928..61f887a48a3 100644
--- a/configs/kmeter1_defconfig
+++ b/configs/kmeter1_defconfig
@@ -15,5 +15,6 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/kmlion1_defconfig b/configs/kmlion1_defconfig
index bb388144455..39a85e1d4c3 100644
--- a/configs/kmlion1_defconfig
+++ b/configs/kmlion1_defconfig
@@ -20,6 +20,7 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/kmnusa_defconfig b/configs/kmnusa_defconfig
index bd3987dab4b..d0dc6fd3b47 100644
--- a/configs/kmnusa_defconfig
+++ b/configs/kmnusa_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
diff --git a/configs/kmopti2_defconfig b/configs/kmopti2_defconfig
index daf5a96fa94..e8a5b34de2c 100644
--- a/configs/kmopti2_defconfig
+++ b/configs/kmopti2_defconfig
@@ -15,5 +15,6 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/kmsugp1_defconfig b/configs/kmsugp1_defconfig
index ceeb8d9828c..e7ccc0a7f17 100644
--- a/configs/kmsugp1_defconfig
+++ b/configs/kmsugp1_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
diff --git a/configs/kmsupx5_defconfig b/configs/kmsupx5_defconfig
index 67e11f6622a..7894352ce4a 100644
--- a/configs/kmsupx5_defconfig
+++ b/configs/kmsupx5_defconfig
@@ -15,5 +15,6 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/kmsuv31_defconfig b/configs/kmsuv31_defconfig
index 5540343aae8..9a06d588588 100644
--- a/configs/kmsuv31_defconfig
+++ b/configs/kmsuv31_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
diff --git a/configs/kmtegr1_defconfig b/configs/kmtegr1_defconfig
index f0b1cca1e10..9bc00ad6d20 100644
--- a/configs/kmtegr1_defconfig
+++ b/configs/kmtegr1_defconfig
@@ -15,5 +15,6 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/kmtepr2_defconfig b/configs/kmtepr2_defconfig
index 936dd91d603..5248863a405 100644
--- a/configs/kmtepr2_defconfig
+++ b/configs/kmtepr2_defconfig
@@ -15,5 +15,6 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/kmvect1_defconfig b/configs/kmvect1_defconfig
index 3e310ba34c7..2e3413ce573 100644
--- a/configs/kmvect1_defconfig
+++ b/configs/kmvect1_defconfig
@@ -15,5 +15,6 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/m28evk_defconfig b/configs/m28evk_defconfig
index 46f427b32ee..2bfed596a85 100644
--- a/configs/m28evk_defconfig
+++ b/configs/m28evk_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_USB=y
diff --git a/configs/m53evk_defconfig b/configs/m53evk_defconfig
index 9779ae4239c..03a4bfd221c 100644
--- a/configs/m53evk_defconfig
+++ b/configs/m53evk_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/mcx_defconfig b/configs/mcx_defconfig
index eb88e6b3261..28837f9a606 100644
--- a/configs/mcx_defconfig
+++ b/configs/mcx_defconfig
@@ -23,6 +23,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_ULPI_VIEWPORT_OMAP=y
diff --git a/configs/mgcoge3ne_defconfig b/configs/mgcoge3ne_defconfig
index 3c3449c5cdd..5ed7c1b6484 100644
--- a/configs/mgcoge3ne_defconfig
+++ b/configs/mgcoge3ne_defconfig
@@ -15,4 +15,5 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/mgcoge3un_defconfig b/configs/mgcoge3un_defconfig
index 3ecfde4fb5c..8b9231cd8de 100644
--- a/configs/mgcoge3un_defconfig
+++ b/configs/mgcoge3un_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
diff --git a/configs/mgcoge_defconfig b/configs/mgcoge_defconfig
index 54c277f9537..c42ceb37c19 100644
--- a/configs/mgcoge_defconfig
+++ b/configs/mgcoge_defconfig
@@ -15,4 +15,5 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/microblaze-generic_defconfig b/configs/microblaze-generic_defconfig
index 15c6b007452..cf6c4b1f849 100644
--- a/configs/microblaze-generic_defconfig
+++ b/configs/microblaze-generic_defconfig
@@ -24,6 +24,7 @@ CONFIG_CMD_TFTPPUT=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_NETCONSOLE=y
diff --git a/configs/mt_ventoux_defconfig b/configs/mt_ventoux_defconfig
index ffa23adc380..0fdec873310 100644
--- a/configs/mt_ventoux_defconfig
+++ b/configs/mt_ventoux_defconfig
@@ -20,6 +20,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_ULPI_VIEWPORT_OMAP=y
diff --git a/configs/mx28evk_auart_console_defconfig b/configs/mx28evk_auart_console_defconfig
index e7bb119945e..f833edc155f 100644
--- a/configs/mx28evk_auart_console_defconfig
+++ b/configs/mx28evk_auart_console_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SST=y
CONFIG_USB=y
diff --git a/configs/mx28evk_defconfig b/configs/mx28evk_defconfig
index 19467d7481b..1ab2747736c 100644
--- a/configs/mx28evk_defconfig
+++ b/configs/mx28evk_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SST=y
CONFIG_USB=y
diff --git a/configs/mx28evk_nand_defconfig b/configs/mx28evk_nand_defconfig
index d4f14a8a4ce..af35c495740 100644
--- a/configs/mx28evk_nand_defconfig
+++ b/configs/mx28evk_nand_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SST=y
CONFIG_USB=y
diff --git a/configs/mx28evk_spi_defconfig b/configs/mx28evk_spi_defconfig
index 569e72cb78a..02a50bf3a4b 100644
--- a/configs/mx28evk_spi_defconfig
+++ b/configs/mx28evk_spi_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SST=y
CONFIG_USB=y
diff --git a/configs/nas220_defconfig b/configs/nas220_defconfig
index 8a0cc01fe35..c4e73078065 100644
--- a/configs/nas220_defconfig
+++ b/configs/nas220_defconfig
@@ -15,6 +15,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/nsa310s_defconfig b/configs/nsa310s_defconfig
index 0a9c15336d9..ec4fb5393b2 100644
--- a/configs/nsa310s_defconfig
+++ b/configs/nsa310s_defconfig
@@ -15,6 +15,7 @@ CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/omap3_logic_defconfig b/configs/omap3_logic_defconfig
index 454a090ccf4..26146d211b1 100644
--- a/configs/omap3_logic_defconfig
+++ b/configs/omap3_logic_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_MUSB_GADGET=y
diff --git a/configs/omap3_overo_defconfig b/configs/omap3_overo_defconfig
index e6ec9e869e6..a4160723116 100644
--- a/configs/omap3_overo_defconfig
+++ b/configs/omap3_overo_defconfig
@@ -28,6 +28,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/omap3_pandora_defconfig b/configs/omap3_pandora_defconfig
index 0c2c12be32b..e101614ab47 100644
--- a/configs/omap3_pandora_defconfig
+++ b/configs/omap3_pandora_defconfig
@@ -26,5 +26,6 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
index 9da7e466cf5..4d5f4087c65 100644
--- a/configs/omapl138_lcdk_defconfig
+++ b/configs/omapl138_lcdk_defconfig
@@ -19,6 +19,7 @@ CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_WINBOND=y
diff --git a/configs/openrd_base_defconfig b/configs/openrd_base_defconfig
index 1bb0b7e3f92..be99ea904e1 100644
--- a/configs/openrd_base_defconfig
+++ b/configs/openrd_base_defconfig
@@ -14,6 +14,7 @@ CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/openrd_client_defconfig b/configs/openrd_client_defconfig
index 61c4506166e..87b2e4549d1 100644
--- a/configs/openrd_client_defconfig
+++ b/configs/openrd_client_defconfig
@@ -14,6 +14,7 @@ CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/openrd_ultimate_defconfig b/configs/openrd_ultimate_defconfig
index 8ed8c1cc990..c216b9b8543 100644
--- a/configs/openrd_ultimate_defconfig
+++ b/configs/openrd_ultimate_defconfig
@@ -14,6 +14,7 @@ CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/pcm052_defconfig b/configs/pcm052_defconfig
index 52cb1d521e4..f7db263f25c 100644
--- a/configs/pcm052_defconfig
+++ b/configs/pcm052_defconfig
@@ -14,6 +14,7 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_DM=y
CONFIG_DM_GPIO=y
diff --git a/configs/pcm058_defconfig b/configs/pcm058_defconfig
index 36cef5636f8..b2f70ea0f87 100644
--- a/configs/pcm058_defconfig
+++ b/configs/pcm058_defconfig
@@ -35,6 +35,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_DM=y
CONFIG_MTD=y
CONFIG_SPI_FLASH=y
diff --git a/configs/platinum_picon_defconfig b/configs/platinum_picon_defconfig
index 65568f8edcb..71ebc257ee7 100644
--- a/configs/platinum_picon_defconfig
+++ b/configs/platinum_picon_defconfig
@@ -35,6 +35,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/platinum_titanium_defconfig b/configs/platinum_titanium_defconfig
index d49ff6d28d1..51aeff1ace8 100644
--- a/configs/platinum_titanium_defconfig
+++ b/configs/platinum_titanium_defconfig
@@ -35,6 +35,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/pogo_e02_defconfig b/configs/pogo_e02_defconfig
index 258adba48b4..cdb85d20f77 100644
--- a/configs/pogo_e02_defconfig
+++ b/configs/pogo_e02_defconfig
@@ -13,6 +13,7 @@ CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/portl2_defconfig b/configs/portl2_defconfig
index 546f785f73e..866171b390b 100644
--- a/configs/portl2_defconfig
+++ b/configs/portl2_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SYS_NS16550=y
diff --git a/configs/pxm2_defconfig b/configs/pxm2_defconfig
index c3efe57efeb..35fd2e8f06d 100644
--- a/configs/pxm2_defconfig
+++ b/configs/pxm2_defconfig
@@ -40,10 +40,13 @@ CONFIG_CMD_CACHE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/rastaban_defconfig b/configs/rastaban_defconfig
index 6105125e7cd..8664cab42e7 100644
--- a/configs/rastaban_defconfig
+++ b/configs/rastaban_defconfig
@@ -38,10 +38,13 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_EXT2=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/rut_defconfig b/configs/rut_defconfig
index 9430c229041..dde3747f84b 100644
--- a/configs/rut_defconfig
+++ b/configs/rut_defconfig
@@ -40,10 +40,13 @@ CONFIG_CMD_CACHE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig
index e09b4ac1ce3..521409a8d4a 100644
--- a/configs/sama5d3_xplained_mmc_defconfig
+++ b/configs/sama5d3_xplained_mmc_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig
index e4a6c013b29..18dfb5c3b74 100644
--- a/configs/sama5d3_xplained_nandflash_defconfig
+++ b/configs/sama5d3_xplained_nandflash_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/sheevaplug_defconfig b/configs/sheevaplug_defconfig
index e4c846f5fd1..67d75ecfb3c 100644
--- a/configs/sheevaplug_defconfig
+++ b/configs/sheevaplug_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/smdk2410_defconfig b/configs/smdk2410_defconfig
index 3d098ba3a1e..1cb79608872 100644
--- a/configs/smdk2410_defconfig
+++ b/configs/smdk2410_defconfig
@@ -10,5 +10,6 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
index abb89b2e66b..71708796e27 100644
--- a/configs/socfpga_arria5_defconfig
+++ b/configs/socfpga_arria5_defconfig
@@ -31,6 +31,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_DM_GPIO=y
diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index c73a9f211a1..e523176bcb3 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_defconfig
@@ -31,6 +31,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_DM_GPIO=y
diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig
index fa174be1c8f..a22c0227aa7 100644
--- a/configs/socfpga_de0_nano_soc_defconfig
+++ b/configs/socfpga_de0_nano_soc_defconfig
@@ -31,6 +31,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPL_DM=y
CONFIG_DM_GPIO=y
CONFIG_DWAPB_GPIO=y
diff --git a/configs/socfpga_is1_defconfig b/configs/socfpga_is1_defconfig
index 5c8037252b2..c3217f2c89f 100644
--- a/configs/socfpga_is1_defconfig
+++ b/configs/socfpga_is1_defconfig
@@ -27,6 +27,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_DM_GPIO=y
diff --git a/configs/socfpga_mcvevk_defconfig b/configs/socfpga_mcvevk_defconfig
index e6f2a81637e..4e6b3d4cb1b 100644
--- a/configs/socfpga_mcvevk_defconfig
+++ b/configs/socfpga_mcvevk_defconfig
@@ -31,6 +31,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPL_DM=y
CONFIG_DM_GPIO=y
CONFIG_DWAPB_GPIO=y
diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig
index 16d06d2fcad..3879cc9aaed 100644
--- a/configs/socfpga_sockit_defconfig
+++ b/configs/socfpga_sockit_defconfig
@@ -31,6 +31,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_DM_GPIO=y
diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index 7cc6f323fa5..d763b993bba 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -32,6 +32,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_DM_GPIO=y
diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig
index fa15fc32ac0..814b11138f0 100644
--- a/configs/socfpga_sr1500_defconfig
+++ b/configs/socfpga_sr1500_defconfig
@@ -30,6 +30,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_DM_GPIO=y
diff --git a/configs/socfpga_vining_fpga_defconfig b/configs/socfpga_vining_fpga_defconfig
index a5a950134a7..e9105b9b79b 100644
--- a/configs/socfpga_vining_fpga_defconfig
+++ b/configs/socfpga_vining_fpga_defconfig
@@ -33,6 +33,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
@@ -43,6 +44,7 @@ CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_MTD_UBI_FASTMAP=y
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_SYS_NS16550=y
diff --git a/configs/suvd3_defconfig b/configs/suvd3_defconfig
index 86c258ba7d6..e1b7cd8eb4a 100644
--- a/configs/suvd3_defconfig
+++ b/configs/suvd3_defconfig
@@ -15,5 +15,6 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/thuban_defconfig b/configs/thuban_defconfig
index daf7ef7a42e..ed36d7384f1 100644
--- a/configs/thuban_defconfig
+++ b/configs/thuban_defconfig
@@ -38,10 +38,13 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_EXT2=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
diff --git a/configs/titanium_defconfig b/configs/titanium_defconfig
index c64acf24a0b..478eba99598 100644
--- a/configs/titanium_defconfig
+++ b/configs/titanium_defconfig
@@ -23,6 +23,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/tricorder_defconfig b/configs/tricorder_defconfig
index 5c1837cc0b7..281eabb792f 100644
--- a/configs/tricorder_defconfig
+++ b/configs/tricorder_defconfig
@@ -16,5 +16,6 @@ CONFIG_CMD_I2C=y
# CONFIG_CMD_NFS is not set
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/tricorder_flash_defconfig b/configs/tricorder_flash_defconfig
index 351a8203254..7bdf5f527bc 100644
--- a/configs/tricorder_flash_defconfig
+++ b/configs/tricorder_flash_defconfig
@@ -16,5 +16,6 @@ CONFIG_CMD_I2C=y
# CONFIG_CMD_NFS is not set
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/tuge1_defconfig b/configs/tuge1_defconfig
index a042cf2f8f1..2465d820f0f 100644
--- a/configs/tuge1_defconfig
+++ b/configs/tuge1_defconfig
@@ -15,5 +15,6 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/tuxx1_defconfig b/configs/tuxx1_defconfig
index f3f7857f597..02f98c9c1c3 100644
--- a/configs/tuxx1_defconfig
+++ b/configs/tuxx1_defconfig
@@ -15,5 +15,6 @@ CONFIG_CMD_I2C=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/twister_defconfig b/configs/twister_defconfig
index f0246597fe3..f4191409483 100644
--- a/configs/twister_defconfig
+++ b/configs/twister_defconfig
@@ -20,6 +20,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_ULPI_VIEWPORT_OMAP=y
diff --git a/configs/vct_platinum_onenand_defconfig b/configs/vct_platinum_onenand_defconfig
index 54f85ab1a5b..5dcad0bb031 100644
--- a/configs/vct_platinum_onenand_defconfig
+++ b/configs/vct_platinum_onenand_defconfig
@@ -13,6 +13,7 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/vct_platinum_onenand_small_defconfig b/configs/vct_platinum_onenand_small_defconfig
index 3306a45e48d..63e670e9da8 100644
--- a/configs/vct_platinum_onenand_small_defconfig
+++ b/configs/vct_platinum_onenand_small_defconfig
@@ -19,4 +19,5 @@ CONFIG_SYS_PROMPT="$ "
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
# CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
diff --git a/configs/vct_platinumavc_onenand_defconfig b/configs/vct_platinumavc_onenand_defconfig
index 55dfd4cd49b..d0ef4dcd314 100644
--- a/configs/vct_platinumavc_onenand_defconfig
+++ b/configs/vct_platinumavc_onenand_defconfig
@@ -11,4 +11,5 @@ CONFIG_CMD_I2C=y
# CONFIG_CMD_NET is not set
CONFIG_CMD_DHCP=y
# CONFIG_CMD_NFS is not set
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
diff --git a/configs/vct_platinumavc_onenand_small_defconfig b/configs/vct_platinumavc_onenand_small_defconfig
index 98b5ea217c6..bdc286479fe 100644
--- a/configs/vct_platinumavc_onenand_small_defconfig
+++ b/configs/vct_platinumavc_onenand_small_defconfig
@@ -19,4 +19,5 @@ CONFIG_SYS_PROMPT="$ "
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
# CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
diff --git a/configs/vct_premium_onenand_defconfig b/configs/vct_premium_onenand_defconfig
index f5ed55a646d..e7a0a49f22a 100644
--- a/configs/vct_premium_onenand_defconfig
+++ b/configs/vct_premium_onenand_defconfig
@@ -13,6 +13,7 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_PING=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
CONFIG_USB=y
CONFIG_USB_STORAGE=y
diff --git a/configs/vct_premium_onenand_small_defconfig b/configs/vct_premium_onenand_small_defconfig
index ff5e7a68cd6..64f6dfb9162 100644
--- a/configs/vct_premium_onenand_small_defconfig
+++ b/configs/vct_premium_onenand_small_defconfig
@@ -19,4 +19,5 @@ CONFIG_SYS_PROMPT="$ "
# CONFIG_CMD_NET is not set
# CONFIG_CMD_NFS is not set
# CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
CONFIG_SYS_NS16550=y
diff --git a/configs/vf610twr_defconfig b/configs/vf610twr_defconfig
index d196738d199..5794c286793 100644
--- a/configs/vf610twr_defconfig
+++ b/configs/vf610twr_defconfig
@@ -15,6 +15,7 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_DM=y
CONFIG_DM_GPIO=y
diff --git a/configs/vf610twr_nand_defconfig b/configs/vf610twr_nand_defconfig
index faed3e0b32c..60d01265082 100644
--- a/configs/vf610twr_nand_defconfig
+++ b/configs/vf610twr_nand_defconfig
@@ -15,6 +15,7 @@ CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_FAT=y
+CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y
CONFIG_DM=y
CONFIG_DM_GPIO=y
diff --git a/configs/x600_defconfig b/configs/x600_defconfig
index 69501b43d5e..47579a56848 100644
--- a/configs/x600_defconfig
+++ b/configs/x600_defconfig
@@ -23,6 +23,7 @@ CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_UBI=y
CONFIG_SYS_I2C_DW=y
CONFIG_NETDEVICES=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 390e9e4ea3f..3a9705c41bd 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -40,3 +40,5 @@ endmenu
source "drivers/mtd/nand/Kconfig"
source "drivers/mtd/spi/Kconfig"
+
+source "drivers/mtd/ubi/Kconfig"
diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig
new file mode 100644
index 00000000000..0c82395317a
--- /dev/null
+++ b/drivers/mtd/ubi/Kconfig
@@ -0,0 +1,98 @@
+menu "UBI support"
+
+config MTD_UBI
+ bool "Enable UBI - Unsorted block images"
+ select CRC32
+ help
+ UBI is a software layer above MTD layer which admits of LVM-like
+ logical volumes on top of MTD devices, hides some complexities of
+ flash chips like wear and bad blocks and provides some other useful
+ capabilities. Please, consult the MTD web site for more details
+ (www.linux-mtd.infradead.org).
+
+if MTD_UBI
+
+config MTD_UBI_WL_THRESHOLD
+ int "UBI wear-leveling threshold"
+ default 4096
+ range 2 65536
+ help
+ This parameter defines the maximum difference between the highest
+ erase counter value and the lowest erase counter value of eraseblocks
+ of UBI devices. When this threshold is exceeded, UBI starts performing
+ wear leveling by means of moving data from eraseblock with low erase
+ counter to eraseblocks with high erase counter.
+
+ The default value should be OK for SLC NAND flashes, NOR flashes and
+ other flashes which have eraseblock life-cycle 100000 or more.
+ However, in case of MLC NAND flashes which typically have eraseblock
+ life-cycle less than 10000, the threshold should be lessened (e.g.,
+ to 128 or 256, although it does not have to be power of 2).
+
+config MTD_UBI_BEB_LIMIT
+ int "Maximum expected bad eraseblock count per 1024 eraseblocks"
+ default 20
+ range 0 768
+ help
+ This option specifies the maximum bad physical eraseblocks UBI
+ expects on the MTD device (per 1024 eraseblocks). If the underlying
+ flash does not admit of bad eraseblocks (e.g. NOR flash), this value
+ is ignored.
+
+ NAND datasheets often specify the minimum and maximum NVM (Number of
+ Valid Blocks) for the flashes' endurance lifetime. The maximum
+ expected bad eraseblocks per 1024 eraseblocks then can be calculated
+ as "1024 * (1 - MinNVB / MaxNVB)", which gives 20 for most NANDs
+ (MaxNVB is basically the total count of eraseblocks on the chip).
+
+ To put it differently, if this value is 20, UBI will try to reserve
+ about 1.9% of physical eraseblocks for bad blocks handling. And that
+ will be 1.9% of eraseblocks on the entire NAND chip, not just the MTD
+ partition UBI attaches. This means that if you have, say, a NAND
+ flash chip admits maximum 40 bad eraseblocks, and it is split on two
+ MTD partitions of the same size, UBI will reserve 40 eraseblocks when
+ attaching a partition.
+
+ This option can be overridden by the "mtd=" UBI module parameter or
+ by the "attach" ioctl.
+
+ Leave the default value if unsure.
+
+config MTD_UBI_FASTMAP
+ bool "UBI Fastmap (Experimental feature)"
+ default n
+ help
+ Important: this feature is experimental so far and the on-flash
+ format for fastmap may change in the next kernel versions
+
+ Fastmap is a mechanism which allows attaching an UBI device
+ in nearly constant time. Instead of scanning the whole MTD device it
+ only has to locate a checkpoint (called fastmap) on the device.
+ The on-flash fastmap contains all information needed to attach
+ the device. Using fastmap makes only sense on large devices where
+ attaching by scanning takes long. UBI will not automatically install
+ a fastmap on old images, but you can set the UBI module parameter
+ fm_autoconvert to 1 if you want so. Please note that fastmap-enabled
+ images are still usable with UBI implementations without
+ fastmap support. On typical flash devices the whole fastmap fits
+ into one PEB. UBI will reserve PEBs to hold two fastmaps.
+
+ If in doubt, say "N".
+
+config MTD_UBI_FASTMAP_AUTOCONVERT
+ int "enable UBI Fastmap autoconvert"
+ depends on MTD_UBI_FASTMAP
+ default 0
+ help
+ Set this parameter to enable fastmap automatically on images
+ without a fastmap.
+
+config MTD_UBI_FM_DEBUG
+ int "Enable UBI fastmap debug"
+ depends on MTD_UBI_FASTMAP
+ default 0
+ help
+ Enable UBI fastmap debug
+
+endif # MTD_UBI
+endmenu # "Enable UBI - Unsorted block images"
diff --git a/include/config_cmd_all.h b/include/config_cmd_all.h
index b5fd6c68e8f..0c4f6459301 100644
--- a/include/config_cmd_all.h
+++ b/include/config_cmd_all.h
@@ -48,7 +48,6 @@
#define CONFIG_SCSI /* SCSI Support */
#define CONFIG_CMD_SDRAM /* SDRAM DIMM SPD info printout */
#define CONFIG_CMD_TERMINAL /* built-in Serial Terminal */
-#define CONFIG_CMD_UBI /* UBI Support */
#define CONFIG_CMD_UBIFS /* UBIFS Support */
#define CONFIG_CMD_UNIVERSE /* Tundra Universe Support */
#define CONFIG_CMD_UNZIP /* unzip from memory to memory */
diff --git a/include/configs/M54418TWR.h b/include/configs/M54418TWR.h
index 63b0a1e0ed5..9754bbd8999 100644
--- a/include/configs/M54418TWR.h
+++ b/include/configs/M54418TWR.h
@@ -40,7 +40,6 @@
/* Command line configuration */
#undef CONFIG_CMD_DATE
#undef CONFIG_CMD_JFFS2
-#undef CONFIG_CMD_UBI
#undef CONFIG_CMD_NAND
#define CONFIG_CMD_REGINFO
diff --git a/include/configs/PLU405.h b/include/configs/PLU405.h
index 391a697735b..53e51e51352 100644
--- a/include/configs/PLU405.h
+++ b/include/configs/PLU405.h
@@ -374,7 +374,6 @@
/*
* UBI
*/
-#define CONFIG_CMD_UBI
#define CONFIG_RBTREE
#define CONFIG_MTD_DEVICE
#define CONFIG_MTD_PARTITIONS
diff --git a/include/configs/VCMA9.h b/include/configs/VCMA9.h
index a368d818944..913b099c568 100644
--- a/include/configs/VCMA9.h
+++ b/include/configs/VCMA9.h
@@ -192,7 +192,6 @@
#define MULTI_PURPOSE_SOCKET_ADDR 0x08000000
/* File system */
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_CMD_JFFS2
#define CONFIG_YAFFS2
diff --git a/include/configs/a3m071.h b/include/configs/a3m071.h
index a09224b976a..cc211c5e203 100644
--- a/include/configs/a3m071.h
+++ b/include/configs/a3m071.h
@@ -75,7 +75,6 @@
#define CONFIG_LZO /* needed for UBI */
#define CONFIG_RBTREE /* needed for UBI */
#define CONFIG_CMD_MTDPARTS
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
/*
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 434879fbba1..e18e39ab043 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -140,7 +140,6 @@
#define CONFIG_NAND_OMAP_GPMC
#define CONFIG_NAND_OMAP_GPMC_PREFETCH
#define CONFIG_BCH
-#define CONFIG_CMD_UBI /* UBI-formated MTD partition support */
#define CONFIG_CMD_UBIFS /* Read-only UBI volume operations */
#define CONFIG_RBTREE /* required by CONFIG_CMD_UBI */
#define CONFIG_LZO /* required by CONFIG_CMD_UBIFS */
diff --git a/include/configs/apf27.h b/include/configs/apf27.h
index e100b51e8e7..79366bed754 100644
--- a/include/configs/apf27.h
+++ b/include/configs/apf27.h
@@ -69,7 +69,6 @@
#define CONFIG_CMD_NAND /* NAND support */
#define CONFIG_CMD_NAND_LOCK_UNLOCK
#define CONFIG_CMD_NAND_TRIMFFS
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
/*
diff --git a/include/configs/apx4devkit.h b/include/configs/apx4devkit.h
index 92fea877212..80049f7982a 100644
--- a/include/configs/apx4devkit.h
+++ b/include/configs/apx4devkit.h
@@ -57,7 +57,6 @@
/* UBI and NAND partitioning */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_CMD_MTDPARTS
#define CONFIG_RBTREE
diff --git a/include/configs/aristainetos-common.h b/include/configs/aristainetos-common.h
index 6dc419e8a56..d6d9838858d 100644
--- a/include/configs/aristainetos-common.h
+++ b/include/configs/aristainetos-common.h
@@ -223,12 +223,8 @@
#define CONFIG_MTD_PARTITIONS
#define CONFIG_MTD_DEVICE
#define CONFIG_RBTREE
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
-#define CONFIG_MTD_UBI_FASTMAP
-#define CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT 1
-
#define CONFIG_HW_WATCHDOG
#define CONFIG_IMX_WATCHDOG
diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
index 716f8d05c34..edad1dd75b8 100644
--- a/include/configs/at91sam9x5ek.h
+++ b/include/configs/at91sam9x5ek.h
@@ -109,7 +109,6 @@
#define CONFIG_MTD_PARTITIONS
#define CONFIG_RBTREE
#define CONFIG_LZO
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#endif
diff --git a/include/configs/baltos.h b/include/configs/baltos.h
index 68f9b6d0137..58df571323e 100644
--- a/include/configs/baltos.h
+++ b/include/configs/baltos.h
@@ -48,7 +48,6 @@
#define CONFIG_MTD_DEVICE
#define CONFIG_RBTREE
#define CONFIG_LZO
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
/* I2C configuration */
diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h
index 2ec392e4b14..ba1adea364a 100644
--- a/include/configs/colibri_imx7.h
+++ b/include/configs/colibri_imx7.h
@@ -188,8 +188,6 @@
/* UBI stuff */
#define CONFIG_RBTREE
#define CONFIG_LZO
-#define CONFIG_CMD_UBI
-#define CONFIG_MTD_UBI_FASTMAP
#define CONFIG_CMD_UBIFS /* increases size by almost 60 KB */
/* Dynamic MTD partition support */
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index d9954c1b55d..b299e155a5a 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -74,10 +74,8 @@
#define CONFIG_ENV_SIZE (SZ_64K)
/* UBI */
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS /* increases size by almost 60 KB */
#define CONFIG_LZO
-#define CONFIG_MTD_UBI_FASTMAP
#define CONFIG_RBTREE
/* Debug commands */
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index d3e4523af88..0ee08e61d85 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -70,8 +70,6 @@
#define CONFIG_RBTREE
#define CONFIG_LZO
-#define CONFIG_CMD_UBI
-#define CONFIG_MTD_UBI_FASTMAP
#define CONFIG_CMD_UBIFS /* increases size by almost 60 KB */
#define CONFIG_FEC_MXC
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 4e228bc2987..2403ca3148a 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -298,7 +298,6 @@
#define CONFIG_MTD_PARTITIONS
#define CONFIG_LZO
#define CONFIG_RBTREE
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#endif
diff --git a/include/configs/dockstar.h b/include/configs/dockstar.h
index b52662043d9..781a8b573f2 100644
--- a/include/configs/dockstar.h
+++ b/include/configs/dockstar.h
@@ -82,7 +82,6 @@
* File system
*/
#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_RBTREE
#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index 910bcd40289..f49284c070c 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -160,7 +160,6 @@
#define CONFIG_MTD_PARTITIONS
#define CONFIG_LZO
#define CONFIG_RBTREE
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_NAND_DAVINCI
diff --git a/include/configs/ethernut5.h b/include/configs/ethernut5.h
index ce254b3b43d..0895497ed38 100644
--- a/include/configs/ethernut5.h
+++ b/include/configs/ethernut5.h
@@ -96,7 +96,6 @@
#define CONFIG_CMD_DATE
#define CONFIG_CMD_REISER
#define CONFIG_CMD_SAVES
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_CMD_UNZIP
#endif
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index b7945c208a3..f01a74a57b1 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -148,7 +148,6 @@
#define CONFIG_CMD_HDMIDETECT /* detect HDMI output device */
#define CONFIG_CMD_GSC
#define CONFIG_CMD_EECONFIG /* Gateworks EEPROM config cmd */
-#define CONFIG_CMD_UBI
#define CONFIG_RBTREE
/* Ethernet support */
diff --git a/include/configs/iconnect.h b/include/configs/iconnect.h
index 802b1a3c43e..633941b7dd5 100644
--- a/include/configs/iconnect.h
+++ b/include/configs/iconnect.h
@@ -90,7 +90,6 @@
* File system
*/
#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_RBTREE
#define CONFIG_MTD_DEVICE
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index c9d3b93fb52..112e8856b04 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -533,7 +533,6 @@
/* UBI Support */
#define CONFIG_CMD_NAND_TRIMFFS
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_RBTREE
#define CONFIG_LZO
diff --git a/include/configs/ipam390.h b/include/configs/ipam390.h
index 8a9cd45abca..5f07629a597 100644
--- a/include/configs/ipam390.h
+++ b/include/configs/ipam390.h
@@ -265,7 +265,6 @@
#define CONFIG_MTD_PARTITIONS
#define CONFIG_LZO
#define CONFIG_RBTREE
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define MTDIDS_NAME_STR "davinci_nand.0"
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index 8e1de7c8179..4ab96bf9393 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -65,7 +65,6 @@
#define CONFIG_BOOTP_HOSTNAME
/* UBI Support for all Keymile boards */
-#define CONFIG_CMD_UBI
#define CONFIG_RBTREE
#define CONFIG_MTD_PARTITIONS
#define CONFIG_MTD_DEVICE
diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
index cdd24cd9cea..4b95af33174 100644
--- a/include/configs/m28evk.h
+++ b/include/configs/m28evk.h
@@ -46,7 +46,6 @@
#define CONFIG_ENV_OFFSET_REDUND \
(CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_CMD_MTDPARTS
#define CONFIG_RBTREE
diff --git a/include/configs/m53evk.h b/include/configs/m53evk.h
index b159fde2337..5af55d8013e 100644
--- a/include/configs/m53evk.h
+++ b/include/configs/m53evk.h
@@ -115,7 +115,6 @@
#define CONFIG_ENV_OFFSET_REDUND \
(CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_CMD_MTDPARTS
#define CONFIG_RBTREE
diff --git a/include/configs/mcx.h b/include/configs/mcx.h
index 03c1c9169e7..b6a710f50dc 100644
--- a/include/configs/mcx.h
+++ b/include/configs/mcx.h
@@ -109,7 +109,6 @@
#define CONFIG_CMD_DATE
#define CONFIG_CMD_NAND /* NAND support */
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_RBTREE
#define CONFIG_LZO
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index c744d16e48b..a07bcc632ca 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -177,7 +177,6 @@
#if defined(FLASH)
# define CONFIG_CMD_JFFS2
-# define CONFIG_CMD_UBI
# undef CONFIG_CMD_UBIFS
# if !defined(RAMENV)
@@ -192,7 +191,6 @@
# endif
#else
# undef CONFIG_CMD_JFFS2
-# undef CONFIG_CMD_UBI
# undef CONFIG_CMD_UBIFS
#endif
#endif
@@ -202,7 +200,6 @@
#endif
#if defined(CONFIG_CMD_UBIFS)
-# define CONFIG_CMD_UBI
# define CONFIG_LZO
#endif
diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
index dd223be4fae..ed271c2490a 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -137,7 +137,6 @@
*/
#ifdef CONFIG_SYS_MVFS
#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_RBTREE
#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index b2bf5999a5f..808736bc1ab 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -69,7 +69,6 @@
/* UBI and NAND partitioning */
#ifdef CONFIG_CMD_NAND
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_CMD_MTDPARTS
#define CONFIG_RBTREE
diff --git a/include/configs/nas220.h b/include/configs/nas220.h
index 55dbc442573..7cfdacd789e 100644
--- a/include/configs/nas220.h
+++ b/include/configs/nas220.h
@@ -110,7 +110,6 @@
#define CONFIG_CMD_JFFS2
#define CONFIG_JFFS2_NAND
#define CONFIG_JFFS2_LZO
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_RBTREE
#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
index cdae5442534..41ebd6da265 100644
--- a/include/configs/nokia_rx51.h
+++ b/include/configs/nokia_rx51.h
@@ -135,7 +135,6 @@
#define CONFIG_CMD_MTDPARTS /* mtd parts support */
#ifdef UBIFS_SUPPORT
-#define CONFIG_CMD_UBI /* UBI Support */
#define CONFIG_CMD_UBIFS /* UBIFS Support */
#endif
diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h
index 1f3071021b7..9ca648dd44c 100644
--- a/include/configs/omap3_igep00x0.h
+++ b/include/configs/omap3_igep00x0.h
@@ -75,7 +75,6 @@
#define CONFIG_CMD_MTDPARTS
#define CONFIG_CMD_ONENAND
-#define CONFIG_CMD_UBI
#ifndef CONFIG_SPL_BUILD
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index 496da17b39f..6a60ec35527 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -93,7 +93,6 @@
#ifdef CONFIG_NAND
#define CONFIG_NAND_OMAP_GPMC
-#define CONFIG_CMD_UBI /* UBI-formated MTD partition support */
#define CONFIG_CMD_UBIFS /* Read-only UBI volume operations */
#define CONFIG_RBTREE /* required by CONFIG_CMD_UBI */
#define CONFIG_LZO /* required by CONFIG_CMD_UBIFS */
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index 8dffa892986..0036c5cab18 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -59,7 +59,6 @@
/* commands to include */
#ifdef CONFIG_NAND
-#define CONFIG_CMD_UBI /* UBI-formated MTD partition support */
#define CONFIG_CMD_UBIFS /* Read-only UBI volume operations */
#define CONFIG_RBTREE /* required by CONFIG_CMD_UBI */
diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
index b66431929c4..fce50f5d81f 100644
--- a/include/configs/omap3_pandora.h
+++ b/include/configs/omap3_pandora.h
@@ -69,7 +69,6 @@
#define CONFIG_SYS_NAND_OOBSIZE 64
#ifdef CONFIG_NAND
-#define CONFIG_CMD_UBI /* UBI-formated MTD partition support */
#define CONFIG_CMD_UBIFS /* Read-only UBI volume operations */
#define CONFIG_RBTREE /* required by CONFIG_CMD_UBI */
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index 5f8ce731f47..854fc478ad7 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -223,7 +223,6 @@
#define CONFIG_MTD_PARTITIONS
#define CONFIG_LZO
#define CONFIG_RBTREE
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#endif
diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h
index 57a76306e24..a70c9887e75 100644
--- a/include/configs/pcm052.h
+++ b/include/configs/pcm052.h
@@ -44,7 +44,6 @@
#define CONFIG_JFFS2_NAND
/* UBI */
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_RBTREE
#define CONFIG_LZO
diff --git a/include/configs/pcm058.h b/include/configs/pcm058.h
index 193f06e0035..c36245b4cc7 100644
--- a/include/configs/pcm058.h
+++ b/include/configs/pcm058.h
@@ -92,7 +92,6 @@
#define CONFIG_CMD_HDMIDETECT /* detect HDMI output device */
#define CONFIG_CMD_GSC
#define CONFIG_CMD_EECONFIG /* Gateworks EEPROM config cmd */
-#define CONFIG_CMD_UBI
#define CONFIG_RBTREE
/* Physical Memory Map */
diff --git a/include/configs/platinum.h b/include/configs/platinum.h
index e34cf3dfe63..f3ac4589aa0 100644
--- a/include/configs/platinum.h
+++ b/include/configs/platinum.h
@@ -23,7 +23,6 @@
#define CONFIG_CMD_MTDPARTS
#define CONFIG_CMD_NAND
#define CONFIG_CMD_NAND_TRIMFFS
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
/*
diff --git a/include/configs/pogo_e02.h b/include/configs/pogo_e02.h
index 5660cb040e7..fb1339c02de 100644
--- a/include/configs/pogo_e02.h
+++ b/include/configs/pogo_e02.h
@@ -81,7 +81,6 @@
* File system
*/
#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_RBTREE
#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
diff --git a/include/configs/sama5d3_xplained.h b/include/configs/sama5d3_xplained.h
index 070cfb18892..5e6617410c4 100644
--- a/include/configs/sama5d3_xplained.h
+++ b/include/configs/sama5d3_xplained.h
@@ -67,7 +67,6 @@
#define CONFIG_MTD_PARTITIONS
#define CONFIG_RBTREE
#define CONFIG_LZO
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#endif
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 96b8df0774b..d81e1a575d9 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -270,10 +270,7 @@
#define CONFIG_MTD_DEVICE
#define CONFIG_RBTREE
#define CONFIG_LZO
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
-#define CONFIG_MTD_UBI_FASTMAP
-#define CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT 1
#endif
/* Commen environment */
diff --git a/include/configs/smdk2410.h b/include/configs/smdk2410.h
index c8148bb7aec..f83a9c8e79e 100644
--- a/include/configs/smdk2410.h
+++ b/include/configs/smdk2410.h
@@ -166,7 +166,6 @@
/*
* File system
*/
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_CMD_MTDPARTS
#define CONFIG_MTD_DEVICE
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 93fe3154c9e..084874d2fd2 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -300,7 +300,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
/* UBI and UBIFS support */
#if defined(CONFIG_CMD_SF) || defined(CONFIG_CMD_NAND)
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_RBTREE
#define CONFIG_LZO
diff --git a/include/configs/socfpga_vining_fpga.h b/include/configs/socfpga_vining_fpga.h
index 1c7d45e4a8f..8d90c914baf 100644
--- a/include/configs/socfpga_vining_fpga.h
+++ b/include/configs/socfpga_vining_fpga.h
@@ -192,9 +192,7 @@
"else echo \"Unsupported boot mode: \"${bootmode} ; " \
"fi\0" \
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
-#define CONFIG_MTD_UBI_FASTMAP
#define CONFIG_RBTREE
#define CONFIG_LZO
#define MTDPARTS_DEFAULT \
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index 734c57e9e27..61c563eb274 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -250,7 +250,6 @@
#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
#define CONFIG_SYS_NAND_U_BOOT_SIZE 0x80000
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_RBTREE
#define CONFIG_LZO
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index d8f0847889b..9c0614e5669 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -204,7 +204,6 @@
/* U-Boot command configuration */
#define CONFIG_CMD_SAVES
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_CMD_EEPROM
diff --git a/include/configs/titanium.h b/include/configs/titanium.h
index f550aab2473..bbdaf0443d9 100644
--- a/include/configs/titanium.h
+++ b/include/configs/titanium.h
@@ -197,7 +197,6 @@
#define CONFIG_MTD_PARTITIONS
#define CONFIG_RBTREE
#define CONFIG_CMD_MTDPARTS
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#endif /* __CONFIG_H */
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index 37425c79f4e..c1c94954acf 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -146,7 +146,6 @@
#define CONFIG_CMD_MTDPARTS /* Enable MTD parts commands */
#define CONFIG_CMD_NAND /* NAND support */
#define CONFIG_CMD_NAND_LOCK_UNLOCK /* nand (un)lock commands */
-#define CONFIG_CMD_UBI /* UBI commands */
#define CONFIG_CMD_UBIFS /* UBIFS commands */
#define CONFIG_LZO /* LZO is needed for UBIFS */
diff --git a/include/configs/vct.h b/include/configs/vct.h
index 168902cb2f8..f2e0e5cad39 100644
--- a/include/configs/vct.h
+++ b/include/configs/vct.h
@@ -246,7 +246,6 @@ int vct_gpio_get(int pin);
#if defined(CONFIG_VCT_ONENAND)
#define CONFIG_SYS_USE_UBI
#define CONFIG_CMD_JFFS2
-#define CONFIG_CMD_UBI
#define CONFIG_RBTREE
#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
#define CONFIG_MTD_PARTITIONS
diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h
index 33f966ac6e4..03586f03d37 100644
--- a/include/configs/vf610twr.h
+++ b/include/configs/vf610twr.h
@@ -49,7 +49,6 @@
#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR
/* UBI */
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_RBTREE
#define CONFIG_LZO
diff --git a/include/configs/x600.h b/include/configs/x600.h
index 9db45247dd7..f15b1f90072 100644
--- a/include/configs/x600.h
+++ b/include/configs/x600.h
@@ -115,7 +115,6 @@
#define CONFIG_CMD_MTDPARTS
#define CONFIG_CMD_NAND
#define CONFIG_CMD_SAVES
-#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_LZO
diff --git a/include/ubi_uboot.h b/include/ubi_uboot.h
index fa33d5e52d4..80acbcb1486 100644
--- a/include/ubi_uboot.h
+++ b/include/ubi_uboot.h
@@ -35,9 +35,6 @@
#include <linux/errno.h>
/* configurable */
-#if !defined(CONFIG_MTD_UBI_WL_THRESHOLD)
-#define CONFIG_MTD_UBI_WL_THRESHOLD 4096
-#endif
#define CONFIG_MTD_UBI_BEB_RESERVE 1
/* debug options (Linux: drivers/mtd/ubi/Kconfig.debug) */
@@ -59,10 +56,6 @@
*/
#define CONFIG_MTD_UBI_MODULE
-#if !defined(CONFIG_MTD_UBI_BEB_LIMIT)
-#define CONFIG_MTD_UBI_BEB_LIMIT 20
-#endif
-
/* build.c */
#define get_device(...)
#define put_device(...)
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index cb4516fe6ec..efa95f07ae7 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -647,7 +647,6 @@ CONFIG_CMD_TFTP
CONFIG_CMD_THOR_DOWNLOAD
CONFIG_CMD_TRACE
CONFIG_CMD_TSI148
-CONFIG_CMD_UBI
CONFIG_CMD_UBIFS
CONFIG_CMD_UNIVERSE
CONFIG_CMD_UNZIP
@@ -3226,7 +3225,6 @@ CONFIG_MTD_NAND_VERIFY_WRITE
CONFIG_MTD_ONENAND_VERIFY_WRITE
CONFIG_MTD_PARTITION
CONFIG_MTD_PARTITIONS
-CONFIG_MTD_UBI_BEB_LIMIT
CONFIG_MTD_UBI_BEB_RESERVE
CONFIG_MTD_UBI_BLOCK
CONFIG_MTD_UBI_DEBUG
@@ -3236,12 +3234,8 @@ CONFIG_MTD_UBI_DEBUG_MSG_EBA
CONFIG_MTD_UBI_DEBUG_MSG_IO
CONFIG_MTD_UBI_DEBUG_MSG_WL
CONFIG_MTD_UBI_DEBUG_PARANOID
-CONFIG_MTD_UBI_FASTMAP
-CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT
-CONFIG_MTD_UBI_FM_DEBUG
CONFIG_MTD_UBI_GLUEBI
CONFIG_MTD_UBI_MODULE
-CONFIG_MTD_UBI_WL_THRESHOLD
CONFIG_MULTI_CS
CONFIG_MUNICES
CONFIG_MUSB_HOST