
This converts the following to Kconfig: CONFIG_CMD_HASH
Signed-off-by: Simon Glass sjg@chromium.org ---
Changes in v2: None
README | 6 ------ arch/Kconfig | 1 + arch/arm/Kconfig | 1 + arch/arm/cpu/armv7/ls102xa/Kconfig | 1 + arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 4 ++++ arch/arm/include/asm/fsl_secure_boot.h | 1 - arch/arm/mach-exynos/Kconfig | 1 + arch/powerpc/Kconfig | 1 + cmd/Kconfig | 8 ++++++++ configs/bcm958622hr_defconfig | 1 + configs/ids8313_defconfig | 1 + include/config_cmd_all.h | 1 - include/configs/B4860QDS.h | 1 - include/configs/BSC9131RDB.h | 1 - include/configs/BSC9132QDS.h | 1 - include/configs/C29XPCIE.h | 1 - include/configs/P1010RDB.h | 1 - include/configs/P2041RDB.h | 1 - include/configs/T102xQDS.h | 1 - include/configs/T102xRDB.h | 1 - include/configs/T1040QDS.h | 1 - include/configs/T104xRDB.h | 1 - include/configs/T208xQDS.h | 1 - include/configs/T208xRDB.h | 1 - include/configs/T4240QDS.h | 1 - include/configs/T4240RDB.h | 1 - include/configs/bcm_ep_board.h | 1 - include/configs/corenet_ds.h | 1 - include/configs/exynos5-common.h | 3 --- include/configs/ids8313.h | 1 - include/configs/ls1021aiot.h | 3 --- include/configs/ls1021aqds.h | 1 - include/configs/ls1021atwr.h | 1 - include/configs/ls1043a_common.h | 1 - include/configs/ls1046a_common.h | 1 - include/configs/ls2080a_common.h | 1 - include/configs/sandbox.h | 1 - scripts/config_whitelist.txt | 1 - 38 files changed, 19 insertions(+), 38 deletions(-)
diff --git a/README b/README index efb1512e17..d53607ac1e 100644 --- a/README +++ b/README @@ -846,7 +846,6 @@ The following options need to be configured: CONFIG_CMD_FPGA FPGA device initialization support CONFIG_CMD_GO * the 'go' command (exec code) CONFIG_CMD_GREPENV * search environment - CONFIG_CMD_HASH * calculate hash / digest CONFIG_CMD_I2C * I2C serial bus support CONFIG_CMD_IDE * IDE harddisk support CONFIG_CMD_IMI iminfo @@ -2710,11 +2709,6 @@ The following options need to be configured: but sometimes that is not allowed.
- Hashing support: - CONFIG_CMD_HASH - - This enables a generic 'hash' command which can produce - hashes / digests from a few algorithms (e.g. SHA1, SHA256). - CONFIG_HASH_VERIFY
Enable the hash verify command (hash -v). This adds to code diff --git a/arch/Kconfig b/arch/Kconfig index 4f8409ca1b..61c08fffa4 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -68,6 +68,7 @@ config SANDBOX select DM_SPI select DM_GPIO select DM_MMC + imply CMD_HASH
config SH bool "SuperH architecture" diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index bac8c2ff94..46f70cc2e5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -502,6 +502,7 @@ config TARGET_BCM28155_AP config TARGET_BCMCYGNUS bool "Support bcmcygnus" select CPU_V7 + imply CMD_HASH
config TARGET_BCMNSP bool "Support bcmnsp" diff --git a/arch/arm/cpu/armv7/ls102xa/Kconfig b/arch/arm/cpu/armv7/ls102xa/Kconfig index b61f3cdcde..690a31b486 100644 --- a/arch/arm/cpu/armv7/ls102xa/Kconfig +++ b/arch/arm/cpu/armv7/ls102xa/Kconfig @@ -14,6 +14,7 @@ config ARCH_LS1021A select SYS_FSL_HAS_SEC select SYS_FSL_SEC_COMPAT_5 select SYS_FSL_SEC_LE + imply CMD_HASH
menu "LS102xA architecture" depends on ARCH_LS1021A diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig index 4c16c4cd0c..8f537f8cde 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig @@ -7,6 +7,7 @@ config ARCH_LS1012A select SYS_FSL_ERRATUM_A010315 select ARCH_EARLY_INIT_R select BOARD_EARLY_INIT_F + imply CMD_HASH
config ARCH_LS1043A bool @@ -26,6 +27,7 @@ config ARCH_LS1043A select SYS_FSL_HAS_DDR4 select ARCH_EARLY_INIT_R select BOARD_EARLY_INIT_F + imply CMD_HASH
config ARCH_LS1046A bool @@ -46,6 +48,7 @@ config ARCH_LS1046A select SYS_FSL_SRDS_2 select ARCH_EARLY_INIT_R select BOARD_EARLY_INIT_F + imply CMD_HASH
config ARCH_LS2080A bool @@ -79,6 +82,7 @@ config ARCH_LS2080A select SYS_FSL_ERRATUM_A009203 select ARCH_EARLY_INIT_R select BOARD_EARLY_INIT_F + imply CMD_HASH
config FSL_LSCH2 bool diff --git a/arch/arm/include/asm/fsl_secure_boot.h b/arch/arm/include/asm/fsl_secure_boot.h index 3212defcf0..0410f7f14e 100644 --- a/arch/arm/include/asm/fsl_secure_boot.h +++ b/arch/arm/include/asm/fsl_secure_boot.h @@ -29,7 +29,6 @@ #define CONFIG_KEY_REVOCATION
#ifndef CONFIG_SPL_BUILD -#define CONFIG_CMD_HASH #ifndef CONFIG_SYS_RAMBOOT /* The key used for verification of next level images * is picked up from an Extension Table which has diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 46981a5933..849f199fb9 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -17,6 +17,7 @@ config ARCH_EXYNOS5 bool "Exynos5 SoC family" select CPU_V7 select BOARD_EARLY_INIT_F + imply CMD_HASH 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/powerpc/Kconfig b/arch/powerpc/Kconfig index 01e9008d0a..3d2c1319c9 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -33,6 +33,7 @@ config MPC85xx select SYS_FSL_DDR select SYS_FSL_DDR_BE imply USB_EHCI_HCD if USB + imply CMD_HASH
config MPC86xx bool "MPC86xx" diff --git a/cmd/Kconfig b/cmd/Kconfig index 7243f78d1e..b05e69a8b7 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -996,6 +996,14 @@ config CMD_BLOB generation/use as key for cryptographic operation. Key modifier should be 16 byte long.
+config CMD_HASH + bool "Support 'hash' command" + help + This provides a way to hash data in memory using various supported + algorithms (such as SHA1, MD5, CRC32). The computed digest can be + saved to memory or to an environment variable. It is also possible + to verify a hash against data in memory. + config CMD_TPM bool "Enable the 'tpm' command" depends on TPM diff --git a/configs/bcm958622hr_defconfig b/configs/bcm958622hr_defconfig index a639336d94..ccfbcc4783 100644 --- a/configs/bcm958622hr_defconfig +++ b/configs/bcm958622hr_defconfig @@ -13,6 +13,7 @@ CONFIG_CMD_ASKENV=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y +CONFIG_CMD_HASH=y CONFIG_CMD_FAT=y # CONFIG_MMC is not set CONFIG_SYS_NS16550=y diff --git a/configs/ids8313_defconfig b/configs/ids8313_defconfig index 2accd31229..a6dbe029a7 100644 --- a/configs/ids8313_defconfig +++ b/configs/ids8313_defconfig @@ -22,6 +22,7 @@ CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_SNTP=y CONFIG_CMD_DATE=y +CONFIG_CMD_HASH=y CONFIG_CMD_UBI=y # CONFIG_MMC is not set CONFIG_MTD_NOR_FLASH=y diff --git a/include/config_cmd_all.h b/include/config_cmd_all.h index 2c633e6727..3c238d929f 100644 --- a/include/config_cmd_all.h +++ b/include/config_cmd_all.h @@ -13,7 +13,6 @@ * Alphabetical list of all possible commands. */
-#define CONFIG_CMD_HASH /* calculate hash / digest */ #define CONFIG_CMD_IDE /* IDE harddisk support */ #define CONFIG_CMD_IMMAP /* IMMR dump support */ #define CONFIG_CMD_IO /* Access to X86 IO space */ diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h index 3ed66fa455..377b8998a4 100644 --- a/include/configs/B4860QDS.h +++ b/include/configs/B4860QDS.h @@ -711,7 +711,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h index 64875f3116..65d8f126b2 100644 --- a/include/configs/BSC9131RDB.h +++ b/include/configs/BSC9131RDB.h @@ -328,7 +328,6 @@ extern unsigned long get_sdram_size(void);
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h index 506fb79b35..59da85d0c9 100644 --- a/include/configs/BSC9132QDS.h +++ b/include/configs/BSC9132QDS.h @@ -525,7 +525,6 @@ combinations. this should be removed later
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h index c6afb9a208..eaa42545fc 100644 --- a/include/configs/C29XPCIE.h +++ b/include/configs/C29XPCIE.h @@ -441,7 +441,6 @@
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h index 9850fb80a0..9c12c5d21a 100644 --- a/include/configs/P1010RDB.h +++ b/include/configs/P1010RDB.h @@ -735,7 +735,6 @@ extern unsigned long get_sdram_size(void);
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h index bcc9cc8f9c..92dcd2c418 100644 --- a/include/configs/P2041RDB.h +++ b/include/configs/P2041RDB.h @@ -605,7 +605,6 @@ unsigned long get_board_sys_clk(unsigned long dummy);
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/T102xQDS.h b/include/configs/T102xQDS.h index 427b6f23ae..d97ec0ef95 100644 --- a/include/configs/T102xQDS.h +++ b/include/configs/T102xQDS.h @@ -865,7 +865,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h index 7af377a8d9..99537d58e6 100644 --- a/include/configs/T102xRDB.h +++ b/include/configs/T102xRDB.h @@ -884,7 +884,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h index 5ce06ce5d7..977b7b6d63 100644 --- a/include/configs/T1040QDS.h +++ b/include/configs/T1040QDS.h @@ -667,7 +667,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index 1b17525197..fa691b5883 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -780,7 +780,6 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_sd_rcw.cfg
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h index bd6c47cca5..1ca13b595d 100644 --- a/include/configs/T208xQDS.h +++ b/include/configs/T208xQDS.h @@ -753,7 +753,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h index fa1c9a74fc..47eb3a7fac 100644 --- a/include/configs/T208xRDB.h +++ b/include/configs/T208xRDB.h @@ -698,7 +698,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/T4240QDS.h b/include/configs/T4240QDS.h index 5d030d1179..de987d52e7 100644 --- a/include/configs/T4240QDS.h +++ b/include/configs/T4240QDS.h @@ -500,7 +500,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h index f1144b2039..e2f1863bdc 100644 --- a/include/configs/T4240RDB.h +++ b/include/configs/T4240RDB.h @@ -697,7 +697,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/bcm_ep_board.h b/include/configs/bcm_ep_board.h index d9b88fa2d3..14a7638aef 100644 --- a/include/configs/bcm_ep_board.h +++ b/include/configs/bcm_ep_board.h @@ -67,7 +67,6 @@ #define CONFIG_FAT_WRITE
/* SHA hashing */ -#define CONFIG_CMD_HASH #define CONFIG_HASH_VERIFY #define CONFIG_SHA1 #define CONFIG_SHA256 diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index af1573de92..64ae67e592 100644 --- a/include/configs/corenet_ds.h +++ b/include/configs/corenet_ds.h @@ -619,7 +619,6 @@
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index 91976a75bc..ed9d713eef 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -42,8 +42,6 @@ /* select serial console configuration */ #define EXYNOS5_DEFAULT_UART_OFFSET 0x010000
-#define CONFIG_CMD_HASH - /* Thermal Management Unit */ #define CONFIG_EXYNOS_TMU
@@ -135,7 +133,6 @@ #endif /*CONFIG_CMD_NET*/
/* SHA hashing */ -#define CONFIG_CMD_HASH #define CONFIG_HASH_VERIFY #define CONFIG_SHA1 #define CONFIG_SHA256 diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h index be96834c76..5e85cc6d4c 100644 --- a/include/configs/ids8313.h +++ b/include/configs/ids8313.h @@ -540,7 +540,6 @@ #define CONFIG_SYS_BOOTCOUNT_ADDR 0x9
#define CONFIG_IMAGE_FORMAT_LEGACY -#define CONFIG_CMD_HASH #define CONFIG_SHA1 #define CONFIG_SHA256
diff --git a/include/configs/ls1021aiot.h b/include/configs/ls1021aiot.h index 35d17b96f4..48186f525b 100644 --- a/include/configs/ls1021aiot.h +++ b/include/configs/ls1021aiot.h @@ -308,9 +308,6 @@ /* Hash command with SHA acceleration supported in hardware */
#ifdef CONFIG_FSL_CAAM - -#define CONFIG_CMD_HASH - #define CONFIG_SHA_HW_ACCEL
#endif diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h index 333bb26623..3fc7d30d0b 100644 --- a/include/configs/ls1021aqds.h +++ b/include/configs/ls1021aqds.h @@ -572,7 +572,6 @@ unsigned long get_board_ddr_clk(void);
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h index 81f38a30a4..099aaaceda 100644 --- a/include/configs/ls1021atwr.h +++ b/include/configs/ls1021atwr.h @@ -436,7 +436,6 @@
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h index 78c34eba3e..3cd8554ae9 100644 --- a/include/configs/ls1043a_common.h +++ b/include/configs/ls1043a_common.h @@ -300,7 +300,6 @@
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h index c380fedf27..d1df75ab78 100644 --- a/include/configs/ls1046a_common.h +++ b/include/configs/ls1046a_common.h @@ -229,7 +229,6 @@
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h index 53686e3412..b5c3495dfb 100644 --- a/include/configs/ls2080a_common.h +++ b/include/configs/ls2080a_common.h @@ -231,7 +231,6 @@ unsigned long long get_qixis_addr(void);
/* Hash command with SHA acceleration supported in hardware */ #ifdef CONFIG_FSL_CAAM -#define CONFIG_CMD_HASH #define CONFIG_SHA_HW_ACCEL #endif
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index da547c5bb2..cd7a82630e 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -102,7 +102,6 @@
/* Can't boot elf images */
-#define CONFIG_CMD_HASH #define CONFIG_HASH_VERIFY #define CONFIG_SHA1 #define CONFIG_SHA256 diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 28fd6ac141..97c99d285c 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -384,7 +384,6 @@ CONFIG_CM922T_XA10 CONFIG_CMDLINE_EDITING CONFIG_CMDLINE_PS_SUPPORT CONFIG_CMDLINE_TAG -CONFIG_CMD_HASH CONFIG_CMD_HD44760 CONFIG_CMD_HD44780 CONFIG_CMD_HDMIDETECT