From: Tom Rini Date: Mon, 5 Jun 2017 11:24:47 -0400 Subject: [U-Boot] [U-Boot, v2] cmd: fsfitxtract: Extract a part of a FIT multi-image stored on a filesystem In-Reply-To: <20170521213307.2571-1-lexszero@gmail.com> References: <20170521213307.2571-1-lexszero@gmail.com> Message-ID: <20170605152447.GA12266@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: