diff mbox

[Branch,~linaro-image-tools/linaro-image-tools/trunk] Rev 613: Fixed regression when using actual dtb file name, not general one.

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

Commit Message

Fathi Boudra March 26, 2013, 9:10 a.m. UTC
Merge authors:
  Milo Casagrande (milo)
Related merge proposals:
  https://code.launchpad.net/~milo/linaro-image-tools/fix-for-dtb/+merge/155433
  proposed by: Milo Casagrande (milo)
  review: Approve - Fathi Boudra (fboudra)
------------------------------------------------------------
revno: 613 [merge]
committer: Fathi Boudra <fathi.boudra@linaro.org>
branch nick: linaro-image-tools
timestamp: Tue 2013-03-26 11:08:58 +0200
message:
  Fixed regression when using actual dtb file name, not general one.
modified:
  linaro_image_tools/media_create/android_boards.py
  linaro_image_tools/media_create/boards.py
  linaro_image_tools/media_create/tests/test_media_create.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/android_boards.py'
--- linaro_image_tools/media_create/android_boards.py	2013-03-25 12:51:45 +0000
+++ linaro_image_tools/media_create/android_boards.py	2013-03-26 08:59:38 +0000
@@ -514,6 +514,35 @@ 
         self._extra_serial_options = 'ttySAC2,115200n8'
         self._extra_boot_args_options = 'rootdelay=3'
 
+    def _get_bootcmd(self, i_img_data, d_img_data):
+        """Get the bootcmd for this board.
+
+        In general subclasses should not have to override this.
+        """
+        replacements = dict(
+            fatload_command=self.fatload_command, uimage_path=self.uimage_path,
+            mmc_option=self.mmc_option, kernel_addr=self.kernel_addr,
+            initrd_addr=self.initrd_addr, dtb_addr=self.dtb_addr)
+        boot_script = (
+            ("%(fatload_command)s mmc %(mmc_option)s %(kernel_addr)s " +
+             "%(uimage_path)suImage; ")) % replacements
+        if i_img_data is not None:
+            boot_script += (
+                ("%(fatload_command)s mmc %(mmc_option)s %(initrd_addr)s " +
+                 "%(uimage_path)suInitrd; ")) % replacements
+            if d_img_data is not None:
+                assert self.dtb_addr is not None, (
+                    "Need a dtb_addr when passing d_img_data")
+                boot_script += (("%(fatload_command)s mmc %(mmc_option)s "
+                    "%(dtb_addr)s ")) % replacements
+                boot_script += "%s; " % d_img_data
+        boot_script += (("bootm %(kernel_addr)s")) % replacements
+        if i_img_data is not None:
+            boot_script += ((" %(initrd_addr)s")) % replacements
+            if d_img_data is not None:
+                boot_script += ((" %(dtb_addr)s")) % replacements
+        return boot_script
+
     def populate_raw_partition(self, boot_device_or_file, chroot_dir):
         boot_bin_0 = {'name': 'arndale-bl1.bin', 'seek': 1}
         boot_bin_1 = {'name': 'u-boot-mmc-spl.bin', 'seek': 17}

=== modified file 'linaro_image_tools/media_create/boards.py'
--- linaro_image_tools/media_create/boards.py	2013-03-25 12:52:08 +0000
+++ linaro_image_tools/media_create/boards.py	2013-03-26 09:08:58 +0000
@@ -534,8 +534,7 @@ 
                 assert self.dtb_addr is not None, (
                     "Need a dtb_addr when passing d_img_data")
                 boot_script += (("%(fatload_command)s mmc %(mmc_option)s "
-                    "%(dtb_addr)s ")) % replacements
-                boot_script += "%s; " % d_img_data
+                    "%(dtb_addr)s board.dtb; ")) % replacements
         boot_script += (("bootm %(kernel_addr)s")) % replacements
         if i_img_data is not None:
             boot_script += ((" %(initrd_addr)s")) % replacements

=== modified file 'linaro_image_tools/media_create/tests/test_media_create.py'
--- linaro_image_tools/media_create/tests/test_media_create.py	2013-03-25 12:52:28 +0000
+++ linaro_image_tools/media_create/tests/test_media_create.py	2013-03-26 08:59:38 +0000
@@ -2002,7 +2002,7 @@ 
                         'root=UUID=deadbeef rootwait ro',
             'bootcmd': 'fatload mmc 0:2 0x90000000 uImage; '
                        'fatload mmc 0:2 0x92000000 uInitrd; '
-                       'fatload mmc 0:2 0x91ff0000 mx51.dtb; '
+                       'fatload mmc 0:2 0x91ff0000 board.dtb; '
                        'bootm 0x90000000 0x92000000 0x91ff0000',
             'fdt_high': '0xffffffff',
             'initrd_high': '0xffffffff'}
@@ -2126,7 +2126,7 @@ 
                         'mem=456M@0x80000000 mem=512M@0xA0000000',
             'bootcmd': 'fatload mmc 0:1 0x80200000 uImage; '
                        'fatload mmc 0:1 0x81600000 uInitrd; '
-                       'fatload mmc 0:1 0x815f0000 panda.dtb; '
+                       'fatload mmc 0:1 0x815f0000 board.dtb; '
                        'bootm 0x80200000 0x81600000 0x815f0000',
             'fdt_high': '0xffffffff',
             'initrd_high': '0xffffffff'}
@@ -2149,7 +2149,7 @@ 
                         'omapfb.mode=dvi:1280x720MR-16@60 mpurate=${mpurate}',
             'bootcmd': 'fatload mmc 0:1 0x80000000 uImage; '
                        'fatload mmc 0:1 0x81600000 uInitrd; '
-                       'fatload mmc 0:1 0x815f0000 beagle.dtb; '
+                       'fatload mmc 0:1 0x815f0000 board.dtb; '
                        'bootm 0x80000000 0x81600000 0x815f0000',
             'fdt_high': '0xffffffff',
             'initrd_high': '0xffffffff'}
@@ -2172,7 +2172,7 @@ 
                         'omapfb.mode=dvi:1280x720MR-16@60 mpurate=${mpurate}',
             'bootcmd': 'fatload mmc 0:1 0x80000000 uImage; '
                        'fatload mmc 0:1 0x81600000 uInitrd; '
-                       'fatload mmc 0:1 0x815f0000 igep.dtb; '
+                       'fatload mmc 0:1 0x815f0000 board.dtb; '
                        'bootm 0x80000000 0x81600000 0x815f0000',
             'fdt_high': '0xffffffff',
             'initrd_high': '0xffffffff'}
@@ -2196,7 +2196,7 @@ 
                         'omapfb.mode=dvi:${dvimode}',
             'bootcmd': 'fatload mmc 0:1 0x80000000 uImage; '
                        'fatload mmc 0:1 0x81600000 uInitrd; '
-                       'fatload mmc 0:1 0x815f0000 overo.dtb; '
+                       'fatload mmc 0:1 0x815f0000 board.dtb; '
                        'bootm 0x80000000 0x81600000 0x815f0000',
             'fdt_high': '0xffffffff',
             'initrd_high': '0xffffffff'}