[U-Boot] [PATCH 23/53] binman: Adjust Entry to read the node in a separate call

sjg at google.com sjg at google.com
Mon Jul 29 21:22:26 UTC 2019


At present the Entry constructor sets up the object and then immediately
reads its device-tree node to obtain its properties.

This breaks a convention that constructors should not do any processing.
A consequence is that we must pass all arguments to the constructor and
cannot have the node-reading proceed in a different way unless we pass
flags to that constructor. We already have a 'test' flag in a few cases,
and now need to control whether the 'orig_offset' and 'orig_size'
properties are set or not.

Adjust the code to require a separate call to ReadNode() after
construction. The Image class remains as it was.

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

 tools/binman/entry.py            |  6 +++---
 tools/binman/entry_test.py       |  8 ++++----
 tools/binman/etype/_testing.py   |  3 +++
 tools/binman/etype/cbfs.py       |  1 +
 tools/binman/etype/fill.py       |  3 +++
 tools/binman/etype/intel_ifwi.py |  1 +
 tools/binman/etype/section.py    | 29 +++++++++++++++--------------
 tools/binman/image.py            | 10 +++++++---
 8 files changed, 37 insertions(+), 24 deletions(-)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list