diff mbox

[Branch,~linaro-image-tools/linaro-image-tools/trunk] Rev 362: Support both new and old SPL filenames for smdkv310.

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

Commit Message

James Westby June 23, 2011, 2:25 p.m. UTC
Merge authors:
  Angus Ainslie (angus-akkea)
Related merge proposals:
  https://code.launchpad.net/~linaro-landing-team-samsung/linaro-image-tools/v310-spl-name-fix/+merge/65599
  proposed by: Angus Ainslie (angus-akkea)
------------------------------------------------------------
revno: 362 [merge]
committer: James Westby <james.westby@linaro.org>
branch nick: trunk
timestamp: Thu 2011-06-23 10:22:16 -0400
message:
  Support both new and old SPL filenames for smdkv310.
modified:
  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_image_tools/media_create/boards.py'
--- linaro_image_tools/media_create/boards.py	2011-06-23 13:08:29 +0000
+++ linaro_image_tools/media_create/boards.py	2011-06-23 14:22:16 +0000
@@ -800,9 +800,23 @@ 
     def _make_boot_files(cls, boot_env, chroot_dir, boot_dir,
                          boot_device_or_file, k_img_data, i_img_data,
                          d_img_data):
-        spl_file = os.path.join(
+        old_spl_path = os.path.join(
             chroot_dir, 'usr', 'lib', 'u-boot', cls.uboot_flavor,
             'v310_mmc_spl.bin')
+        new_spl_path = os.path.join(
+            chroot_dir, 'usr', 'lib', 'u-boot', cls.uboot_flavor,
+            'u-boot-mmc-spl.bin')
+
+        spl_file = old_spl_path
+        # The new upstream u-boot filename has changed
+        if not os.path.exists(spl_file):
+            spl_file = new_spl_path
+
+        if not os.path.exists(spl_file):
+            # missing SPL loader
+            raise AssertionError("Couldn't find the SPL file, tried %s and %s"
+                % (old_spl_path, new_spl_path))
+
         # XXX need to check that the length of spl_file is smaller than
         # SAMSUNG_V310_BL1_LEN
         _dd(spl_file, boot_device_or_file, seek=SAMSUNG_V310_BL1_START)