[Branch,~linaro-image-tools/linaro-image-tools/trunk] Rev 340: Make sure that the --mmc option cannot be used for the snowball_emmc board config, as that usage ...

Message ID 20110520134537.21036.29675.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

Mattias Backman May 20, 2011, 1:45 p.m.
Merge authors:
  Mattias Backman (mabac)
Related merge proposals:
  https://code.launchpad.net/~mabac/linaro-image-tools/snowball-no-mmc-option/+merge/61584
  proposed by: Mattias Backman (mabac)
  review: Approve - Tony Mansson (tony-mansson)
  review: Approve - Hans Odeberg (hans-odeberg)
  review: Approve - Loïc Minier (lool)
------------------------------------------------------------
revno: 340 [merge]
committer: Mattias Backman <mattias.backman@linaro.org>
branch nick: linaro-image-tools
timestamp: Fri 2011-05-20 15:41:31 +0200
message:
  Make sure that the --mmc option cannot be used for the snowball_emmc board config, as that usage would be confusing.
modified:
  linaro-media-create
  linaro_image_tools/media_create/boards.py


--
lp:linaro-image-tools
https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk

You are subscribed to branch lp:linaro-image-tools.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-image-tools/linaro-image-tools/trunk/+edit-subscription

Patch

=== modified file 'linaro-media-create'
--- linaro-media-create	2011-05-05 17:47:41 +0000
+++ linaro-media-create	2011-05-19 14:30:21 +0000
@@ -119,6 +119,10 @@ 
 
     media = Media(args.device)
     if media.is_block_device:
+        if not board_config.supports_writing_to_mmc:
+            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):
             sys.exit(1)
     elif not args.should_format_rootfs or not args.should_format_bootfs:

=== modified file 'linaro_image_tools/media_create/boards.py'
--- linaro_image_tools/media_create/boards.py	2011-05-20 07:51:46 +0000
+++ linaro_image_tools/media_create/boards.py	2011-05-20 13:41:31 +0000
@@ -141,6 +141,7 @@ 
     extra_serial_opts = ''
     live_serial_opts = ''
     extra_boot_args_options = None
+    supports_writing_to_mmc = True
 
     # These attributes must be defined on all subclasses.
     kernel_addr = None
@@ -518,6 +519,7 @@ 
     # Boot ROM looks for a boot table of contents (TOC) at 0x20000
     # Actually, it first looks at address 0, but that's where l-m-c
     # puts the MBR, so the boot loader skips that address. 
+    supports_writing_to_mmc = False
     SNOWBALL_LOADER_START_S = (128 * 1024) / SECTOR_SIZE
     SNOWBALL_STARTUP_FILES_CONFIG = 'startfiles.cfg'
     TOC_SIZE = 512