Re: [PATCH v2 6/8] Makefile: Add a target for building capsules

2023-06-26 Thread Simon Glass
On Sat, 24 Jun 2023 at 14:42, Sughosh Ganu  wrote:
>
> 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(+)

NAK, please do not add new output-file rules to Makefile


[PATCH v2 6/8] Makefile: Add a target for building capsules

2023-06-24 Thread Sughosh Ganu
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