[PATCH 00/11] binman: Enhancements to expanded entries
Simon Glass
sjg at chromium.org
Sun Mar 21 06:24:28 CET 2021
At present it is not always possible to have an expanded entry as a
sibling of another node. This limitation applies in most situations where
the other node has properties which binman must update, or when other
nodes appear after the expanded entry. An example is a 'hash' node in
the same section as an expanding node, since binman must update the hash
node with the hash of the expanding node, but it cannot do this while
also inserting the expanding node.
These limitations are mostly to do with how the fdt library worked (the one
provided by dtoc). This library still uses pylibfdt directly. At some
point it would be nice to have a hierarchical (live-tree) implementation
in pylibfdt (and therefore libfdt), but this does not exist at present. It
would simplify the code in the fdt library.
This series takes the support for expanded entries a little further, allow
them to be used in nearly any situation.
Where expanded entries are not wanted in a paricular case, a new
'no-expanded' property can be used.
Another problem found in the real world is that some systems require a
particular alignment for entries. For example, Intel chips struggle to
read data from SPI flash unless it is word-aligned. This series provides
a way to specify the default alignment for all the entries in a section,
to avoid the tedium of putting this in every single entry.
Finally, the vblock implementation includes code to collect the contents of
other entries, as specified by a phandle. It happens that this doesn't work
if one of the entries is a section, e.g. an expanding entry, since (for
efficiency reasons) binman currently only calculates section contents when
performing final image assembly. This series removes this limitation. It
also creates a new 'collection' entry type, to serve as a base class for
vblock, since it is likely that this functionality will be useful for other
entry types.
Simon Glass (11):
binman: Use a unique number for the symbols test file
binman: Allow disabling expanding an entry
binman: Add support for a collection of entries
binman: Support obtaining section contents immediately
binman: Support default alignment for sections
dtoc: Improve internal error for Refresh()
dtoc: Tidy up property-offset handling
dtoc: Tweak ordering of fdt-offsets refreshing
dtoc: Add a subnode test for multiple nodes
dtoc: Support adding subnodes alongside existing ones
dtoc: Add new check that offsets are correct
tools/binman/binman.rst | 14 +++
tools/binman/entries.rst | 21 ++++-
tools/binman/entry.py | 16 +++-
tools/binman/etype/cbfs.py | 1 +
tools/binman/etype/collection.py | 67 ++++++++++++++
tools/binman/etype/mkimage.py | 1 +
tools/binman/etype/section.py | 36 ++++++--
tools/binman/etype/u_boot.py | 2 +-
tools/binman/etype/u_boot_spl.py | 2 +-
tools/binman/etype/u_boot_tpl.py | 2 +-
tools/binman/etype/vblock.py | 36 ++++----
tools/binman/ftest.py | 57 +++++++++++-
...ymbols_nodtb.dts => 196_symbols_nodtb.dts} | 0
tools/binman/test/197_symbols_expand.dts | 23 +++++
tools/binman/test/198_collection.dts | 27 ++++++
tools/binman/test/199_collection_section.dts | 32 +++++++
tools/binman/test/200_align_default.dts | 30 ++++++
tools/dtoc/fdt.py | 92 +++++++++++++++----
tools/dtoc/test/dtoc_test_simple.dts | 4 +
tools/dtoc/test_fdt.py | 76 ++++++++++++---
20 files changed, 470 insertions(+), 69 deletions(-)
create mode 100644 tools/binman/etype/collection.py
rename tools/binman/test/{192_symbols_nodtb.dts => 196_symbols_nodtb.dts} (100%)
create mode 100644 tools/binman/test/197_symbols_expand.dts
create mode 100644 tools/binman/test/198_collection.dts
create mode 100644 tools/binman/test/199_collection_section.dts
create mode 100644 tools/binman/test/200_align_default.dts
--
2.31.0.rc2.261.g7f71774620-goog
More information about the U-Boot
mailing list