binman: Use an exit code when blobs are missing
At present binman returns success when told to handle missing/faked blobs
or missing bintools. This is confusing since in fact the resulting image
cannot work.
Use exit code 103 to signal this problem, with a -W option to convert
it to a warning.
Rename the flag to --ignore-missing since it controls bintools also.
Add documentation about exit codes while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/binman/cmdline.py b/tools/binman/cmdline.py
index 1d1ca43..986d6f1 100644
--- a/tools/binman/cmdline.py
+++ b/tools/binman/cmdline.py
@@ -114,7 +114,7 @@
build_parser.add_argument('-m', '--map', action='store_true',
default=False, help='Output a map file for each image')
build_parser.add_argument('-M', '--allow-missing', action='store_true',
- default=False, help='Allow external blobs to be missing')
+ default=False, help='Allow external blobs and bintools to be missing')
build_parser.add_argument('-n', '--no-expanded', action='store_true',
help="Don't use 'expanded' versions of entries where available; "
"normally 'u-boot' becomes 'u-boot-expanded', for example")
@@ -128,6 +128,9 @@
default=False, help='Update the binman node with offset/size info')
build_parser.add_argument('--update-fdt-in-elf', type=str,
help='Update an ELF file with the output dtb: infile,outfile,begin_sym,end_sym')
+ build_parser.add_argument(
+ '-W', '--ignore-missing', action='store_true', default=False,
+ help='Return success even if there are missing blobs/bintools (requires -M)')
subparsers.add_parser(
'bintool-docs', help='Write out bintool documentation (see bintool.rst)')