diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/Kconfig | 26 | ||||
-rw-r--r-- | cmd/mem.c | 8 |
2 files changed, 29 insertions, 5 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig index 5ee52f6..6f75b86 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 @@ -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 |