binman: Allow control of whether a fake DT is used

We use a fake device tree in tests most of the time since tests don't
normally care about the actual data. For example, for U-Boot proper we use
U_BOOT_DTB_DATA which is just a four-character string. This makes testing
the image output against an expected value very easy.

However in some cases, such as when the test wants to check that the DT
output containing particular nodes, we do actually need the real DT. Add
support for this, along with a command-line option to select 'test mode'.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/binman/cmdline.py b/tools/binman/cmdline.py
index 4ce8bc6..f8caa7d 100644
--- a/tools/binman/cmdline.py
+++ b/tools/binman/cmdline.py
@@ -30,6 +30,8 @@
             help='Enabling debugging (provides a full traceback on error)')
     parser.add_option('-E', '--entry-docs', action='store_true',
             help='Write out entry documentation (see README.entries)')
+    parser.add_option('--fake-dtb', action='store_true',
+            help='Use fake device tree contents (for testing only)')
     parser.add_option('-i', '--image', type='string', action='append',
             help='Image filename to build (if not specified, build all)')
     parser.add_option('-I', '--indir', action='append',