All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] binman: Fix replacing FIT subentries
@ 2022-03-27 15:31 Alper Nebi Yasak
  2022-03-27 15:31 ` [PATCH 1/7] binman: Fix unique names having '/.' for images read from files Alper Nebi Yasak
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Alper Nebi Yasak @ 2022-03-27 15:31 UTC (permalink / raw)
  To: u-boot; +Cc: Simon Glass, Heiko Thiery, Jan Kiszka, Alper Nebi Yasak

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-04-23 15:47 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-27 15:31 [PATCH 0/7] binman: Fix replacing FIT subentries Alper Nebi Yasak
2022-03-27 15:31 ` [PATCH 1/7] binman: Fix unique names having '/.' for images read from files Alper Nebi Yasak
2022-04-19 21:54   ` Simon Glass
2022-03-27 15:31 ` [PATCH 2/7] binman: Collect bintools for images when replacing entries Alper Nebi Yasak
2022-04-19 21:54   ` Simon Glass
2022-03-27 15:31 ` [PATCH 3/7] binman: Don't reset offset/size if image doesn't allow repacking Alper Nebi Yasak
2022-04-19 21:54   ` Simon Glass
2022-03-27 15:31 ` [PATCH 4/7] binman: Remove '/images/' fragment from FIT subentry paths Alper Nebi Yasak
2022-03-27 15:31 ` [PATCH 5/7] binman: Create FIT subentries in the FIT section, not its parent Alper Nebi Yasak
2022-04-19 21:54   ` Simon Glass
2022-03-27 15:31 ` [PATCH 6/7] binman: Test replacing non-section entries in FIT subsections Alper Nebi Yasak
2022-04-19 21:54   ` Simon Glass
2022-03-27 15:31 ` [PATCH 7/7] binman: Refuse to replace sections for now Alper Nebi Yasak
2022-04-19 21:54   ` Simon Glass
2022-04-23 15:46     ` Alper Nebi Yasak

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.