[PATCH 2/5] Makefile: add u-boot.mbn target for mach-snapdragon

Casey Connolly casey.connolly at linaro.org
Thu May 22 22:39:40 CEST 2025


Wrap the new mkmbn tool so that the signed U-Boot MBN file is a
standard build target.

$ make DEVICE_TREE=qcom/qcs6490-rb3gen2 u-boot.mbn

Signed-off-by: Casey Connolly <casey.connolly at linaro.org>
---
 Makefile                          | 3 +++
 arch/arm/mach-snapdragon/Makefile | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/Makefile b/Makefile
index f3278e3b01387a26060b9431303ed0b384310dc7..ed3d5d5381bc51473a024d4e68121b7aeea8a759 100644
--- a/Makefile
+++ b/Makefile
@@ -1270,8 +1270,11 @@ endif
 
 %.vyb: %.imx
 	$(Q)$(MAKE) $(build)=arch/arm/cpu/armv7/vf610 $@
 
+%.mbn: %.bin
+	$(Q)$(MAKE) $(build)=arch/arm/mach-snapdragon $@
+
 quiet_cmd_copy = COPY    $@
       cmd_copy = cp $< $@
 
 u-boot.dtb: dts/dt.dtb
diff --git a/arch/arm/mach-snapdragon/Makefile b/arch/arm/mach-snapdragon/Makefile
index 343e825c6fdd05f36e210b138e741b7b7dd606ac..87d6c130a4d6ab6444f30c57fa0ebf484a6a1b33 100644
--- a/arch/arm/mach-snapdragon/Makefile
+++ b/arch/arm/mach-snapdragon/Makefile
@@ -4,4 +4,12 @@
 
 obj-y += board.o
 obj-$(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) += capsule_update.o
 obj-$(CONFIG_OF_LIVE) += of_fixup.o
+
+# Create Qualcomm signed elf images
+CMD_MKMBN = $(srctree)/tools/qcom/mkmbn/mkmbn.py
+quiet_cmd_mkmbn = MBN     $@
+      cmd_mkmbn = $(CMD_MKMBN) $<
+
+u-boot.mbn: u-boot.bin
+	$(call if_changed,mkmbn)

-- 
2.49.0



More information about the U-Boot mailing list