diff mbox series

[U-Boot,PATCHv2,2/2] SPL: Default to disabling legacy image support when using FIT

Message ID 1558610048-31283-2-git-send-email-trini@konsulko.com
State Accepted
Commit 11bd2fa1977ec3011f0310706ee787fe2c770a65
Delegated to: Tom Rini
Headers show
Series [U-Boot,PATCHv2,1/2] configs: Rename CONFIG_IMAGE_FORMAT_LEGACY to CONFIG_LEGACY_IMAGE_FORMAT | expand

Commit Message

Tom Rini May 23, 2019, 11:14 a.m. UTC
When we have a FIT image being used by SPL by default that means the
most common case is that we'll never run into a legacy image.  Disable
legacy image support by default in that case to reclaim space.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 common/spl/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jean-Jacques Hiblot May 23, 2019, 12:18 p.m. UTC | #1
On 23/05/2019 13:14, Tom Rini wrote:
> When we have a FIT image being used by SPL by default that means the
> most common case is that we'll never run into a legacy image.  Disable
> legacy image support by default in that case to reclaim space.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>   common/spl/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> index c7cd34449a52..55dba0d42069 100644
> --- a/common/spl/Kconfig
> +++ b/common/spl/Kconfig
> @@ -101,7 +101,7 @@ config SPL_RAW_IMAGE_SUPPORT
>   
>   config SPL_LEGACY_IMAGE_SUPPORT
>   	bool "Support SPL loading and booting of Legacy images"
> -	default y if !TI_SECURE_DEVICE
> +	default y if !TI_SECURE_DEVICE && !SPL_LOAD_FIT
>   	help
>   	  SPL will support loading and booting Legacy images when this option
>   	  is y. If this is not set, SPL will move on to other available

reviewed-by and tested-by : Jean-Jacques Hiblot <jjhiblot@ti.com>

Building for arm, the reduction in size is around 50 bytes

JJ
Tom Rini May 23, 2019, 1:34 p.m. UTC | #2
On Thu, May 23, 2019 at 02:18:13PM +0200, Jean-Jacques Hiblot wrote:
> 
> On 23/05/2019 13:14, Tom Rini wrote:
> >When we have a FIT image being used by SPL by default that means the
> >most common case is that we'll never run into a legacy image.  Disable
> >legacy image support by default in that case to reclaim space.
> >
> >Signed-off-by: Tom Rini <trini@konsulko.com>
> >---
> >  common/spl/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> >index c7cd34449a52..55dba0d42069 100644
> >--- a/common/spl/Kconfig
> >+++ b/common/spl/Kconfig
> >@@ -101,7 +101,7 @@ config SPL_RAW_IMAGE_SUPPORT
> >  config SPL_LEGACY_IMAGE_SUPPORT
> >  	bool "Support SPL loading and booting of Legacy images"
> >-	default y if !TI_SECURE_DEVICE
> >+	default y if !TI_SECURE_DEVICE && !SPL_LOAD_FIT
> >  	help
> >  	  SPL will support loading and booting Legacy images when this option
> >  	  is y. If this is not set, SPL will move on to other available
> 
> reviewed-by and tested-by : Jean-Jacques Hiblot <jjhiblot@ti.com>

Thanks!

> Building for arm, the reduction in size is around 50 bytes

Yup, with gcc-7.3, on the platforms that set SPL_LOAD_FIT it's generally
an 84 bytes savings on aarch64 and 40 bytes on arm32.
Tom Rini July 11, 2019, 10:06 p.m. UTC | #3
On Thu, May 23, 2019 at 07:14:08AM -0400, Tom Rini wrote:

> When we have a FIT image being used by SPL by default that means the
> most common case is that we'll never run into a legacy image.  Disable
> legacy image support by default in that case to reclaim space.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index c7cd34449a52..55dba0d42069 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -101,7 +101,7 @@  config SPL_RAW_IMAGE_SUPPORT
 
 config SPL_LEGACY_IMAGE_SUPPORT
 	bool "Support SPL loading and booting of Legacy images"
-	default y if !TI_SECURE_DEVICE
+	default y if !TI_SECURE_DEVICE && !SPL_LOAD_FIT
 	help
 	  SPL will support loading and booting Legacy images when this option
 	  is y. If this is not set, SPL will move on to other available