[PATCH] common: Kconfig.boot: Add FIT_PRINT config option

Simon Glass sjg at chromium.org
Wed Jan 20 01:19:42 CET 2021


Hi Ravik,

On Tue, 19 Jan 2021 at 14:26, Ravik Hasija <rahasij at linux.microsoft.com> wrote:
>
> Config allows to disable printing contents of fitImage to optimize boottime.
>
> Signed-off-by: Ravik Hasija <rahasij at linux.microsoft.com>
> ---
>  common/Kconfig.boot | 6 ++++++
>  common/image-fit.c  | 2 +-
>  2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/common/Kconfig.boot b/common/Kconfig.boot
> index 4525a12ab4..5eaabdfc27 100644
> --- a/common/Kconfig.boot
> +++ b/common/Kconfig.boot
> @@ -140,6 +140,12 @@ config FIT_IMAGE_POST_PROCESS
>           injected into the FIT creation (i.e. the blobs would have been pre-
>           processed before being added to the FIT image).
>
> +config FIT_PRINT
> +        bool "Support FIT printing"
> +        default y
> +        help
> +          Support printing the content of the fitImage in a verbose manner.
> +
>  if SPL
>
>  config SPL_FIT
> diff --git a/common/image-fit.c b/common/image-fit.c
> index 21c44bdf69..3ea2fd4917 100644
> --- a/common/image-fit.c
> +++ b/common/image-fit.c
> @@ -147,7 +147,7 @@ int fit_get_subimage_count(const void *fit, int images_noffset)
>         return count;
>  }
>
> -#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_FIT_PRINT)
> +#if defined(CONFIG_FIT_PRINT) || defined(CONFIG_SPL_FIT_PRINT)

This is equivalent to CONFIG_IS_ENABLED(FIT_PRINT)

Also please see if you can use if() instead of #if when calling this.

>  /**
>   * fit_image_print_data() - prints out the hash node details
>   * @fit: pointer to the FIT format image header
> --
> 2.17.1
>

Regards,
Simon


More information about the U-Boot mailing list