[PATCH RFC 0/6] Fix handling of optional blobs in binman
Yannic Moog
y.moog at phytec.de
Wed Jan 29 11:29:45 CET 2025
This series solves a contradiction regarding ext blobs packaged in
binman. When they are marked as optional, by default they are faked, two
messages are emitted. One says the image is not functional the other
says the image is still functional. Both concern the same binman
entry/blob. To solve this, don't emit a warning when an image is faked
AND optional.
Make binman tests consistent with this behaviour.
Add regex to test cases checking that the non-functional
message is indeed not emitted. Update the documentation to inform users
of this interaction.
Binman is set up to have fake external blobs in case they are missing.
This is regardless on whether they are optional or not.
The implementation does not allow different types of entries to override
the faking decision; at least there wouldn't be much sense in doing so.
Here is an example build output of a phycore-imx8mp:
BINMAN .binman_stamp
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
Image 'image' has faked optional external blobs and is still functional: tee.bin
OFCHK .config
The first patch makes binman test with --fake_ext_blobs by default to be
consistent with the default make target when building U-Boot. This
exposes an error as one test is failing where it should not (loadables).
Then, fix some tests that must not fake ext blobs and thus failed due to
the change.
Further, fix the behaviour of binman itself as explained above. Fixing
this bug also makes the loadables test pass again.
Finally, add test coverage for this new case and extend the
documentation.
---
Yannic Moog (6):
tools: binman: ftest.py: fake ext blobs per default
tools: binman: ftest: pass allow_fake_blob to _DoReadFileDtb
tools: binman: ftest: fix tests that require non-faked ext blobs
binman: fix faked optional entry handling
binman: test: assert optional blobs don't cause non-functionality
binman: doc: update Optional entries
tools/binman/binman.rst | 9 ++++++++-
tools/binman/control.py | 19 ++++++++++++++++---
tools/binman/ftest.py | 43 ++++++++++++++++++++++++++++++++-----------
3 files changed, 56 insertions(+), 15 deletions(-)
---
base-commit: a2b489b170f8382f746202c36616eaf2bc38fe86
change-id: 20250122-binman_faked_optional-5025f7046e25
Best regards,
--
Yannic Moog <y.moog at phytec.de>
More information about the U-Boot
mailing list