From: Yannic Moog <y.moog@phytec.de>
To: Simon Glass <sjg@chromium.org>,
Alper Nebi Yasak <alpernebiyasak@gmail.com>,
Tom Rini <trini@konsulko.com>
Cc: Fabio Estevam <festevam@gmail.com>,
Tim Harvey <tharvey@gateworks.com>,
Benjamin Hahn <b.hahn@phytec.de>,
Teresa Remmet <t.remmet@phytec.de>,
Yashwanth Varakala <y.varakala@phytec.de>,
<upstream@lists.phytec.de>, <u-boot@lists.denx.de>,
Yannic Moog <y.moog@phytec.de>
Subject: [PATCH RFC 4/6] binman: fix faked optional entry handling
Date: Wed, 29 Jan 2025 11:29:49 +0100 [thread overview]
Message-ID: <20250129-binman_faked_optional-v1-4-a4534bc67cbb@phytec.de> (raw)
In-Reply-To: <20250129-binman_faked_optional-v1-0-a4534bc67cbb@phytec.de>
When having an entry that is marked as optional and is missing, the
following output is observed:
CFGS spl/u-boot-spl.cfgout
BINMAN .binman_stamp
Image 'image' has faked external blobs and is non-functional: tee.bin
Image 'image' is missing optional external blobs but is still functional: tee-os
/binman/section/fit/images/tee/tee-os (tee.bin):
See the documentation for your board. You may need to build Open Portable
Trusted Execution Environment (OP-TEE) and build with TEE=/path/to/tee.bin
Some images are invalid
make: *** [Makefile:1135: .binman_stamp] Error 103
To solve this contradictory messaging, when checking the faked blob
list, remove entries that are allowed to be missing.
This also fixes the testFitFirmwareLoadables binman test:
FAIL: testFitFirmwareLoadables (binman.ftest.TestFunctional.testFitFirmwareLoadables)
Test an image with an FIT that use fit,firmware
----------------------------------------------------------------------
AssertionError: 0 != 103
This test failed due to the exposed bug when testing with faked external
blobs.
Signed-off-by: Yannic Moog <y.moog@phytec.de>
---
tools/binman/control.py | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/tools/binman/control.py b/tools/binman/control.py
index e73c598298c..defab760ec0 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -641,12 +641,19 @@ def CheckForProblems(image):
_ShowHelpForMissingBlobs(tout.ERROR, missing_list)
faked_list = []
+ faked_optional_list = []
+ faked_required_list = []
image.CheckFakedBlobs(faked_list)
- if faked_list:
+ for e in faked_list:
+ if e.optional:
+ faked_optional_list.append(e)
+ else:
+ faked_required_list.append(e)
+ if faked_required_list:
tout.warning(
"Image '%s' has faked external blobs and is non-functional: %s\n" %
(image.name, ' '.join([os.path.basename(e.GetDefaultFilename())
- for e in faked_list])))
+ for e in faked_required_list])))
optional_list = []
image.CheckOptional(optional_list)
@@ -656,6 +663,12 @@ def CheckForProblems(image):
(image.name, ' '.join([e.name for e in optional_list])))
_ShowHelpForMissingBlobs(tout.WARNING, optional_list)
+ if faked_optional_list:
+ tout.warning(
+ "Image '%s' has faked optional external blobs but is still functional: %s\n" %
+ (image.name, ' '.join([os.path.basename(e.GetDefaultFilename())
+ for e in faked_optional_list])))
+
missing_bintool_list = []
image.check_missing_bintools(missing_bintool_list)
if missing_bintool_list:
@@ -663,7 +676,7 @@ def CheckForProblems(image):
"Image '%s' has missing bintools and is non-functional: %s\n" %
(image.name, ' '.join([os.path.basename(bintool.name)
for bintool in missing_bintool_list])))
- return any([missing_list, faked_list, missing_bintool_list])
+ return any([missing_list, faked_required_list, missing_bintool_list])
def ProcessImage(image, update_fdt, write_map, get_contents=True,
allow_resize=True, allow_missing=False,
--
2.43.0
next prev parent reply other threads:[~2025-01-29 10:30 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 10:29 [PATCH RFC 0/6] Fix handling of optional blobs in binman Yannic Moog
2025-01-29 10:29 ` [PATCH RFC 1/6] tools: binman: ftest.py: fake ext blobs per default Yannic Moog
2025-02-10 13:06 ` Simon Glass
2025-02-13 7:15 ` Yannic Moog
2025-02-13 14:01 ` Simon Glass
2025-02-14 7:18 ` Yannic Moog
2025-02-14 13:48 ` Simon Glass
2025-02-17 7:07 ` Yannic Moog
2025-01-29 10:29 ` [PATCH RFC 2/6] tools: binman: ftest: pass allow_fake_blob to _DoReadFileDtb Yannic Moog
2025-02-10 13:09 ` Simon Glass
2025-01-29 10:29 ` [PATCH RFC 3/6] tools: binman: ftest: fix tests that require non-faked ext blobs Yannic Moog
2025-02-10 13:09 ` Simon Glass
2025-02-13 7:15 ` Yannic Moog
2025-01-29 10:29 ` Yannic Moog [this message]
2025-02-10 13:09 ` [PATCH RFC 4/6] binman: fix faked optional entry handling Simon Glass
2025-01-29 10:29 ` [PATCH RFC 5/6] binman: test: assert optional blobs don't cause non-functionality Yannic Moog
2025-02-10 13:07 ` Simon Glass
2025-01-29 10:29 ` [PATCH RFC 6/6] binman: doc: update Optional entries Yannic Moog
2025-02-10 13:08 ` Simon Glass
2025-02-13 7:21 ` Yannic Moog
2025-02-13 14:01 ` Simon Glass
2025-02-14 7:05 ` Yannic Moog
2025-02-14 13:48 ` Simon Glass
2025-02-17 7:21 ` Yannic Moog
2025-02-17 13:13 ` Simon Glass
2025-02-18 13:15 ` Yannic Moog
2025-02-19 0:01 ` Simon Glass
2025-02-10 13:08 ` [PATCH RFC 0/6] Fix handling of optional blobs in binman 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=20250129-binman_faked_optional-v1-4-a4534bc67cbb@phytec.de \
--to=y.moog@phytec.de \
--cc=alpernebiyasak@gmail.com \
--cc=b.hahn@phytec.de \
--cc=festevam@gmail.com \
--cc=sjg@chromium.org \
--cc=t.remmet@phytec.de \
--cc=tharvey@gateworks.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=upstream@lists.phytec.de \
--cc=y.varakala@phytec.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.