Add a target for building EFI capsules. The capsule parameters are
specified through a config file, and the path to the config file is
specified through CONFIG_EFI_CAPSULE_CFG_FILE. When the config file is
not specified, the command only builds tools.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Call the mkeficapsule utility with the cfg-file parameter when
building capsules via the config file.
Makefile | 9 +
1 file changed, 9 insertions(+)
diff --git a/Makefile b/Makefile
index 444baaefd0..7d22427699 100644
--- a/Makefile
+++ b/Makefile
@@ -1151,6 +1151,15 @@ dtbs: dts/dt.dtb
dts/dt.dtb: u-boot
$(Q)$(MAKE) $(build)=dts dtbs
+quiet_cmd_mkeficapsule = MKEFICAPSULE
+cmd_mkeficapsule = $(objtree)/tools/mkeficapsule
--cfg-file=$(CONFIG_EFI_CAPSULE_CFG_FILE)
+
+PHONY += capsule
+capsule: tools
+ifneq ($(CONFIG_EFI_CAPSULE_CFG_FILE),"")
+ $(call cmd,mkeficapsule)
+endif
+
quiet_cmd_copy = COPY$@
cmd_copy = cp $< $@
--
2.34.1