]> git.baikalelectronics.ru Git - uboot.git/commit
tools: default_image: Accept images with padding
authorPali Rohár <pali@kernel.org>
Sun, 29 Jan 2023 16:44:11 +0000 (17:44 +0100)
committerTom Rini <trini@konsulko.com>
Mon, 6 Feb 2023 22:10:14 +0000 (17:10 -0500)
commit7fc6f0e2dd9933b35d0fbc49a1d6d6ec775cd439
tree306921a6f3cffdb7836cbd18d8a50e0216a3236b
parente6b5af70708df776af921c8199f41e563956a403
tools: default_image: Accept images with padding

If image file is stored on flash partition then it contains padding, which
is not part of the image itself. Image data size is stored in the image
header. So use image size from the header instead of expecting that total
image file size is size of the header plus size of the image data. This
allows dumpimage to parse image files with padding (e.g. dumped from flash
partition).

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/default_image.c