[PATCH v2] Makefile: pass KEYDIR when set to sunxi-spl.bin mkimage

Andre Przywara andre.przywara at arm.com
Tue Oct 21 11:50:32 CEST 2025


On Tue, 21 Oct 2025 09:59:34 +0200
Richard Genoud <richard.genoud at bootlin.com> wrote:

Hi Richard,

> From: James Hilliard <james.hilliard1 at gmail.com>
> 
> Provide private keys to build sunxi-spl.bin
> 
> Currently we pass this for u-boot-spl.kwb targets, however when
> building sunxi-spl.bin in the TOC0 format, we may also need to
> specify a KEYDIR.
> As such we should also pass this when set to mkimage for the
> sunxi-spl.bin target.
> 
> Tested on Whatsminer H616 board.
> 
> Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
> Signed-off-by: Richard Genoud <richard.genoud at bootlin.com>


I have queued James' original patch just yesterday evening:
https://lore.kernel.org/u-boot/20251020215039.348651da@minigeek.lan/T/#t

Cheers,
Andre

> ---
>  scripts/Makefile.xpl | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Changes from v1:
> - remove superfluous From: (sorry for the noise)
> 
> diff --git a/scripts/Makefile.xpl b/scripts/Makefile.xpl
> index 3e940bf562d5..52f014ad3324 100644
> --- a/scripts/Makefile.xpl
> +++ b/scripts/Makefile.xpl
> @@ -442,7 +442,8 @@ MKIMAGEFLAGS_sunxi-spl.bin = \
>  	-A $(ARCH) \
>  	-T $(CONFIG_SPL_IMAGE_TYPE) \
>  	-a $(CONFIG_SPL_TEXT_BASE) \
> -	-n $(CONFIG_DEFAULT_DEVICE_TREE)
> +	-n $(CONFIG_DEFAULT_DEVICE_TREE) \
> +	$(if $(KEYDIR),-k $(KEYDIR))
>  
>  OBJCOPYFLAGS_u-boot-spl-dtb.hex := -I binary -O ihex --change-address=$(CONFIG_SPL_TEXT_BASE)
>  
> 
> base-commit: 2ba64e303b2706e5c42a6bf982326d632342ca66



More information about the U-Boot mailing list