[U-Boot] [U-Boot, v2, 3/5] spl: fit: Eanble GZIP support for image decompression
Tom Rini
trini at konsulko.com
Thu Sep 14 15:23:18 UTC 2017
On Thu, Sep 14, 2017 at 03:20:18PM +0000, York Sun wrote:
> On 09/13/2017 09:27 PM, Heinrich Schuchardt wrote:
> > On 09/13/2017 11:07 PM, York Sun wrote:
> >> On 09/13/2017 01:38 PM, Heinrich Schuchardt wrote:
> >>> On 08/08/2017 01:16 AM, York Sun wrote:
> >>>> Add Kconfig option SPL_GZIP and SPL_ZLIB to enable gunzip support for
> >>>> SPL boot, eg. falcon boot compressed kernel image.
> >>>>
> >>>> Signed-off-by: York Sun <york.sun at nxp.com>
> >>>> Reviewed-by: Tom Rini <trini at konsulko.com>
> >>>> ---
> >>>>
> >>>> Changes in v2:
> >>>> Combine Kconfig change and actual code into one patch
> >>>>
> >>>> common/spl/spl_fit.c | 28 ++++++++++++++++++++++++++--
> >>>> lib/Kconfig | 8 ++++++++
> >>>> lib/Makefile | 5 +++--
> >>>> 3 files changed, 37 insertions(+), 4 deletions(-)
> >>
> >> <snip>
> >>
> >>>> - memcpy((void*)load_addr, src, length);
> >>>> +#if defined(CONFIG_SPL_OS_BOOT) && defined(CONFIG_SPL_GZIP)
> >>>> + if (image_comp == IH_COMP_GZIP && type == IH_TYPE_KERNEL) {
> >>>> + if (gunzip((void *)load_addr, CONFIG_SYS_BOOTM_LEN,
> >>>> + src, &length)) {
> >>>
> >>> In this file length is defined as size_t.
> >>>
> >>> In include/common.h the last parameter of gunzip is defined as unsigned
> >>> long *.
> >>>
> >>> This leads to a compilation warning and probably incorrect results:
> >>> CC spl/common/spl/spl_fit.o
> >>> common/spl/spl_fit.c: In function ‘spl_load_fit_image’:
> >>> common/spl/spl_fit.c:201:12: warning: passing argument 4 of ‘gunzip’
> >>> from incompatible pointer type [-Wincompatible-pointer-types]
> >>> src, &length)) {
> >>>
> >>> Please, correct the patch to pass a compatible parameter.
> >>> The patch already made it into the U-Boot git master.
> >>> So possibly you want to send a follow up patch.
> >>>
> >>
> >> Thanks for the heads up. I used travis-ci to build all targets but
> >> didn't see this warning. What target did you build?
> >
> > make mrproper
> > make qemu-x86_64_defconfig
> > make
> >
>
> Heinrich,
>
> Thanks. I check travis-ci log. Surprisingly, it has this warning but
> reports as "passed". Now I start to question what else I missed.
So, yes. One of the things that we don't do today is have -Werror
passed. I would love to see the series of patches that fixes the
handful of warnings we have today so we could at least make this an
option.
--
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/20170914/7dedd3d2/attachment.sig>
More information about the U-Boot
mailing list