From: al.kochet@gmail.com
To: u-boot@lists.denx.de
Cc: Alexander Kochetkov <al.kochet@gmail.com>
Subject: [PATCH 1/3] binman: fix passing loadables to mkimage on first run
Date: Mon, 16 Sep 2024 11:24:44 +0300 [thread overview]
Message-ID: <20240916082446.32082-2-al.kochet@gmail.com> (raw)
In-Reply-To: <20240916082446.32082-1-al.kochet@gmail.com>
From: Alexander Kochetkov <al.kochet@gmail.com>
FIT use mkimage from BuildSectionData() to build FIT entry contents.
BuildSectionData() get called several times during building FIT image.
Currently when fit inserts loadables, it use self._loadables property that
contain loadables computed during previuos BuildSectionData() invocation.
So for the first run it use empty list and pass no loadables to mkimage.
That makes problem for adding signature to FIT image because mkimage
fails to add signature and aborts building FIT if no loadables provided.
The patch fixes described behaviour in a way that BuildSectionData() uses
recently calculated loadables value, not previosly calculated.
Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
---
tools/binman/etype/fit.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/binman/etype/fit.py b/tools/binman/etype/fit.py
index 2c14b15b03..e96222f4b6 100644
--- a/tools/binman/etype/fit.py
+++ b/tools/binman/etype/fit.py
@@ -542,8 +542,8 @@ class Entry_fit(Entry_section):
"""
val = fdt_util.GetStringList(node, 'fit,firmware')
if val is None:
- return None, self._loadables
- valid_entries = list(self._loadables)
+ return None, loadables
+ valid_entries = list(loadables)
for name, entry in self.GetEntries().items():
missing = []
entry.CheckMissing(missing)
@@ -558,7 +558,7 @@ class Entry_fit(Entry_section):
firmware = name
elif name not in result:
result.append(name)
- for name in self._loadables:
+ for name in loadables:
if name != firmware and name not in result:
result.append(name)
return firmware, result
--
2.17.1
next prev parent reply other threads:[~2024-09-16 8:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 8:24 [PATCH 0/3] Implement signing FIT images during image build al.kochet
2024-09-16 8:24 ` al.kochet [this message]
2024-10-09 1:50 ` [PATCH 1/3] binman: fix passing loadables to mkimage on first run Simon Glass
2024-10-17 23:12 ` Simon Glass
2024-09-16 8:24 ` [PATCH 2/3] image-host: fix 'unknown error' error message al.kochet
2024-10-09 1:50 ` Simon Glass
2024-10-17 23:12 ` Simon Glass
2024-09-16 8:24 ` [PATCH 3/3] binman: implement signing FIT images during image build al.kochet
2024-10-09 1:50 ` Simon Glass
2024-10-17 23:12 ` Simon Glass
2024-10-09 1:50 ` [PATCH 0/3] Implement " Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240916082446.32082-2-al.kochet@gmail.com \
--to=al.kochet@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox