[PATCH v3 0/6] Fix handling of optional blobs in binman

Yannic Moog y.moog at phytec.de
Fri Jun 13 14:02:39 CEST 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.

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 output stays to inform/warn the user, but in this case the tee-os
entry will not be present in the final image.

---
Changes in v3:
- Fix all failing tests
  - add commit that reworks bin.elf test
  - add section data to failing tests. E.g. tee-os contains missing
    tee.bin, but is still included in the image.
- remove _entries -> GetEntries() refactor patch
- reorder commits -> smaller fixes before refactor EDITME: use bulletpoints and terse descriptions.
- squash commits so that for each commits all binman tests should pass now
- rebase on next
- Link to v2: https://lore.kernel.org/r/20250527-binman_faked_optional-v2-0-3362ab897581@phytec.de

Changes in v2:
- mark as RFC due to failing tests. In current state, series is more of
  a concept
- Link to v1: https://lore.kernel.org/r/20250129-binman_faked_optional-v1-0-a4534bc67cbb@phytec.de

---
Yannic Moog (6):
      binman: drop "faked" return value from check_fake_fname
      binman: mark optional missing blobs as absent
      binman: rework dropping absent entries from packaged image
      binman: add faked optional entry case in CheckForProblems
      binman: ftest: pass allow_fake_blob to _DoReadFileDtb
      binman: test: assert optional blobs don't cause non-functionality

 tools/binman/binman.rst             |  7 +++++
 tools/binman/control.py             | 30 ++++++++++++++++-----
 tools/binman/entry.py               | 17 +++++++-----
 tools/binman/etype/blob.py          |  9 ++++---
 tools/binman/etype/blob_ext_list.py |  4 +--
 tools/binman/etype/cbfs.py          |  3 ++-
 tools/binman/etype/mkimage.py       |  2 +-
 tools/binman/etype/section.py       | 16 ++++++++---
 tools/binman/ftest.py               | 54 +++++++++++++++++++++++++------------
 tools/binman/image.py               |  2 ++
 10 files changed, 102 insertions(+), 42 deletions(-)
---
base-commit: 548d997229b7929bd7f0782415952d5a85eb7e64
change-id: 20250122-binman_faked_optional-5025f7046e25

Best regards,
-- 
Yannic Moog <y.moog at phytec.de>



More information about the U-Boot mailing list