diff options
author | Simon Glass <sjg@chromium.org> | 2024-07-20 11:49:43 +0100 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2024-07-29 08:42:18 -0600 |
commit | 2e3697b954c09bd731e8b351f561f25480238aca (patch) | |
tree | 69499e619a2f280775221be804a9a4f661dc6f6a | |
parent | 76cbda76e7e9d90eaaa1dc1931943a1a2b62c92c (diff) |
binman: Remove dependency on pylibfdt for entry-docs
Allow the entry-docs command to operate even if pylibfdt is not present
in the systemn.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | tools/binman/image.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/binman/image.py b/tools/binman/image.py index e77b5d0d97c..97443d3c0a7 100644 --- a/tools/binman/image.py +++ b/tools/binman/image.py @@ -21,6 +21,9 @@ from dtoc import fdt_util from u_boot_pylib import tools from u_boot_pylib import tout +# This is imported if needed +state = None + class Image(section.Entry_section): """A Image, representing an output from binman @@ -75,6 +78,10 @@ class Image(section.Entry_section): def __init__(self, name, node, copy_to_orig=True, test=False, ignore_missing=False, use_expanded=False, missing_etype=False, generate=True): + # Put this here to allow entry-docs and help to work without libfdt + global state + from binman import state + super().__init__(None, 'section', node, test=test) self.copy_to_orig = copy_to_orig self.name = name |