[PATCH v3 13/27] binman: Use standard filenames for SPL/TPL devicetree

Simon Glass sjg at chromium.org
Sat Mar 20 00:52:56 CET 2021


At present, before any entry expansion is done (such as a 'files' entry
expanding out to individual entries for each file it contains), we check
the binman definition (i.e. '/binman' node) to find out what devicetree
files are used in the images.

This is a pain, since the definition may change during expansion. For
example if there is no u-boot-spl-dtb entry in the definition at the start,
we assume that the SPL devicetree is not used. But if an entry later
expands to include this, then we don't notice.

In fact the flexibility provided by the current approach of checking the
definition is not really useful. We know that we can have SPL and TPL
devicetrees. We know the pathname to each, so we can simply check if the
files are present. If they are present, we can prepare them and update
them regardless of whether they are actually used. If they are not present,
we cannot prepare/update them anyway, i.e. an error will be generated.

Simplify state.Prepare() so it uses a hard-coded list of devicetree files.

Note that state.PrepareFromLoadedData() is left untouched, since in that
case we have a complete definition from the loaded file, but cannot of
course rely on the devicetree files that created it still being present.
So in that case we still check the image defitions.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v3:
- Add new patch to use standard filenames for SPL/TPL devicetree

 tools/binman/state.py | 21 ++++++++++-----------
 tools/patman/tools.py |  8 ++++++--
 2 files changed, 16 insertions(+), 13 deletions(-)

Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list