Md5sum command – Kontron COMe-bP5020 User Manual
Page 51

www.kontron.com
51
User Guide
COMe-bP5020
Table 45: md5sum Command
md5
sum
Creates or checks the md5 message digest over a memory area
SYNTAX:
md5sum
md5sum
command
parameter: hexadecimal
start address of memory area
parameter: hexadecimal
length of memory area
parameter: hexadecimal
If present: compares the calculated md5 message digest with the md5 message
digest available at this address.
If absent: calculates the md5 message digest over the specif ied memory range and
prints it to the console.
DESCRIPTION: This command is used to create or check the md5 message digest over a memory area.
If the optional third parameter
the specif ied memory range and printed to the console.
If the optional third parameter
the specified memory range and compared with the md5 message digest at
is identical, the command returns 0. If the digests do not match, a value other than zero is returned. When
a comparison is made, nothing is printed to the console since this usage of the command is intended for
use within scripts.
The md5 message digest at
USAGE: 1. Calculate an md5 message digest:
=> md5sum 100000 80000
8fe7006660a2df2265b7cd707eb98786
=>
2. Check the md5 message digest of a f ile previously loaded to 100000 with a size of 80000 and its md5
message digest loaded to 10000 in a script
=> setenv check_crc “if md5sum 100000 80000 10000; then echo ‘md5 message
digest OK’; else echo ‘md5 message digest BAD’; fi”
=>run check_crc
md5 message digest OK
=>