Re: [U-Boot] [PATCH v4 01/20] common: spl_fit: Fix the spl_fit_image_get_os for FIT_IMAGE_TINY
On 19-02-16 10:23:10, Stefano Babic wrote: > Hi Abel, > > On 01/02/19 17:40, Abel Vesa wrote: > > There is not really reducing codesize here since there is only > > a call. The function is always built in if CONFIG_$(SPL_TPL_)FIT is set. > > Plus, there was a change in behavior if CONFIG_SPL_OS_BOOT is defined. > > If CONFIG_FIT_IMAGE_TINY is defined, the spl_fit_image_get_os was > > returning -ENOTSUPP and then if CONFIG_SPL_OS_BOOT was also > > defined, the spl_image->os was left set to 0 which in turn > > was skipping the fdt appending resulting in boot-up failure. > > > > Really there is a difference in codesize, even if it looks like a side > effect. This patch breaks build for sun8i and sun50i due to increased > size. So I have to drop this patch and I applied the rest of the series > to u-boot-imx. > Ok then, but the real problem here is the fact that the spl_image->os remains unset. And, as per the comment from the common/spl/spl_fit.c call site, the fallback should be setting to IH_OS_U_BOOT. See below. > Best regards, > Stefano Babic > > > Fixes: 337bbb6297775e spl: fit: add SPL_FIT_IMAGE_TINY config to reduce > > code-size > > Signed-off-by: Abel Vesa > > --- > > common/spl/spl_fit.c | 4 > > 1 file changed, 4 deletions(-) > > > > diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c > > index db43626..a87d02d 100644 > > --- a/common/spl/spl_fit.c > > +++ b/common/spl/spl_fit.c > > @@ -333,11 +333,7 @@ static int spl_fit_record_loadable(const void *fit, > > int images, int index, > > > > static int spl_fit_image_get_os(const void *fit, int noffset, uint8_t *os) > > { #if CONFIG_IS_ENABLED(FIT_IMAGE_TINY) So I guess we can keep as it was before but add the following line here then: + *os = IH_OS_U_BOOT; Let me know if I'm missing something here. return -ENOTSUPP; #else return fit_image_get_os(fit, noffset, os); #endif > > } > > > > int spl_load_simple_fit(struct spl_image_info *spl_image, > > > > -- > = > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de > = ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 01/20] common: spl_fit: Fix the spl_fit_image_get_os for FIT_IMAGE_TINY
Hi Abel, On 01/02/19 17:40, Abel Vesa wrote: > There is not really reducing codesize here since there is only > a call. The function is always built in if CONFIG_$(SPL_TPL_)FIT is set. > Plus, there was a change in behavior if CONFIG_SPL_OS_BOOT is defined. > If CONFIG_FIT_IMAGE_TINY is defined, the spl_fit_image_get_os was > returning -ENOTSUPP and then if CONFIG_SPL_OS_BOOT was also > defined, the spl_image->os was left set to 0 which in turn > was skipping the fdt appending resulting in boot-up failure. > Really there is a difference in codesize, even if it looks like a side effect. This patch breaks build for sun8i and sun50i due to increased size. So I have to drop this patch and I applied the rest of the series to u-boot-imx. Best regards, Stefano Babic > Fixes: 337bbb6297775e spl: fit: add SPL_FIT_IMAGE_TINY config to reduce > code-size > Signed-off-by: Abel Vesa > --- > common/spl/spl_fit.c | 4 > 1 file changed, 4 deletions(-) > > diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c > index db43626..a87d02d 100644 > --- a/common/spl/spl_fit.c > +++ b/common/spl/spl_fit.c > @@ -333,11 +333,7 @@ static int spl_fit_record_loadable(const void *fit, int > images, int index, > > static int spl_fit_image_get_os(const void *fit, int noffset, uint8_t *os) > { > -#if CONFIG_IS_ENABLED(FIT_IMAGE_TINY) > - return -ENOTSUPP; > -#else > return fit_image_get_os(fit, noffset, os); > -#endif > } > > int spl_load_simple_fit(struct spl_image_info *spl_image, > -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 01/20] common: spl_fit: Fix the spl_fit_image_get_os for FIT_IMAGE_TINY
On Fri, Feb 1, 2019 at 2:50 PM Abel Vesa wrote: > > There is not really reducing codesize here since there is only > a call. The function is always built in if CONFIG_$(SPL_TPL_)FIT is set. > Plus, there was a change in behavior if CONFIG_SPL_OS_BOOT is defined. > If CONFIG_FIT_IMAGE_TINY is defined, the spl_fit_image_get_os was > returning -ENOTSUPP and then if CONFIG_SPL_OS_BOOT was also > defined, the spl_image->os was left set to 0 which in turn > was skipping the fdt appending resulting in boot-up failure. > > Fixes: 337bbb6297775e spl: fit: add SPL_FIT_IMAGE_TINY config to reduce > code-size > Signed-off-by: Abel Vesa Reviewed-by: Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 01/20] common: spl_fit: Fix the spl_fit_image_get_os for FIT_IMAGE_TINY
Hi Abel, > There is not really reducing codesize here since there is only > a call. Yes, I also haven't observed any change. > The function is always built in if CONFIG_$(SPL_TPL_)FIT is > set. Plus, there was a change in behavior if CONFIG_SPL_OS_BOOT is > defined. If CONFIG_FIT_IMAGE_TINY is defined, the > spl_fit_image_get_os was returning -ENOTSUPP and then if > CONFIG_SPL_OS_BOOT was also defined, the spl_image->os was left set > to 0 which in turn was skipping the fdt appending resulting in > boot-up failure. > > Fixes: 337bbb6297775e spl: fit: add SPL_FIT_IMAGE_TINY config to > reduce code-size Signed-off-by: Abel Vesa However, this commit fixes the issue (the board didn't hang anymore after SPL loading), hence Tested-by: Lukasz Majewski I've tested it on mccmon6 HW (imx6q). Just to share - for me CONFIG_USE_TINY_PRINTF=y gave reduction of SPL size from 38KiB to 34KiB. Thanks for your commit. > --- > common/spl/spl_fit.c | 4 > 1 file changed, 4 deletions(-) > > diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c > index db43626..a87d02d 100644 > --- a/common/spl/spl_fit.c > +++ b/common/spl/spl_fit.c > @@ -333,11 +333,7 @@ static int spl_fit_record_loadable(const void > *fit, int images, int index, > static int spl_fit_image_get_os(const void *fit, int noffset, > uint8_t *os) { > -#if CONFIG_IS_ENABLED(FIT_IMAGE_TINY) > - return -ENOTSUPP; > -#else > return fit_image_get_os(fit, noffset, os); > -#endif > } > > int spl_load_simple_fit(struct spl_image_info *spl_image, Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de pgpUrlX81RPp4.pgp Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v4 01/20] common: spl_fit: Fix the spl_fit_image_get_os for FIT_IMAGE_TINY
On Fri, Feb 01, 2019 at 04:40:06PM +, Abel Vesa wrote: > There is not really reducing codesize here since there is only > a call. The function is always built in if CONFIG_$(SPL_TPL_)FIT is set. > Plus, there was a change in behavior if CONFIG_SPL_OS_BOOT is defined. > If CONFIG_FIT_IMAGE_TINY is defined, the spl_fit_image_get_os was > returning -ENOTSUPP and then if CONFIG_SPL_OS_BOOT was also > defined, the spl_image->os was left set to 0 which in turn > was skipping the fdt appending resulting in boot-up failure. > > Fixes: 337bbb6297775e spl: fit: add SPL_FIT_IMAGE_TINY config to reduce > code-size > Signed-off-by: Abel Vesa Reviewed-by: Tom Rini -- Tom signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 01/20] common: spl_fit: Fix the spl_fit_image_get_os for FIT_IMAGE_TINY
There is not really reducing codesize here since there is only a call. The function is always built in if CONFIG_$(SPL_TPL_)FIT is set. Plus, there was a change in behavior if CONFIG_SPL_OS_BOOT is defined. If CONFIG_FIT_IMAGE_TINY is defined, the spl_fit_image_get_os was returning -ENOTSUPP and then if CONFIG_SPL_OS_BOOT was also defined, the spl_image->os was left set to 0 which in turn was skipping the fdt appending resulting in boot-up failure. Fixes: 337bbb6297775e spl: fit: add SPL_FIT_IMAGE_TINY config to reduce code-size Signed-off-by: Abel Vesa --- common/spl/spl_fit.c | 4 1 file changed, 4 deletions(-) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index db43626..a87d02d 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -333,11 +333,7 @@ static int spl_fit_record_loadable(const void *fit, int images, int index, static int spl_fit_image_get_os(const void *fit, int noffset, uint8_t *os) { -#if CONFIG_IS_ENABLED(FIT_IMAGE_TINY) - return -ENOTSUPP; -#else return fit_image_get_os(fit, noffset, os); -#endif } int spl_load_simple_fit(struct spl_image_info *spl_image, -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot