summaryrefslogtreecommitdiff
path: root/tools/binman/cmdline.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-07-08 14:25:52 -0600
committerSimon Glass <sjg@chromium.org>2019-07-24 12:54:08 -0700
commit71ce0ba284aeb388ddcefb4f6f0056c759a758cc (patch)
treec353819863c1f5b2247915db7b20d2d0e0e98c18 /tools/binman/cmdline.py
parent3a9c252583785c3aabce834e8f9a54fa94685ee8 (diff)
binman: Add an 'extract' command
It is useful to be able to extract all binaries from the image, or a subset of them. Add a new 'extract' command to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/cmdline.py')
-rw-r--r--tools/binman/cmdline.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/binman/cmdline.py b/tools/binman/cmdline.py
index 508232eabb..a43aec649e 100644
--- a/tools/binman/cmdline.py
+++ b/tools/binman/cmdline.py
@@ -71,6 +71,19 @@ controlled by a description in the board device tree.'''
list_parser.add_argument('paths', type=str, nargs='*',
help='Paths within file to list (wildcard)')
+ extract_parser = subparsers.add_parser('extract',
+ help='Extract files from an image')
+ extract_parser.add_argument('-i', '--image', type=str, required=True,
+ help='Image filename to extract')
+ extract_parser.add_argument('-f', '--filename', type=str,
+ help='Output filename to write to')
+ extract_parser.add_argument('-O', '--outdir', type=str, default='',
+ help='Path to directory to use for output files')
+ extract_parser.add_argument('paths', type=str, nargs='*',
+ help='Paths within file to extract (wildcard)')
+ extract_parser.add_argument('-U', '--uncompressed', action='store_true',
+ help='Output raw uncompressed data for compressed entries')
+
test_parser = subparsers.add_parser('test', help='Run tests')
test_parser.add_argument('-P', '--processes', type=int,
help='set number of processes to use for running tests')