Commit b43ac399 authored by Angus Ainslie's avatar Angus Ainslie
Browse files

scripts/flash-image: add some args

Add a daemon arg and usb path to allow multiple instances of flash-image to
run on a host.
Signed-off-by: default avatarAngus Ainslie <>
parent 70c4e06f
......@@ -48,11 +48,21 @@ def write_uuu_script(target, image, uboot, mods):
def flash_image(uuu_target, debug):
if debug:
subprocess.check_call(['uuu', '-v', uuu_target])
subprocess.check_call(['uuu', uuu_target])
def flash_image(uuu_target, args):
uuu_cmd = ['uuu']
if args.debug:
if args.daemon:
if args.usbpath:
def main():
......@@ -66,8 +76,12 @@ def main():
group = parser.add_argument_group(title='Testing and debugging options')
group.add_argument('--debug', action="store_true", default=False,
help='Enable debug output')
group.add_argument('--daemon', action="store_true", default=False,
help='Enable enable daemon mode for parallel flashing')
group.add_argument('--uboot', type=str,
help='u-boot version to flash')
group.add_argument('--usbpath', type=str, default=None,
help='Only flash device on this usb path')
args = parser.parse_args()
level = logging.DEBUG if args.debug else logging.INFO
......@@ -107,7 +121,7 @@ def main():
os.symlink(uboot_target, os.path.join(outdir, UBOOT.format(uboot_board)))
write_uuu_script(uuu_target, image_target, uboot_target, uuu_mods)
flash_image(uuu_target, args.debug)
flash_image(uuu_target, args)
except KeyboardInterrupt:
logging.error("CTRL-C pressed.")
return 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment