[v3] Kconfig: Finish migration of hashing commands

Message ID 1496273866-25711-1-git-send-email-trini@konsulko.com
State Accepted
Commit 221a949eb6cf9077abc1e7ee28331987042b9b08
Headers show

Commit Message

Tom Rini May 31, 2017, 11:37 p.m.
From: Daniel Thompson <daniel.thompson@linaro.org>

Currently these (board agnostic) commands cannot be selected using
menuconfig and friends. Fix this the obvious way.  As part of this,
don't muddle the meaning of CONFIG_HASH_VERIFY to mean both 'hash -v'
and "we have a hashing command" as this makes the Kconfig logic odd.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
[trini: Re-apply, add imply for a few cases, run moveconfig.py, also
        migrate CRC32_VERIFY]
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 README                                  | 12 ------------
 arch/Kconfig                            |  2 ++
 arch/arm/Kconfig                        |  5 +++++
 arch/arm/mach-exynos/Kconfig            |  2 ++
 arch/arm/mach-tegra/Kconfig             |  1 +
 board/ti/common/Kconfig                 |  1 +
 cmd/Kconfig                             | 26 +++++++++++++++++++++++++-
 cmd/mem.c                               |  8 ++++----
 common/hash.c                           | 14 ++++----------
 configs/apalis_imx6_defconfig           |  1 +
 configs/apalis_imx6_nospl_com_defconfig |  1 +
 configs/apalis_imx6_nospl_it_defconfig  |  1 +
 configs/bcm958622hr_defconfig           |  2 ++
 configs/calimain_defconfig              |  1 +
 configs/colibri_imx6_defconfig          |  1 +
 configs/colibri_imx6_nospl_defconfig    |  1 +
 configs/da850_am18xxevm_defconfig       |  1 +
 configs/da850evm_defconfig              |  1 +
 configs/da850evm_direct_nor_defconfig   |  1 +
 configs/ea20_defconfig                  |  1 +
 configs/imx6qdl_icore_mmc_defconfig     |  1 +
 configs/imx6qdl_icore_rqs_mmc_defconfig |  1 +
 configs/imx6ul_geam_mmc_defconfig       |  1 +
 configs/imx6ul_geam_nand_defconfig      |  1 +
 configs/imx6ul_isiot_emmc_defconfig     |  1 +
 configs/imx6ul_isiot_mmc_defconfig      |  1 +
 configs/imx6ul_isiot_nand_defconfig     |  1 +
 configs/ipam390_defconfig               |  1 +
 configs/legoev3_defconfig               |  1 +
 configs/omapl138_lcdk_defconfig         |  1 +
 configs/xtfpga_defconfig                |  1 +
 include/configs/apalis_imx6.h           |  2 --
 include/configs/bcm23550_w1d.h          |  1 -
 include/configs/bcm28155_ap.h           |  1 -
 include/configs/bcm_ep_board.h          |  5 -----
 include/configs/calimain.h              |  1 -
 include/configs/colibri_imx6.h          |  2 --
 include/configs/da850evm.h              |  1 -
 include/configs/ea20.h                  |  1 -
 include/configs/exynos5-common.h        |  3 ---
 include/configs/imx6qdl_icore.h         |  1 -
 include/configs/imx6qdl_icore_rqs.h     |  1 -
 include/configs/imx6ul_geam.h           |  1 -
 include/configs/imx6ul_isiot.h          |  1 -
 include/configs/ipam390.h               |  1 -
 include/configs/legoev3.h               |  1 -
 include/configs/omapl138_lcdk.h         |  1 -
 include/configs/sandbox.h               |  2 --
 include/configs/socfpga_common.h        |  2 --
 include/configs/tegra-common.h          |  1 -
 include/configs/ti_armv7_keystone2.h    |  1 -
 include/configs/xtfpga.h                |  1 -
 include/hash.h                          |  4 ----
 scripts/config_whitelist.txt            |  3 ---
 54 files changed, 67 insertions(+), 65 deletions(-)

Comments

Tom Rini June 1, 2017, 12:10 p.m. | #1
On Wed, May 31, 2017 at 07:37:46PM -0400, Tom Rini wrote:

> From: Daniel Thompson <daniel.thompson@linaro.org>

> 

> Currently these (board agnostic) commands cannot be selected using

> menuconfig and friends. Fix this the obvious way.  As part of this,

> don't muddle the meaning of CONFIG_HASH_VERIFY to mean both 'hash -v'

> and "we have a hashing command" as this makes the Kconfig logic odd.

> 

> Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>

> [trini: Re-apply, add imply for a few cases, run moveconfig.py, also

>         migrate CRC32_VERIFY]

> Signed-off-by: Tom Rini <trini@konsulko.com>


Applied to u-boot/master, thanks!

-- 
Tom

Patch

diff --git a/README b/README
index 9d351ec5ad..77d46d2b42 100644
--- a/README
+++ b/README
@@ -827,7 +827,6 @@  The following options need to be configured:
 		CONFIG_CMD_BOOTI	* ARM64 Linux kernel Image support
 		CONFIG_CMD_CACHE	* icache, dcache
 		CONFIG_CMD_CONSOLE	  coninfo
-		CONFIG_CMD_CRC32	* crc32
 		CONFIG_CMD_DHCP		* DHCP support
 		CONFIG_CMD_DIAG		* Diagnostics
 		CONFIG_CMD_ECHO		  echo arguments
@@ -889,8 +888,6 @@  The following options need to be configured:
 		CONFIG_CMD_SETGETDCR	  Support for DCR Register access
 					  (4xx only)
 		CONFIG_CMD_SF		* Read/write/erase SPI NOR flash
-		CONFIG_CMD_SHA1SUM	* print sha1 memory digest
-					  (requires CONFIG_CMD_MEMORY)
 		CONFIG_CMD_SOFTSWITCH	* Soft switch setting command for BF60x
 		CONFIG_CMD_SOURCE	  "source" command Support
 		CONFIG_CMD_SPI		* SPI serial bus support
@@ -2679,15 +2676,6 @@  The following options need to be configured:
 		A better solution is to properly configure the firewall,
 		but sometimes that is not allowed.
 
-- Hashing support:
-		CONFIG_HASH_VERIFY
-
-		Enable the hash verify command (hash -v). This adds to code
-		size a little.
-
-		Note: There is also a sha1sum command, which should perhaps
-		be deprecated in favour of 'hash sha1'.
-
 - bootcount support:
 		CONFIG_BOOTCOUNT_LIMIT
 
diff --git a/arch/Kconfig b/arch/Kconfig
index 02e887ac86..e0e4e8486c 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -70,12 +70,14 @@  config SANDBOX
 	select DM_SPI
 	select DM_GPIO
 	select DM_MMC
+	imply CRC32_VERIFY
 	imply CMD_GETTIME
 	imply CMD_HASH
 	imply CMD_IO
 	imply CMD_IOTRACE
 	imply LZMA
 	imply CMD_LZMADEC
+	imply HASH_VERIFY
 
 config SH
 	bool "SuperH architecture"
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 91f50b0637..a8118ce0df 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -495,15 +495,19 @@  config TARGET_VEXPRESS_CA9X4
 config TARGET_BCM23550_W1D
 	bool "Support bcm23550_w1d"
 	select CPU_V7
+	imply CRC32_VERIFY
 
 config TARGET_BCM28155_AP
 	bool "Support bcm28155_ap"
 	select CPU_V7
+	imply CRC32_VERIFY
 
 config TARGET_BCMCYGNUS
 	bool "Support bcmcygnus"
 	select CPU_V7
+	imply CRC32_VERIFY
 	imply CMD_HASH
+	imply HASH_VERIFY
 
 config TARGET_BCMNSP
 	bool "Support bcmnsp"
@@ -629,6 +633,7 @@  config ARCH_SOCFPGA
 	select ARCH_MISC_INIT
 	select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
 	select SYS_THUMB_BUILD
+	imply CRC32_VERIFY
 
 config ARCH_SUNXI
 	bool "Support sunxi (Allwinner) SoCs"
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 5b6c5ea328..c57935e44d 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -18,7 +18,9 @@  config ARCH_EXYNOS5
 	select CPU_V7
 	select BOARD_EARLY_INIT_F
 	select SHA_HW_ACCEL
+	imply CRC32_VERIFY
 	imply CMD_HASH
+	imply HASH_VERIFY
 	help
 	  Samsung Exynos5 SoC family are based on ARM Cortex-A15 CPU (and
 	  Cortex-A7 CPU in big.LITTLE configuration). There are multiple SoCs
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 940257b5ec..89d2a499e4 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -38,6 +38,7 @@  config TEGRA_COMMON
 	select OF_CONTROL
 	select VIDCONSOLE_AS_LCD if DM_VIDEO
 	select BOARD_EARLY_INIT_F
+	imply CRC32_VERIFY
 
 config TEGRA_NO_BPMP
 	bool "Tegra common options for SoCs without BPMP"
diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig
index 1187cf5433..e35afa0e51 100644
--- a/board/ti/common/Kconfig
+++ b/board/ti/common/Kconfig
@@ -18,6 +18,7 @@  config TI_COMMON_CMD_OPTIONS
 	bool "Enable cmd options on TI platforms"
 	imply CMD_ASKENV
 	imply CMD_BOOTZ
+	imply CRC32_VERIFY if ARCH_KEYSTONE
 	imply CMD_DFU if USB_GADGET_DOWNLOAD
 	imply CMD_DHCP
 	imply CMD_EEPROM
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 5ee52f62cc..6f75b86e25 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -355,6 +355,12 @@  config CMD_CRC32
 	help
 	  Compute CRC32.
 
+config CRC32_VERIFY
+	bool "crc32 -v"
+	depends on CMD_CRC32
+	help
+	  Add -v option to verify data against a crc32 checksum.
+
 config CMD_EEPROM
 	bool "eeprom - EEPROM subsystem"
 	help
@@ -410,13 +416,25 @@  config CMD_MD5SUM
 	help
 	  Compute MD5 checksum.
 
-config MD5SUM_VERFIY
+config MD5SUM_VERIFY
 	bool "md5sum -v"
 	default n
 	depends on CMD_MD5SUM
 	help
 	  Add -v option to verify data against an MD5 checksum.
 
+config CMD_SHA1SUM
+	bool "sha1sum"
+	select SHA1
+	help
+	  Compute SHA1 checksum.
+
+config SHA1SUM_VERIFY
+	bool "sha1sum -v"
+	depends on CMD_SHA1SUM
+	help
+	  Add -v option to verify data against a SHA1 checksum.
+
 config LOOPW
 	bool "loopw"
 	help
@@ -1068,6 +1086,12 @@  config CMD_HASH
 	  saved to memory or to an environment variable. It is also possible
 	  to verify a hash against data in memory.
 
+config HASH_VERIFY
+	bool "hash -v"
+	depends on CMD_HASH
+	help
+	  Add -v option to verify data against a hash.
+
 config CMD_TPM
 	bool "Enable the 'tpm' command"
 	depends on TPM
diff --git a/cmd/mem.c b/cmd/mem.c
index b6e200b97c..27075e54a9 100644
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -1160,7 +1160,7 @@  static int do_mem_crc(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 
 	av = argv + 1;
 	ac = argc - 1;
-#ifdef CONFIG_HASH_VERIFY
+#ifdef CONFIG_CRC32_VERIFY
 	if (strcmp(*av, "-v") == 0) {
 		flags |= HASH_FLAG_VERIFY | HASH_FLAG_ENV;
 		av++;
@@ -1238,7 +1238,7 @@  U_BOOT_CMD(
 
 #ifdef CONFIG_CMD_CRC32
 
-#ifndef CONFIG_HASH_VERIFY
+#ifndef CONFIG_CRC32_VERIFY
 
 U_BOOT_CMD(
 	crc32,	4,	1,	do_mem_crc,
@@ -1246,7 +1246,7 @@  U_BOOT_CMD(
 	"address count [addr]\n    - compute CRC32 checksum [save at addr]"
 );
 
-#else	/* CONFIG_HASH_VERIFY */
+#else	/* CONFIG_CRC32_VERIFY */
 
 U_BOOT_CMD(
 	crc32,	5,	1,	do_mem_crc,
@@ -1255,7 +1255,7 @@  U_BOOT_CMD(
 	"-v address count crc\n    - verify crc of memory area"
 );
 
-#endif	/* CONFIG_HASH_VERIFY */
+#endif	/* CONFIG_CRC32_VERIFY */
 
 #endif
 
diff --git a/common/hash.c b/common/hash.c
index a0eded98d0..771d8fa87f 100644
--- a/common/hash.c
+++ b/common/hash.c
@@ -178,16 +178,9 @@  static struct hash_algo hash_algo[] = {
 	},
 };
 
-#if defined(CONFIG_SHA256) || defined(CONFIG_CMD_SHA1SUM)
-#define MULTI_HASH
-#endif
-
-#if defined(CONFIG_HASH_VERIFY) || defined(CONFIG_CMD_HASH)
-#define MULTI_HASH
-#endif
-
 /* Try to minimize code size for boards that don't want much hashing */
-#ifdef MULTI_HASH
+#if defined(CONFIG_SHA256) || defined(CONFIG_CMD_SHA1SUM) || \
+	defined(CONFIG_CRC32_VERIFY) || defined(CONFIG_CMD_HASH)
 #define multi_hash()	1
 #else
 #define multi_hash()	0
@@ -424,7 +417,8 @@  int hash_command(const char *algo_name, int flags, cmd_tbl_t *cmdtp, int flag,
 		unmap_sysmem(buf);
 
 		/* Try to avoid code bloat when verify is not needed */
-#ifdef CONFIG_HASH_VERIFY
+#if defined(CONFIG_CRC32_VERIFY) || defined(CONFIG_SHA1SUM_VERIFY) || \
+	defined(CONFIG_HASH_VERIFY)
 		if (flags & HASH_FLAG_VERIFY) {
 #else
 		if (0) {
diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
index f586773761..c712cf91df 100644
--- a/configs/apalis_imx6_defconfig
+++ b/configs/apalis_imx6_defconfig
@@ -24,6 +24,7 @@  CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_XIMG is not set
 CONFIG_CMD_ASKENV=y
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
diff --git a/configs/apalis_imx6_nospl_com_defconfig b/configs/apalis_imx6_nospl_com_defconfig
index 42abbbd49d..f5f4e3de7f 100644
--- a/configs/apalis_imx6_nospl_com_defconfig
+++ b/configs/apalis_imx6_nospl_com_defconfig
@@ -17,6 +17,7 @@  CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_XIMG is not set
 CONFIG_CMD_ASKENV=y
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
diff --git a/configs/apalis_imx6_nospl_it_defconfig b/configs/apalis_imx6_nospl_it_defconfig
index 18f0d02e55..0de47fe360 100644
--- a/configs/apalis_imx6_nospl_it_defconfig
+++ b/configs/apalis_imx6_nospl_it_defconfig
@@ -17,6 +17,7 @@  CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_XIMG is not set
 CONFIG_CMD_ASKENV=y
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
diff --git a/configs/bcm958622hr_defconfig b/configs/bcm958622hr_defconfig
index c2713c61fa..67e18b6268 100644
--- a/configs/bcm958622hr_defconfig
+++ b/configs/bcm958622hr_defconfig
@@ -13,7 +13,9 @@  CONFIG_CMD_ASKENV=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_HASH=y
+CONFIG_HASH_VERIFY=y
 CONFIG_CMD_FAT=y
 # CONFIG_MMC is not set
 CONFIG_SYS_NS16550=y
diff --git a/configs/calimain_defconfig b/configs/calimain_defconfig
index 489d85fc4f..48422ddffe 100644
--- a/configs/calimain_defconfig
+++ b/configs/calimain_defconfig
@@ -10,6 +10,7 @@  CONFIG_SYS_PROMPT="Calimain > "
 CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_STOP_STR="\x0b"
 CONFIG_CMD_ASKENV=y
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
index 6c105767fc..fcb7c53797 100644
--- a/configs/colibri_imx6_defconfig
+++ b/configs/colibri_imx6_defconfig
@@ -24,6 +24,7 @@  CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_XIMG is not set
 CONFIG_CMD_ASKENV=y
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
diff --git a/configs/colibri_imx6_nospl_defconfig b/configs/colibri_imx6_nospl_defconfig
index bd2ac24d4a..fbf9306eeb 100644
--- a/configs/colibri_imx6_nospl_defconfig
+++ b/configs/colibri_imx6_nospl_defconfig
@@ -17,6 +17,7 @@  CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_XIMG is not set
 CONFIG_CMD_ASKENV=y
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
diff --git a/configs/da850_am18xxevm_defconfig b/configs/da850_am18xxevm_defconfig
index bb92c438fb..74b3f0398d 100644
--- a/configs/da850_am18xxevm_defconfig
+++ b/configs/da850_am18xxevm_defconfig
@@ -17,6 +17,7 @@  CONFIG_SPL_BOARD_INIT=y
 CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
+CONFIG_CRC32_VERIFY=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index 1120182052..3745b859ed 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -19,6 +19,7 @@  CONFIG_SYS_PROMPT="U-Boot > "
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
+CONFIG_CRC32_VERIFY=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
diff --git a/configs/da850evm_direct_nor_defconfig b/configs/da850evm_direct_nor_defconfig
index 1e17ce736a..99543d39e1 100644
--- a/configs/da850evm_direct_nor_defconfig
+++ b/configs/da850evm_direct_nor_defconfig
@@ -10,6 +10,7 @@  CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot > "
 CONFIG_CMD_ASKENV=y
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_SF=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
diff --git a/configs/ea20_defconfig b/configs/ea20_defconfig
index be48626b3c..4ee7d5aac1 100644
--- a/configs/ea20_defconfig
+++ b/configs/ea20_defconfig
@@ -15,6 +15,7 @@  CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="ea20 > "
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
+CONFIG_CRC32_VERIFY=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
diff --git a/configs/imx6qdl_icore_mmc_defconfig b/configs/imx6qdl_icore_mmc_defconfig
index b6b1b4bc04..851dba2c26 100644
--- a/configs/imx6qdl_icore_mmc_defconfig
+++ b/configs/imx6qdl_icore_mmc_defconfig
@@ -21,6 +21,7 @@  CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="icorem6qdl> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
diff --git a/configs/imx6qdl_icore_rqs_mmc_defconfig b/configs/imx6qdl_icore_rqs_mmc_defconfig
index 08e6784b4c..b6a43ae77c 100644
--- a/configs/imx6qdl_icore_rqs_mmc_defconfig
+++ b/configs/imx6qdl_icore_rqs_mmc_defconfig
@@ -20,6 +20,7 @@  CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="icorem6qdl-rqs> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
diff --git a/configs/imx6ul_geam_mmc_defconfig b/configs/imx6ul_geam_mmc_defconfig
index 8751a36e27..acaed604b1 100644
--- a/configs/imx6ul_geam_mmc_defconfig
+++ b/configs/imx6ul_geam_mmc_defconfig
@@ -19,6 +19,7 @@  CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="geam6ul> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
diff --git a/configs/imx6ul_geam_nand_defconfig b/configs/imx6ul_geam_nand_defconfig
index 704c0c0374..baf1a739c3 100644
--- a/configs/imx6ul_geam_nand_defconfig
+++ b/configs/imx6ul_geam_nand_defconfig
@@ -18,6 +18,7 @@  CONFIG_SPL_DMA_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="geam6ul> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/imx6ul_isiot_emmc_defconfig b/configs/imx6ul_isiot_emmc_defconfig
index 1f501cb021..4b429c256d 100644
--- a/configs/imx6ul_isiot_emmc_defconfig
+++ b/configs/imx6ul_isiot_emmc_defconfig
@@ -19,6 +19,7 @@  CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="isiotmx6ul> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_GPIO=y
diff --git a/configs/imx6ul_isiot_mmc_defconfig b/configs/imx6ul_isiot_mmc_defconfig
index 5214479dcc..424089c0e4 100644
--- a/configs/imx6ul_isiot_mmc_defconfig
+++ b/configs/imx6ul_isiot_mmc_defconfig
@@ -19,6 +19,7 @@  CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="isiotmx6ul> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_I2C=y
diff --git a/configs/imx6ul_isiot_nand_defconfig b/configs/imx6ul_isiot_nand_defconfig
index 1b28336f36..fb2bef9a9b 100644
--- a/configs/imx6ul_isiot_nand_defconfig
+++ b/configs/imx6ul_isiot_nand_defconfig
@@ -18,6 +18,7 @@  CONFIG_SPL_DMA_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="isiotmx6ul> "
 # CONFIG_CMD_IMLS is not set
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_NAND=y
diff --git a/configs/ipam390_defconfig b/configs/ipam390_defconfig
index 705236eb7b..3c32a6b0ec 100644
--- a/configs/ipam390_defconfig
+++ b/configs/ipam390_defconfig
@@ -17,6 +17,7 @@  CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="U-Boot > "
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
+CONFIG_CRC32_VERIFY=y
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
diff --git a/configs/legoev3_defconfig b/configs/legoev3_defconfig
index 86ff6a150d..589e8cf880 100644
--- a/configs/legoev3_defconfig
+++ b/configs/legoev3_defconfig
@@ -12,6 +12,7 @@  CONFIG_AUTOBOOT_PROMPT="Autoboot in %d seconds - press 'l' to stop...\n"
 CONFIG_AUTOBOOT_STOP_STR="l"
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
+CONFIG_CRC32_VERIFY=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
index ff5e06de29..354438e1ef 100644
--- a/configs/omapl138_lcdk_defconfig
+++ b/configs/omapl138_lcdk_defconfig
@@ -17,6 +17,7 @@  CONFIG_SPL_BOARD_INIT=y
 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xb5
 CONFIG_HUSH_PARSER=y
 # CONFIG_CMD_IMLS is not set
+CONFIG_CRC32_VERIFY=y
 # CONFIG_CMD_EEPROM is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_GPIO is not set
diff --git a/configs/xtfpga_defconfig b/configs/xtfpga_defconfig
index c797c257d0..9f85d63965 100644
--- a/configs/xtfpga_defconfig
+++ b/configs/xtfpga_defconfig
@@ -8,6 +8,7 @@  CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press <SPACE> to stop\n"
 CONFIG_AUTOBOOT_STOP_STR=" "
 CONFIG_CMD_ASKENV=y
+CONFIG_CRC32_VERIFY=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_DIAG=y
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index 9220d04e79..83a09153b4 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -321,6 +321,4 @@ 
 
 #define CONFIG_SUPPORT_RAW_INITRD
 
-#define CONFIG_CRC32_VERIFY
-
 #endif	/* __CONFIG_H */
diff --git a/include/configs/bcm23550_w1d.h b/include/configs/bcm23550_w1d.h
index 77d6e6aa39..9a36a4c5d7 100644
--- a/include/configs/bcm23550_w1d.h
+++ b/include/configs/bcm23550_w1d.h
@@ -104,7 +104,6 @@ 
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_SYS_LONGHELP
 
-#define CONFIG_CRC32_VERIFY
 #define CONFIG_MX_CYCLIC
 
 /* Initial upstream - boot to cmd prompt only */
diff --git a/include/configs/bcm28155_ap.h b/include/configs/bcm28155_ap.h
index 03f4ca0338..bb61e5b8c8 100644
--- a/include/configs/bcm28155_ap.h
+++ b/include/configs/bcm28155_ap.h
@@ -103,7 +103,6 @@ 
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_SYS_LONGHELP
 
-#define CONFIG_CRC32_VERIFY
 #define CONFIG_MX_CYCLIC
 
 /* Initial upstream - boot to cmd prompt only */
diff --git a/include/configs/bcm_ep_board.h b/include/configs/bcm_ep_board.h
index 957cd9e0ba..fa7eff5428 100644
--- a/include/configs/bcm_ep_board.h
+++ b/include/configs/bcm_ep_board.h
@@ -60,19 +60,14 @@ 
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_SYS_LONGHELP
 
-#define CONFIG_CRC32_VERIFY
 #define CONFIG_MX_CYCLIC
 
 /* Commands */
 #define CONFIG_FAT_WRITE
 
-/* SHA hashing */
-#define CONFIG_HASH_VERIFY
-
 /* Enable Time Command */
 
 /* Misc utility code */
 #define CONFIG_BOUNCE_BUFFER
-#define CONFIG_CRC32_VERIFY
 
 #endif /* __BCM_EP_BOARD_H */
diff --git a/include/configs/calimain.h b/include/configs/calimain.h
index f5d108e359..29d3bdacac 100644
--- a/include/configs/calimain.h
+++ b/include/configs/calimain.h
@@ -196,7 +196,6 @@ 
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_SYS_LONGHELP
-#define CONFIG_CRC32_VERIFY
 #define CONFIG_MX_CYCLIC
 
 /*
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h
index 0882ef8f89..8f4022a134 100644
--- a/include/configs/colibri_imx6.h
+++ b/include/configs/colibri_imx6.h
@@ -288,6 +288,4 @@ 
 
 #define CONFIG_SUPPORT_RAW_INITRD
 
-#define CONFIG_CRC32_VERIFY
-
 #endif	/* __CONFIG_H */
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index e0bbf94f0e..f46f466196 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -255,7 +255,6 @@ 
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_SYS_LONGHELP
-#define CONFIG_CRC32_VERIFY
 #define CONFIG_MX_CYCLIC
 
 /*
diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index 53ee1adc0b..fc0f5e6017 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -115,7 +115,6 @@ 
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_SYS_LONGHELP
-#define CONFIG_CRC32_VERIFY
 #define CONFIG_MX_CYCLIC
 
 /*
diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index 6915dc1a48..378219d83a 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -131,9 +131,6 @@ 
 #define CONFIG_ENV_SROM_BANK		1
 #endif /*CONFIG_CMD_NET*/
 
-/* SHA hashing */
-#define CONFIG_HASH_VERIFY
-
 /* Enable Time Command */
 
 /* USB */
diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h
index 741bdfa807..13fc48fa3a 100644
--- a/include/configs/imx6qdl_icore.h
+++ b/include/configs/imx6qdl_icore.h
@@ -125,7 +125,6 @@ 
 
 /* FIT */
 #ifdef CONFIG_FIT
-# define CONFIG_HASH_VERIFY
 # define CONFIG_IMAGE_FORMAT_LEGACY
 #endif
 
diff --git a/include/configs/imx6qdl_icore_rqs.h b/include/configs/imx6qdl_icore_rqs.h
index f52865b5a0..a588823da0 100644
--- a/include/configs/imx6qdl_icore_rqs.h
+++ b/include/configs/imx6qdl_icore_rqs.h
@@ -107,7 +107,6 @@ 
 
 /* FIT */
 #ifdef CONFIG_FIT
-# define CONFIG_HASH_VERIFY
 # define CONFIG_IMAGE_FORMAT_LEGACY
 #endif
 
diff --git a/include/configs/imx6ul_geam.h b/include/configs/imx6ul_geam.h
index 2e12b97767..1d48726086 100644
--- a/include/configs/imx6ul_geam.h
+++ b/include/configs/imx6ul_geam.h
@@ -124,7 +124,6 @@ 
 
 /* FIT */
 #ifdef CONFIG_FIT
-# define CONFIG_HASH_VERIFY
 # define CONFIG_IMAGE_FORMAT_LEGACY
 #endif
 
diff --git a/include/configs/imx6ul_isiot.h b/include/configs/imx6ul_isiot.h
index 76ae159da3..a0eb6e25fe 100644
--- a/include/configs/imx6ul_isiot.h
+++ b/include/configs/imx6ul_isiot.h
@@ -124,7 +124,6 @@ 
 
 /* FIT */
 #ifdef CONFIG_FIT
-# define CONFIG_HASH_VERIFY
 # define CONFIG_IMAGE_FORMAT_LEGACY
 #endif
 
diff --git a/include/configs/ipam390.h b/include/configs/ipam390.h
index a3c0cfa60a..127e7e7396 100644
--- a/include/configs/ipam390.h
+++ b/include/configs/ipam390.h
@@ -205,7 +205,6 @@ 
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_SYS_LONGHELP
-#define CONFIG_CRC32_VERIFY
 #define CONFIG_MX_CYCLIC
 
 /*
diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h
index c5e7d629ab..f230f40d76 100644
--- a/include/configs/legoev3.h
+++ b/include/configs/legoev3.h
@@ -150,7 +150,6 @@ 
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_SYS_LONGHELP
-#define CONFIG_CRC32_VERIFY
 #define CONFIG_MX_CYCLIC
 
 /*
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index 9db4eeb54e..8904cd5cc7 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -249,7 +249,6 @@ 
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_SYS_LONGHELP
-#define CONFIG_CRC32_VERIFY
 #define CONFIG_MX_CYCLIC
 
 /*
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index c62b45e51c..fbbd6cd99b 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -98,8 +98,6 @@ 
 #define CONFIG_BOOTP_SERVERIP
 #define CONFIG_IP_DEFRAG
 
-#define CONFIG_HASH_VERIFY
-
 #define CONFIG_CMD_SANDBOX
 
 #define CONFIG_BOOTARGS ""
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index bdc6512959..fd18ae5f5d 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -15,8 +15,6 @@ 
 #define CONFIG_DISPLAY_BOARDINFO_LATE
 #define CONFIG_CLOCKS
 
-#define CONFIG_CRC32_VERIFY
-
 #define CONFIG_SYS_BOOTMAPSZ		(64 * 1024 * 1024)
 
 #define CONFIG_TIMESTAMP		/* Print image info with timestamp */
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 6982eaa1af..7ca5c0b9da 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -96,7 +96,6 @@ 
 
 /* Misc utility code */
 #define CONFIG_BOUNCE_BUFFER
-#define CONFIG_CRC32_VERIFY
 
 #ifndef CONFIG_SPL_BUILD
 #include <config_distro_defaults.h>
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index 3161c50abb..06b9bba80c 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -211,7 +211,6 @@ 
 
 /* U-Boot general configuration */
 #define CONFIG_MISC_INIT_R
-#define CONFIG_CRC32_VERIFY
 #define CONFIG_MX_CYCLIC
 #define CONFIG_TIMESTAMP
 
diff --git a/include/configs/xtfpga.h b/include/configs/xtfpga.h
index 7b15f311fe..7d7d9bb983 100644
--- a/include/configs/xtfpga.h
+++ b/include/configs/xtfpga.h
@@ -138,7 +138,6 @@ 
 #define CONFIG_AUTO_COMPLETE			/* Support tab autocompletion */
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_SYS_LONGHELP
-#define CONFIG_CRC32_VERIFY
 #define CONFIG_MX_CYCLIC
 #define CONFIG_SHOW_BOOT_PROGRESS
 
diff --git a/include/hash.h b/include/hash.h
index d81433772f..4f9a8cf1db 100644
--- a/include/hash.h
+++ b/include/hash.h
@@ -17,10 +17,6 @@  enum {
 	HASH_FLAG_ENV		= 1 << 1,	/* Allow env vars */
 };
 
-#if defined(CONFIG_SHA1SUM_VERIFY) || defined(CONFIG_CRC32_VERIFY)
-#define CONFIG_HASH_VERIFY
-#endif
-
 struct hash_algo {
 	const char *name;			/* Name of algorithm */
 	int digest_size;			/* Length of digest */
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index e8f49ebe5d..ee95359d79 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -507,7 +507,6 @@  CONFIG_CP_CLK_FREQ
 CONFIG_CQSPI_DECODER
 CONFIG_CQSPI_REF_CLK
 CONFIG_CRC32
-CONFIG_CRC32_VERIFY
 CONFIG_CS8900
 CONFIG_CS8900_BASE
 CONFIG_CS8900_BUS16
@@ -1074,7 +1073,6 @@  CONFIG_H264_FREQ
 CONFIG_H8300
 CONFIG_HALEAKALA
 CONFIG_HARD_SPI
-CONFIG_HASH_VERIFY
 CONFIG_HAS_DATAFLASH
 CONFIG_HAS_ETH0
 CONFIG_HAS_ETH1
@@ -2416,7 +2414,6 @@  CONFIG_SH7780_PCI_BAR
 CONFIG_SH7780_PCI_LAR
 CONFIG_SH7780_PCI_LSR
 CONFIG_SH7785LCR
-CONFIG_SHA1SUM_VERIFY
 CONFIG_SHARP_16x9
 CONFIG_SHARP_LM8V31
 CONFIG_SHARP_LQ035Q7DH06