diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2011-05-18 09:18:20 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-05-19 20:36:22 +0200 |
commit | 373de3c1c49221ab684d397960a278231325d367 (patch) | |
tree | 8d396d84028d8aae7cbf8cff189eaa0baa9cfe17 /commands/Kconfig | |
parent | c2bd07f6a971793a6f40f99963ad761064a26df5 (diff) | |
download | barebox-373de3c1c49221ab684d397960a278231325d367.tar.gz barebox-373de3c1c49221ab684d397960a278231325d367.tar.xz |
commands: add md5/sha1/sha256sum commands using the digest api
The interface emulates the Linux commands, except that you can
specify a sub area - E.G.:
barebox:/ md5sum /dev/fd0 2M+1M /env/config /env/bin/boot 10+2
61c4c0180b044191d28f27545f43562f /dev/fd0 0x00200000 ... 0x00300000
908b84bcbadd2f263583a65ff31d1cad /env/config 0x00000000 ... 0x000003a7
f23bd15825cc5006cf5f9fd486d82d2d /env/bin/boot 0x0000000a ... 0x0000000c
Adds around 1400 bytes (+ size of digest code) with everything enabled.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/Kconfig')
-rw-r--r-- | commands/Kconfig | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/commands/Kconfig b/commands/Kconfig index f192d30978..30eeff9a14 100644 --- a/commands/Kconfig +++ b/commands/Kconfig @@ -222,6 +222,28 @@ config CMD_CRC_CMP depends on CMD_CRC prompt "compare 2 files crc" +config CMD_DIGEST + tristate + select DIGEST + +config CMD_MD5SUM + tristate + select CMD_DIGEST + select MD5 + prompt "md5sum" + +config CMD_SHA1SUM + tristate + select CMD_DIGEST + select SHA1 + prompt "sha1sum" + +config CMD_SHA256SUM + tristate + select CMD_DIGEST + select SHA256 + prompt "sha256sum" + config CMD_MTEST tristate prompt "mtest" |