Skip to contentSkip to conversation

Makefile: pass KEYDIR when set to sunxi-spl.bin mkimage

PATCH Superseded Richard Genoud 1 participant 1 message Oct 21, 2025 Kbuild

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: pass KEYDIR when set to sunxi-spl.bin mkimage

From: James Hilliard <[email protected]>

From: James Hilliard <[email protected]>

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.

---
 scripts/Makefile.xpl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/Makefile.xpl +2 -1
index 3e940bf562d5..52f014ad3324 100644
@@ -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

Signature · 1 line
2.47.3