[PATCH 1/3] binman: Generate the preload header and sign the data only once
yan wang
yan.wang at softathome.com
Thu Jul 3 14:54:52 CEST 2025
From: Paul HENRYS <paul.henrys_ext at softathome.com>
To optimize the preload generation, the header and signatures are only generated
once all data have been collected. This avoids to sign multiple times.
Signed-off-by: Paul HENRYS <paul.henrys_ext at softathome.com>
---
tools/binman/etype/pre_load.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/binman/etype/pre_load.py b/tools/binman/etype/pre_load.py
index 00f1a896767..1c9cfdad38a 100644
--- a/tools/binman/etype/pre_load.py
+++ b/tools/binman/etype/pre_load.py
@@ -152,14 +152,14 @@ class Entry_pre_load(Entry_collection):
return data + pad
def ObtainContents(self):
- """Obtain a placeholder for the header contents"""
- # wait that the image is available
- self.image = self.GetContents(False)
- if self.image is None:
- return False
- self.SetContents(self._CreateHeader())
+ """Do nothing here.
+ The data will be obtained and handled in ProcessContents
+ """
return True
def ProcessContents(self):
+ self.image = self.GetContents(True)
+ if self.image is None:
+ return False
data = self._CreateHeader()
return self.ProcessContentsUpdate(data)
--
2.25.1
More information about the U-Boot
mailing list