
On 09/14/2017 05:23 PM, Tom Rini wrote:
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@nxp.com Reviewed-by: Tom Rini trini@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.
You just have to switch the compiler and these warnings become real errors.
Under Visual C++ long is always 32bit: https://msdn.microsoft.com/en-us/library/s3f49ktz(v=vs.140).aspx
If it is really only a handful of warnings we should switch -Werror on in the 2017.11 release.
Regards
Heinrich