=== modified file 'linaro-media-create'
@@ -123,7 +123,8 @@
print "The board '%s' does not support the --mmc option. Please use " \
"--image_file to create an image file for this board." % args.board
sys.exit(1)
- if not confirm_device_selection_and_ensure_it_is_ready(args.device):
+ if not confirm_device_selection_and_ensure_it_is_ready(args.device,
+ args.nocheck_mmc):
sys.exit(1)
elif not args.should_format_rootfs or not args.should_format_bootfs:
print ("Do not use --no-boot or --no-part in conjunction with "
=== modified file 'linaro_image_tools/media_create/__init__.py'
@@ -119,6 +119,11 @@
'--align-boot-part', dest='should_align_boot_part',
action='store_true',
help='Align boot partition too (might break older x-loaders).')
+ parser.add_argument(
+ '--nocheck-mmc', dest='nocheck_mmc',
+ action='store_true',
+ help='Assume yes to the question "Are you 100%% sure, on selecting [mmc]"')
+
return parser
def get_android_args_parser():
=== modified file 'linaro_image_tools/media_create/check_device.py'
@@ -110,7 +110,9 @@
partitions.ensure_partition_is_not_mounted(part)
-def confirm_device_selection_and_ensure_it_is_ready(device):
+def confirm_device_selection_and_ensure_it_is_ready(
+ device,
+ yes_to_mmc_selection = False):
"""Confirm this is the device to use and ensure it's ready.
If the device exists, the user is asked to confirm that this is the
@@ -123,7 +125,7 @@
if _does_device_exist(device):
print '\nI see...'
_print_devices()
- if _select_device(device):
+ if yes_to_mmc_selection or _select_device(device):
_ensure_device_partitions_not_mounted(device)
return True
else: