[RFC PATCH] tools: kwbimage: Allow to disable compilation of kwbimage on non-mvebu platforms

Alexander Dahl ada at thorsis.com
Tue Nov 30 17:06:07 CET 2021


Hei hei,

Am Thu, Oct 21, 2021 at 11:33:04AM +0200 schrieb Pali Rohár:
> kwbimage depends on libcrypto. 32-bit mvebu platforms (except Orion and
> Discovery, which are not in mach-mvebu) require kwimage for building SPL.
> 
> Some users want to compile u-boot tools without libcrypto.
> 
> Therefore add a new symbol CONFIG_TOOLS_KWBIMAGE which controls compilation
> of kwbimage and define correct dependences between mvebu, kwbimage and
> libcrypto targets.
> 
> This allows disabling of kwbimage compilation on non-mvebu platforms.
> 
> Signed-off-by: Pali Rohár <pali at kernel.org>
> ---
>  arch/arm/mach-mvebu/Kconfig | 1 +
>  tools/Kconfig               | 5 +++++
>  tools/Makefile              | 5 ++++-
>  3 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
> index 54dff9986b41..1ccbccea1dda 100644
> --- a/arch/arm/mach-mvebu/Kconfig
> +++ b/arch/arm/mach-mvebu/Kconfig
> @@ -15,6 +15,7 @@ config ARMADA_32BIT
>  	select SPL_SIMPLE_BUS if SPL
>  	select SUPPORT_SPL
>  	select TRANSLATION_OFFSET
> +	select TOOLS_KWBIMAGE if SPL
>  
>  config ARMADA_64BIT
>  	bool
> diff --git a/tools/Kconfig b/tools/Kconfig
> index 91ce8ae3e516..40866c5713d9 100644
> --- a/tools/Kconfig
> +++ b/tools/Kconfig
> @@ -25,6 +25,11 @@ config TOOLS_LIBCRYPTO
>  	  This selection does not affect target features, such as runtime FIT
>  	  signature verification.
>  
> +config TOOLS_KWBIMAGE
> +	bool "Enable kwbimage support in host tools"
> +	default y
> +	depends on TOOLS_LIBCRYPTO
> +
>  config TOOLS_FIT
>  	def_bool y
>  	help
> diff --git a/tools/Makefile b/tools/Makefile
> index 75d8fe71d668..08f1f5a51fb3 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -118,7 +118,6 @@ dumpimage-mkimage-objs := aisimage.o \
>  			imximage.o \
>  			imx8image.o \
>  			imx8mimage.o \
> -			kwbimage.o \
>  			lib/md5.o \
>  			lpc32xximage.o \
>  			mxsimage.o \
> @@ -150,6 +149,10 @@ dumpimage-mkimage-objs := aisimage.o \
>  			$(RSA_OBJS-y) \
>  			$(AES_OBJS-y)
>  
> +ifdef CONFIG_TOOLS_KWBIMAGE
> +dumpimage-mkimage-objs += kwbimage.o
> +endif
> +
>  dumpimage-objs := $(dumpimage-mkimage-objs) dumpimage.o
>  mkimage-objs   := $(dumpimage-mkimage-objs) mkimage.o
>  fit_info-objs   := $(dumpimage-mkimage-objs) fit_info.o

FWIW:

Tested-by: Alexander Dahl <ada at thorsis.com>

Greets
Alex



More information about the U-Boot mailing list