| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
| |
Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>
|
|
|
|
|
|
|
|
|
|
| |
Rather than use strcasecmp() in the hash algorithm search, require the
caller to do this first. Most of U-Boot can use lower case anyway, and
the hash command can convert to lower case before calling hash_command().
This saves needing strcasecmp() for boards that use hashing but not
the hash command.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
| |
Some hashing commands permit saving the hash in an environment variable,
and verifying a hash from there. But the crc32 command does not support
this. In order to permit crc32 to use the generic hashing infrastructure,
add a flag to select which behaviour to use.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
| |
There are two problems:
1. The argument count needs to be checked before argv is used
2. When verify is not enabled, we need to define a constant zero value
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This new command supports hashing SHA1 and SHA256. It could be extended
to others such as MD5 and the CRC algorithms. The syntax is modeled on
those:
hash <algorithm> <address> <length> [*<dest_addr> | <dest_envvar>]
to calculate a hash, and:
hash -v <algorithm> <address> <length> [*<verify_addr> | <verify_envvar>]
to verify a hash.
Use CONFIG_CMD_HASH to enable the command, CONFIG_SHA1 to enable SHA1 and
CONFIG_SHA256 to enable SHA256.
The existing sha1sum command remains.
Signed-off-by: Simon Glass <sjg@chromium.org>
|