aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-07-17 13:25:34 -0600
committerSimon Glass <sjg@chromium.org>2018-08-01 16:30:47 -0600
commit9b1a804d52832aa2ae62bef0254451606d5a1901 (patch)
treef8746d28df965310a57e7683ad92741f774731de /tools
parentbb74837c9a32e51187d843c2469f0176d674c5f9 (diff)
downloadu-boot-9b1a804d52832aa2ae62bef0254451606d5a1901.zip
u-boot-9b1a804d52832aa2ae62bef0254451606d5a1901.tar.gz
u-boot-9b1a804d52832aa2ae62bef0254451606d5a1901.tar.bz2
binman: Allow help to work without libfdt
At present binman needs libfdt.py to be available before it will do anything, even print help. Import those modules later to avoid this, as it is bad practice to fail to even show help on startup. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/binman/control.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index ab894a8..3c931d9 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -13,8 +13,6 @@ import tools
import command
import elf
-import fdt
-import fdt_util
from image import Image
import tout
@@ -129,6 +127,11 @@ def Binman(options, args):
options.indir.append(board_pathname)
try:
+ # Import these here in case libfdt.py is not available, in which case
+ # the above help option still works.
+ import fdt
+ import fdt_util
+
tout.Init(options.verbosity)
elf.debug = options.debug
try: