From: Jonas Karlman <jonas@kwiboo.se>
To: Simon Glass <sjg@chromium.org>,
Alper Nebi Yasak <alpernebiyasak@gmail.com>
Cc: "Pali Rohár" <pali@kernel.org>,
"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
"Marek Behún" <kabel@kernel.org>,
"Quentin Schulz" <quentin.schulz@theobroma-systems.com>,
"Stefan Herbrechtsmeier" <stefan.herbrechtsmeier@weidmueller.com>,
u-boot@lists.denx.de, "Jonas Karlman" <jonas@kwiboo.se>
Subject: [PATCH 5/9] binman: Implement missing check functions in mkimage entry
Date: Sun, 19 Feb 2023 22:02:05 +0000 (UTC) [thread overview]
Message-ID: <20230219220158.4160763-6-jonas@kwiboo.se> (raw)
In-Reply-To: <20230219220158.4160763-1-jonas@kwiboo.se>
The mkimage entry is working like a section entry but inherits from
Entry not Entry_section. Copy implementations of missing Check-functions
from Entry_section and adopt to Entry_mkimage.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
---
tools/binman/etype/mkimage.py | 44 ++++++++++++++++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/tools/binman/etype/mkimage.py b/tools/binman/etype/mkimage.py
index cb264c3cad0b..49d3462a154c 100644
--- a/tools/binman/etype/mkimage.py
+++ b/tools/binman/etype/mkimage.py
@@ -206,16 +206,31 @@ class Entry_mkimage(Entry):
self._imagename.SetAllowMissing(allow_missing)
def SetAllowFakeBlob(self, allow_fake):
- """Set whether the sub nodes allows to create a fake blob
+ """Set whether a section allows to create a fake blob
Args:
allow_fake: True if allowed, False if not allowed
"""
+ super().SetAllowFakeBlob(allow_fake)
for entry in self._mkimage_entries.values():
entry.SetAllowFakeBlob(allow_fake)
if self._imagename:
self._imagename.SetAllowFakeBlob(allow_fake)
+ def CheckMissing(self, missing_list):
+ """Check if any entries in this section have missing external blobs
+
+ If there are missing (non-optional) blobs, the entries are added to the
+ list
+
+ Args:
+ missing_list: List of Entry objects to be added to
+ """
+ for entry in self._mkimage_entries.values():
+ entry.CheckMissing(missing_list)
+ if self._imagename:
+ self._imagename.CheckMissing(missing_list)
+
def CheckFakedBlobs(self, faked_blobs_list):
"""Check if any entries in this section have faked external blobs
@@ -229,6 +244,33 @@ class Entry_mkimage(Entry):
if self._imagename:
self._imagename.CheckFakedBlobs(faked_blobs_list)
+ def CheckOptional(self, optional_list):
+ """Check the section for missing but optional external blobs
+
+ If there are missing (optional) blobs, the entries are added to the list
+
+ Args:
+ optional_list (list): List of Entry objects to be added to
+ """
+ for entry in self._mkimage_entries.values():
+ entry.CheckOptional(optional_list)
+ if self._imagename:
+ self._imagename.CheckOptional(optional_list)
+
+ def check_missing_bintools(self, missing_list):
+ """Check if any entries in this section have missing bintools
+
+ If there are missing bintools, these are added to the list
+
+ Args:
+ missing_list: List of Bintool objects to be added to
+ """
+ super().check_missing_bintools(missing_list)
+ for entry in self._mkimage_entries.values():
+ entry.check_missing_bintools(missing_list)
+ if self._imagename:
+ self._imagename.check_missing_bintools(missing_list)
+
def AddBintools(self, btools):
super().AddBintools(btools)
self.mkimage = self.AddBintool(btools, 'mkimage')
--
2.39.2
next prev parent reply other threads:[~2023-02-19 22:03 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-19 22:02 [PATCH 0/9] binman: Show missing blob message when building U-Boot Jonas Karlman
2023-02-19 22:02 ` [PATCH 1/9] binman: Remove redundant SetAllowFakeBlob from blob-ext entry Jonas Karlman
2023-02-21 19:35 ` Simon Glass
2023-03-08 22:17 ` Simon Glass
2023-02-19 22:02 ` [PATCH 2/9] binman: Fix spelling of nodes in code comments Jonas Karlman
2023-02-21 19:35 ` Simon Glass
2023-03-08 22:17 ` Simon Glass
2023-02-19 22:02 ` [PATCH 4/9] binman: Override CheckOptional in fit entry Jonas Karlman
2023-02-21 19:35 ` Simon Glass
2023-02-19 22:02 ` [PATCH 3/9] binman: Use correct argument name in docstrings Jonas Karlman
2023-02-21 19:35 ` Simon Glass
2023-03-08 22:17 ` Simon Glass
2023-02-19 22:02 ` Jonas Karlman [this message]
2023-02-21 19:41 ` [PATCH 5/9] binman: Implement missing check functions in mkimage entry Simon Glass
2023-02-19 22:02 ` [PATCH 6/9] binman: Mark mkimage entry missing when its subnodes is missing Jonas Karlman
2023-02-21 19:41 ` Simon Glass
2023-02-19 22:02 ` [PATCH 8/9] binman: Show filename in missing blob help message Jonas Karlman
2023-02-21 19:41 ` Simon Glass
2023-02-19 22:02 ` [PATCH 7/9] binman: Fix blank line usage for invalid images warning text Jonas Karlman
2023-02-21 19:41 ` Simon Glass
2023-02-19 22:02 ` [PATCH 9/9] Makefile: Show binman missing blob message Jonas Karlman
2023-02-21 19:41 ` Simon Glass
2023-02-21 23:09 ` Tom Rini
2023-02-22 21:20 ` Simon Glass
2023-02-22 21:45 ` Tom Rini
2023-02-22 22:56 ` Simon Glass
2023-03-10 20:49 ` [PATCH 0/9] binman: Show missing blob message when building U-Boot Simon Glass
2023-03-16 7:45 ` Jonas Karlman
2023-03-16 13:48 ` 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=20230219220158.4160763-6-jonas@kwiboo.se \
--to=jonas@kwiboo.se \
--cc=alpernebiyasak@gmail.com \
--cc=kabel@kernel.org \
--cc=pali@kernel.org \
--cc=quentin.schulz@theobroma-systems.com \
--cc=sjg@chromium.org \
--cc=stefan.herbrechtsmeier@weidmueller.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.