diff mbox

[Branch,~linaro-image-tools/linaro-image-tools/trunk] Rev 635: Added Fujitsu AA9 board support.

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

Commit Message

Milo Casagrande Aug. 16, 2013, 8:02 a.m. UTC
Merge authors:
  Fathi Boudra (fboudra)
Related merge proposals:
  https://code.launchpad.net/~fboudra/linaro-image-tools/aa9-support/+merge/180477
  proposed by: Fathi Boudra (fboudra)
  review: Approve - Milo Casagrande (milo)
------------------------------------------------------------
revno: 635 [merge]
author: Fathi Boudra <fathi.boudra@linaro.org>
committer: Milo Casagrande <milo@ubuntu.com>
branch nick: trunk
timestamp: Fri 2013-08-16 10:01:22 +0200
message:
  Added Fujitsu AA9 board support.
modified:
  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/boards.py'
--- linaro_image_tools/media_create/boards.py	2013-08-06 10:09:32 +0000
+++ linaro_image_tools/media_create/boards.py	2013-08-16 08:01:22 +0000
@@ -1727,6 +1727,20 @@ 
         self.load_addr = '0x00000000'
 
 
+class Aa9Config(BoardConfig):
+    def __init__(self):
+        super(Aa9Config, self).__init__()
+        self.boot_script = 'boot.scr'
+        self.bootloader_flavor = 'mb8ac0300eb'
+        self.kernel_flavors = None
+        self._serial_tty = 'ttyS0'
+        self.dtb_addr = '0x41000000'
+        self.initrd_addr = '0x41100000'
+        self.kernel_addr = '0x40000000'
+        self.load_addr = '0x40008000'
+        self._extra_serial_options = 'console=ttyS0,115200n8'
+
+
 class I386Config(BoardConfig):
     # define bootloader
     BOOTLOADER_CMD = 'grub-install'
@@ -1793,6 +1807,7 @@ 
 
 
 board_configs = {
+    'aa9': Aa9Config,
     'arndale': ArndaleConfig,
     'beagle': BeagleConfig,
     'beaglebone': BeagleBoneConfig,

=== modified file 'linaro_image_tools/media_create/tests/test_media_create.py'
--- linaro_image_tools/media_create/tests/test_media_create.py	2013-08-08 07:34:16 +0000
+++ linaro_image_tools/media_create/tests/test_media_create.py	2013-08-16 08:01:22 +0000
@@ -1440,6 +1440,12 @@ 
             'make_dtb', 'make_boot_script', 'make_boot_ini']
         self.assertEqual(expected, self.funcs_calls)
 
+    def test_aa9_steps(self):
+        board_conf = boards.Aa9Config()
+        board_conf.hwpack_format = HardwarepackHandler.FORMAT_1
+        expected = []
+        self.assertEqual(expected, self.funcs_calls)
+
 
 class TestPopulateRawPartition(TestCaseWithFixtures):
 
@@ -1571,6 +1577,11 @@ 
         expected = []
         self.assertEqual(expected, self.funcs_calls)
 
+    def test_aa9_raw(self):
+        self.populate_raw_partition(boards.Aa9Config())
+        expected = []
+        self.assertEqual(expected, self.funcs_calls)
+
 
 class TestPopulateRawPartitionAndroid(TestCaseWithFixtures):
 
@@ -1878,10 +1889,17 @@ 
             board_conf.get_sfdisk_cmd())
 
     def test_beaglebone(self):
-        board_conf = get_board_config('highbank')
-        self.set_up_config(board_conf)
-        self.assertEquals(
-            '63,106432,0x83,*\n106496,,,-',
+        board_conf = get_board_config('beaglebone')
+        self.set_up_config(board_conf)
+        self.assertEquals(
+            '63,106432,0x0C,*\n106496,,,-',
+            board_conf.get_sfdisk_cmd())
+
+    def test_aa9(self):
+        board_conf = get_board_config('aa9')
+        self.set_up_config(board_conf)
+        self.assertEquals(
+            '63,106432,0x0C,*\n106496,,,-',
             board_conf.get_sfdisk_cmd())
 
     def test_panda_android(self):
@@ -2013,6 +2031,13 @@ 
             '63,106432,0x0C,*\n106496,,,-',
             board_conf.get_sfdisk_cmd())
 
+    def test_aa9(self):
+        board_conf = get_board_config('aa9')
+        board_conf.partition_layout = 'bootfs_rootfs'
+        self.assertEquals(
+            '63,106432,0x0C,*\n106496,,,-',
+            board_conf.get_sfdisk_cmd())
+
 
 class TestGetBootCmd(TestCase):
 
@@ -2291,6 +2316,24 @@ 
             'initrd_high': '0xffffffff'}
         self.assertEqual(expected, boot_commands)
 
+    def test_aa9(self):
+        config = get_board_config('aa9')
+        config.serial_tty = config._serial_tty
+        boot_commands = config._get_boot_env(
+            is_live=False, is_lowmem=False, consoles=[],
+            rootfs_id="UUID=deadbeef", i_img_data="initrd",
+            d_img_data="board.dtb")
+        expected = {
+            'bootargs': 'console=ttyS0,115200n8  '
+                        'root=UUID=deadbeef rootwait ro',
+            'bootcmd': 'fatload mmc 0:1 0x40000000 uImage; '
+                       'fatload mmc 0:1 0x41100000 uInitrd; '
+                       'fatload mmc 0:1 0x41000000 board.dtb; '
+                       'bootm 0x40000000 0x41100000 0x41000000',
+            'fdt_high': '0xffffffff',
+            'initrd_high': '0xffffffff'}
+        self.assertEqual(expected, boot_commands)
+
 
 class TestExtraBootCmd(TestCaseWithFixtures):