[PATCH 0/7] binman: Fix replacing FIT subentries
Alper Nebi Yasak
alpernebiyasak at gmail.com
Sun Mar 27 17:31:43 CEST 2022
Converting the binman FIT entry type to a section ended up breaking the
ability to replace these in images. The conversion to section partially
enables extracting and replacing the subentries, but that also doesn't
work as intended.
This series gets binman to a point where it can extract FIT subentries
and replace their non-section leaf entries correctly. Replacing sections
of any kind doesn't really work right now, so the final patch disables
that by raising an error.
Initially, I had managed to replace sections by propagating changes in
ProcessContentsUpdate() to the child entries, but writing arbitrary data
into entries representing data in a certain format quickly gets into
weird (maybe even undecidable?) edge cases.
Just recently I had a better idea. Instead of writing incompatible data
into a section, we can replace the section entry/node with for example a
blob-ext entry/node for the input file. I've got this working as a proof
of concept, but I need to experiment more to see what works best.
Alper Nebi Yasak (7):
binman: Fix unique names having '/.' for images read from files
binman: Collect bintools for images when replacing entries
binman: Don't reset offset/size if image doesn't allow repacking
binman: Remove '/images/' fragment from FIT subentry paths
binman: Create FIT subentries in the FIT section, not its parent
binman: Test replacing non-section entries in FIT subsections
binman: Refuse to replace sections for now
tools/binman/control.py | 3 +-
tools/binman/entry.py | 2 +-
tools/binman/etype/_testing.py | 36 ++++
tools/binman/etype/fit.py | 15 +-
tools/binman/etype/section.py | 3 +
tools/binman/ftest.py | 179 ++++++++++++++++++
tools/binman/test/230_unique_names.dts | 34 ++++
tools/binman/test/231_unique_names_multi.dts | 38 ++++
.../binman/test/232_replace_with_bintool.dts | 39 ++++
tools/binman/test/233_fit_extract_replace.dts | 74 ++++++++
.../test/234_replace_section_simple.dts | 23 +++
11 files changed, 438 insertions(+), 8 deletions(-)
create mode 100644 tools/binman/test/230_unique_names.dts
create mode 100644 tools/binman/test/231_unique_names_multi.dts
create mode 100644 tools/binman/test/232_replace_with_bintool.dts
create mode 100644 tools/binman/test/233_fit_extract_replace.dts
create mode 100644 tools/binman/test/234_replace_section_simple.dts
--
2.35.1
More information about the U-Boot
mailing list