diff mbox

[Branch,~linaro-image-tools/linaro-image-tools/trunk] Rev 435: Allow --dev snowball_sd with V2 hwpacks.

Message ID 20110922204413.11961.35810.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Mattias Backman Sept. 22, 2011, 8:44 p.m. UTC
Merge authors:
  Mattias Backman (mabac)
Related merge proposals:
  https://code.launchpad.net/~mabac/linaro-image-tools/snowball-sd-v2/+merge/76646
  proposed by: Mattias Backman (mabac)
  review: Approve - James Westby (james-w)
------------------------------------------------------------
revno: 435 [merge]
committer: Mattias Backman <mattias.backman@linaro.org>
branch nick: linaro-image-tools
timestamp: Thu 2011-09-22 22:42:03 +0200
message:
  Allow --dev snowball_sd with V2 hwpacks.
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
diff mbox

Patch

=== modified file 'linaro-media-create'
--- linaro-media-create	2011-09-15 11:45:23 +0000
+++ linaro-media-create	2011-09-22 20:11:46 +0000
@@ -113,6 +113,7 @@ 
 
     board_config = board_configs[args.board]
     board_config.set_metadata(args.hwpacks)
+    board_config.set_board(args.board)
 
     ensure_required_commands(args)
 

=== modified file 'linaro_image_tools/media_create/boards.py'
--- linaro_image_tools/media_create/boards.py	2011-09-22 12:23:46 +0000
+++ linaro_image_tools/media_create/boards.py	2011-09-22 20:11:46 +0000
@@ -191,6 +191,7 @@ 
 
 
 class BoardConfig(object):
+    board = None
     """The configuration used when building an image for a board."""
     hwpack_format = None
     # These attributes may not need to be redefined on some subclasses.
@@ -274,6 +275,10 @@ 
         return data
 
     @classmethod
+    def set_board(cls, board):
+        cls.board = board
+
+    @classmethod
     def set_metadata(cls, hwpacks):
         cls.hardwarepack_handler = HardwarepackHandler(hwpacks)
         with cls.hardwarepack_handler:
@@ -526,7 +531,8 @@ 
 
     @classmethod
     def get_sfdisk_cmd(cls, should_align_boot_part=False):
-        if cls.partition_layout in ['bootfs_rootfs', 'bootfs16_rootfs']:
+        if (cls.partition_layout in ['bootfs_rootfs', 'bootfs16_rootfs'] or
+            cls.board == 'snowball_sd'):
             return cls.get_normal_sfdisk_cmd(should_align_boot_part)
         elif cls.partition_layout in ['reserved_bootfs_rootfs']:
             return cls.get_reserved_sfdisk_cmd(should_align_boot_part)
@@ -681,8 +687,8 @@ 
         # Only used for Omap and Igep, will this be bad for the other boards?
         make_boot_ini(boot_script_path, boot_dir)
 
-        if cls.snowball_startup_files_config is not None:
-            # This should only happen for --dev snowball_emmc!!!
+        if (cls.snowball_startup_files_config is not None and
+            cls.board != 'snowball_sd'):
             cls.populate_raw_partition(chroot_dir, boot_device_or_file)
 
         if cls.env_dd: