path: root/commands
diff options
authorSteffen Trumtrar <>2020-01-27 15:51:50 +0100
committerSascha Hauer <>2020-02-10 09:18:12 +0100
commit9d12256bfcc69d7ec7c20bd0e5205c54cefea700 (patch)
treedb576eb92d01c083d9655052f453888012ad547b /commands
parent3b27a6eecb5bb6089b490258a54e7873aacf6573 (diff)
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 <> Signed-off-by: Sascha Hauer <>
Diffstat (limited to 'commands')
1 files changed, 2 insertions, 0 deletions
diff --git a/commands/imd.c b/commands/imd.c
index f1a22ce..fc6cc47 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("Without options all information available is printed. Valid types are:")
BAREBOX_CMD_HELP_TEXT("release, build, model, of_compatible")