summaryrefslogtreecommitdiff
path: root/tools/binman/cmdline.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-07-20 12:24:15 -0600
committerSimon Glass <sjg@chromium.org>2019-07-29 09:38:06 -0600
commita6cb995096c40ecd6597e20d792851ac7f80004e (patch)
tree53c627ff17381b4eceeb0156e226c4602ed07b2c /tools/binman/cmdline.py
parentbb5edc1d3c0ebc989dfaa7d1e57cdde15d61f2e0 (diff)
binman: Add command-line support for replacing entries
Add a 'replace' command to binman to permit entries to be replaced, either individually or all at once (using a filter). Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/cmdline.py')
-rw-r--r--tools/binman/cmdline.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/binman/cmdline.py b/tools/binman/cmdline.py
index a43aec649ed..1e385935797 100644
--- a/tools/binman/cmdline.py
+++ b/tools/binman/cmdline.py
@@ -84,6 +84,23 @@ controlled by a description in the board device tree.'''
extract_parser.add_argument('-U', '--uncompressed', action='store_true',
help='Output raw uncompressed data for compressed entries')
+ replace_parser = subparsers.add_parser('replace',
+ help='Replace entries in an image')
+ replace_parser.add_argument('-C', '--compressed', action='store_true',
+ help='Input data is already compressed if needed for the entry')
+ replace_parser.add_argument('-i', '--image', type=str, required=True,
+ help='Image filename to extract')
+ replace_parser.add_argument('-f', '--filename', type=str,
+ help='Input filename to read from')
+ replace_parser.add_argument('-F', '--fix-size', action='store_true',
+ help="Don't allow entries to be resized")
+ replace_parser.add_argument('-I', '--indir', type=str, default='',
+ help='Path to directory to use for input files')
+ replace_parser.add_argument('-m', '--map', action='store_true',
+ default=False, help='Output a map file for the updated image')
+ replace_parser.add_argument('paths', type=str, nargs='*',
+ help='Paths within file to extract (wildcard)')
+
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')