[U-Boot] [U-Boot, v2] cmd: fsfitxtract: Extract a part of a FIT multi-image stored on a filesystem
Tom Rini
trini at konsulko.com
Mon Jun 5 15:24:47 UTC 2017
On Mon, May 22, 2017 at 12:33:07AM +0300, Alexey Ignatov wrote:
> Sometimes we interested only in one single small subimage from big multipart
> FIT. This command tries to avoid reading out the whole FIT because of memory
> or time considerations.
> Since we don't have mmap() in U-Boot, this is done by reading the file in
> small chunks and trying to parse FIT, skipping reading the payload data
> of all images before the requested one, while preserving FIT structure.
>
> Changelog:
>
> v2:
> * Skip unneeded subimages data instead of reading it out
> * Read whole data in one operation
> * Lot of refactoring
> * Faster, more versatile and robust
> * Improved code readability
>
> v1:
> * First submission to maillist
The changelog needs to go below the '---' so that git will drop it when
applyng.
[snip]
> + debug("data at %p, len %lu\n", data, len);
This should be %zu not %lu.
[snip]
> + if (fit_image_get_comp(ctx.fdt, noffset, &comp)) {
> + puts("Could not find FIT subimage compression type\n");
> + return 1;
> + }
[snip]
> + if (!decompress_data(ctx.dest, (ulong)data, (ulong)len, comp, 0))
> + return 1;
There is no decompress_data function. And I suspect what you should do
here is the switch logic from common/bootm.c::bootm_decomp_image()
without the print (so re-factor that function a bit more).
Finally, you're adding some whitespace issues (empty lines with just
spaces), please run checkpatch.pl against it before submission next
time. Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/c93eebf0/attachment.sig>
More information about the U-Boot
mailing list