Add gzwrite command to write gzip-compressed images to block devices.
Input must be gzip-compressed according to RFC1952, since the crc
and file size in the trailer will be confirmed during operation.
The decompressed file size must be specified on the command line
for images with decompressed sizes >= 4GiB because the trailer
only contains the low 32 bits of the original file size.
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Change all files in common/ to use CMD_RET_USAGE instead of calling
cmd_usage() directly. I'm not completely sure about this patch since
the code since impact is small (100 byte or so on ARM) and it might
need splitting into smaller patches. But for now here it is.
Signed-off-by: Simon Glass <sjg@chromium.org>
There's no real need to keep these functions in the cmd_mem file since
they do not use any of the common global mem variables. So split them
out into their own dedicated cmd files.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>