summaryrefslogtreecommitdiff
path: root/tools/binman/control.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-10-08 18:45:26 -0400
committerTom Rini <trini@konsulko.com>2019-10-08 18:45:26 -0400
commitefea5a34bb5be542630ce7161bd3b9cc26a0bcf3 (patch)
treefb747d83d81f9c3400a561782114e4c6ecd61a07 /tools/binman/control.py
parent9d536fe8ae7672bdee091f9100389b6f3e53cfc6 (diff)
parentcc2d27dcdc3e1c76d09d54015e3992380bd7e0fa (diff)
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
- Rename existing FSP code to fsp1 - Add fsp2 directory in preparation to support FSP 2.0 - Various x86 platform codes update - Various bug fixes and updates in dm core, sandbox and spl
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r--tools/binman/control.py36
1 files changed, 15 insertions, 21 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index 9e7587864c..cb51bc2dd4 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -468,29 +468,23 @@ def Binman(args):
command.Run(pager, fname)
return 0
- if args.cmd == 'ls':
+ if args.cmd in ['ls', 'extract', 'replace']:
try:
+ tout.Init(args.verbosity)
tools.PrepareOutputDir(None)
- ListEntries(args.image, args.paths)
- finally:
- tools.FinaliseOutputDir()
- return 0
-
- if args.cmd == 'extract':
- try:
- tools.PrepareOutputDir(None)
- ExtractEntries(args.image, args.filename, args.outdir, args.paths,
- not args.uncompressed)
- finally:
- tools.FinaliseOutputDir()
- return 0
-
- if args.cmd == 'replace':
- try:
- tools.PrepareOutputDir(None)
- ReplaceEntries(args.image, args.filename, args.indir, args.paths,
- do_compress=not args.compressed,
- allow_resize=not args.fix_size, write_map=args.map)
+ if args.cmd == 'ls':
+ ListEntries(args.image, args.paths)
+
+ if args.cmd == 'extract':
+ ExtractEntries(args.image, args.filename, args.outdir, args.paths,
+ not args.uncompressed)
+
+ if args.cmd == 'replace':
+ ReplaceEntries(args.image, args.filename, args.indir, args.paths,
+ do_compress=not args.compressed,
+ allow_resize=not args.fix_size, write_map=args.map)
+ except:
+ raise
finally:
tools.FinaliseOutputDir()
return 0