From d0dbfd5299910a85c821b06ae8bd9a38818331c1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 31 Jul 2024 08:49:01 -0600 Subject: binman: Collect the version number for mkeficapsule Now that this tool has a version number, collect it. Signed-off-by: Simon Glass --- tools/binman/btool/mkeficapsule.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/binman') diff --git a/tools/binman/btool/mkeficapsule.py b/tools/binman/btool/mkeficapsule.py index ef1da638df1..f7e5a886849 100644 --- a/tools/binman/btool/mkeficapsule.py +++ b/tools/binman/btool/mkeficapsule.py @@ -33,7 +33,8 @@ class Bintoolmkeficapsule(bintool.Bintool): commandline, or through a config file. """ def __init__(self, name): - super().__init__(name, 'mkeficapsule tool for generating capsules') + super().__init__(name, 'mkeficapsule tool for generating capsules', + r'mkeficapsule version (.*)') def generate_capsule(self, image_index, image_guid, hardware_instance, payload, output_fname, priv_key, pub_key, -- cgit v1.3.1 From 2e658c18096bc62840e081055a4e35f28c50ec2f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 31 Jul 2024 08:49:02 -0600 Subject: binman: Deal with mkeficapsule being missing Tools cannot be assumed to be present. Add a check for this with the mkeficpasule tool. Signed-off-by: Simon Glass Fixes: b617611b27a ("binman: capsule: Add support for generating...") --- tools/binman/etype/efi_capsule.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/binman') diff --git a/tools/binman/etype/efi_capsule.py b/tools/binman/etype/efi_capsule.py index 751f654bf31..1c4d1bb0e2a 100644 --- a/tools/binman/etype/efi_capsule.py +++ b/tools/binman/etype/efi_capsule.py @@ -150,6 +150,10 @@ class Entry_efi_capsule(Entry_section): if ret is not None: os.remove(payload) return tools.read_file(capsule_fname) + else: + # Bintool is missing; just use the input data as the output + self.record_missing_bintool(self.mkeficapsule) + return data def AddBintools(self, btools): self.mkeficapsule = self.AddBintool(btools, 'mkeficapsule') -- cgit v1.3.1 From cbf3d274cf3b5f4623f73a784337ab4f50b3a10b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 31 Jul 2024 08:49:04 -0600 Subject: binman: Keep the efi_capsule input file There is no need to remove input files. It makes it harder to diagnose failures. Keep the payload file. There is no test for this condition, but one could be added. Signed-off-by: Simon Glass Acked-by: Sughosh Ganu --- tools/binman/etype/efi_capsule.py | 1 - 1 file changed, 1 deletion(-) (limited to 'tools/binman') diff --git a/tools/binman/etype/efi_capsule.py b/tools/binman/etype/efi_capsule.py index 1c4d1bb0e2a..5941545d0b2 100644 --- a/tools/binman/etype/efi_capsule.py +++ b/tools/binman/etype/efi_capsule.py @@ -148,7 +148,6 @@ class Entry_efi_capsule(Entry_section): self.fw_version, self.oem_flags) if ret is not None: - os.remove(payload) return tools.read_file(capsule_fname) else: # Bintool is missing; just use the input data as the output -- cgit v1.3.1