Kconfig: Finish migration of hashing commands

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>
This commit is contained in:
Daniel Thompson
2017-05-19 17:26:58 +01:00
committed by Tom Rini
parent ccbbada0a5
commit 221a949eb6
54 changed files with 67 additions and 65 deletions

View File

@ -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

View File

@ -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