binman: Support enabling debug in tests
The elf module can provide some debugging information to assist with
figuring out what is going wrong. This is also useful in tests. Update the
-D option so that it is passed through to tests as well.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/binman/control.py b/tools/binman/control.py
index e9d48df..e175e8d 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -12,6 +12,7 @@
import tools
import command
+import elf
import fdt
import fdt_util
from image import Image
@@ -89,6 +90,8 @@
try:
tout.Init(options.verbosity)
+ if options.debug:
+ elf.debug = True
try:
tools.SetInputDirs(options.indir)
tools.PrepareOutputDir(options.outdir, options.preserve)