Name

cksum — Compute POSIX checksums

Synopsis

cksum {-b location} {-l length}

Arguments

NameTypeDescriptionDefault
-b locationMemory addressLocation in memory for stat of data. none
-l lengthNumberLength of data none

Description

Computes the POSIX checksum on a range of memory (either RAM or FLASH). The values printed (decimal cksum, decimal length, hexadecimal cksum, hexadecimal length) can be compared with the output from the Linux program 'cksum'.

Examples

Checksum a buffer.

RedBoot> cksum -b 0x100000 -l 0x100
POSIX cksum = 3286483632 256 (0xc3e3c2b0 0x00000100)

Checksum an area of memory after loading a file. Note that the base address and length parameters are provided by the preceding load command.

RedBoot> load -r -b %{FREEMEMLO} redboot.bin
Raw file loaded 0x06012800-0x0602f0a8
RedBoot> cksum
Computing cksum for area 0x06012800-0x0602f0a8
POSIX cksum = 2092197813 116904 (0x7cb467b5 0x0001c8a8)