summaryrefslogtreecommitdiffstats
path: root/commands/imd.c
diff options
context:
space:
mode:
authorSteffen Trumtrar <s.trumtrar@pengutronix.de>2020-01-27 15:51:50 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-02-10 09:18:12 +0100
commit9d12256bfcc69d7ec7c20bd0e5205c54cefea700 (patch)
treedb576eb92d01c083d9655052f453888012ad547b /commands/imd.c
parent3b27a6eecb5bb6089b490258a54e7873aacf6573 (diff)
downloadbarebox-9d12256bfcc69d7ec7c20bd0e5205c54cefea700.tar.gz
barebox-9d12256bfcc69d7ec7c20bd0e5205c54cefea700.tar.xz
imd: add support for checksum generation/verification
Add a new imd type "checksum". This type consists of the CRC32 checksum of the whole barebox image minus the checksum itself. The checksum can be written to the imd field with the bareboximd host-tool. It can be verified with said tool or with "imd" on the target. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/imd.c')
-rw-r--r--commands/imd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/commands/imd.c b/commands/imd.c
index f1a22cef96..fc6cc47231 100644
--- a/commands/imd.c
+++ b/commands/imd.c
@@ -46,6 +46,8 @@ BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT ("-t <type>", "only show information of <type>")
BAREBOX_CMD_HELP_OPT ("-n <no>", "for tags with multiple strings only show string <no>")
BAREBOX_CMD_HELP_OPT ("-s VARNAME", "set variable VARNAME instead of showing information")
+BAREBOX_CMD_HELP_OPT ("-V", "Verify checksum of FILE")
+BAREBOX_CMD_HELP_OPT ("-c", "Create checksum for FILE and write it to the crc32 tag.")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Without options all information available is printed. Valid types are:")
BAREBOX_CMD_HELP_TEXT("release, build, model, of_compatible")