diff mbox series

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

Message ID 20230624134118.944567-7-sughosh.ganu@linaro.org
State New
Headers show
Series Integrate EFI capsule tasks into u-boot's build flow | expand

Commit Message

Sughosh Ganu June 24, 2023, 1:41 p.m. UTC
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 <sughosh.ganu@linaro.org>
---
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(+)

Comments

Simon Glass June 26, 2023, 9:06 a.m. UTC | #1
On Sat, 24 Jun 2023 at 14:42, Sughosh Ganu <sughosh.ganu@linaro.org> 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 <sughosh.ganu@linaro.org>
> ---
> 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
diff mbox series

Patch

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 $< $@