Merge lp:~tixy/linaro-image-tools/vexpress-a9-support into lp:linaro-image-tools/11.11

Proposed by Tixy (Jon Medhurst)
Status: Merged
Merged at revision: 461
Proposed branch: lp:~tixy/linaro-image-tools/vexpress-a9-support
Merge into: lp:linaro-image-tools/11.11
Diff against target: 116 lines (+44/-1)
3 files modified
linaro_image_tools/media_create/android_boards.py (+7/-0)
linaro_image_tools/media_create/boards.py (+9/-1)
linaro_image_tools/media_create/tests/test_media_create.py (+28/-0)
To merge this branch: bzr merge lp:~tixy/linaro-image-tools/vexpress-a9-support
Reviewer Review Type Date Requested Status
Mattias Backman (community) Approve
Review via email: mp+82372@code.launchpad.net

Description of the change

This is the same as my previous merge proposal but with test cases added, including for Android.

To post a comment you must log in.
Revision history for this message
Mattias Backman (mabac) wrote :

Thanks for adding the tests. We do also need the Android test cases. Can you have a look at TestGetBootCmdAndroid and TestGetSfdiskCmd and add a corresponding test method for the Vexpress as well?

Revision history for this message
Tixy (Jon Medhurst) (tixy) wrote :

On Wed, 2011-11-16 at 13:56 +0000, Mattias Backman wrote:
> Thanks for adding the tests. We do also need the Android test cases. Can you have a look at TestGetBootCmdAndroid and TestGetSfdiskCmd and add a corresponding test method for the Vexpress as well?

I will do that. What is the best way, commit another change and push
that out? Or modify the existing change?

--
Tixy

Revision history for this message
Mattias Backman (mabac) wrote :

On Wed, Nov 16, 2011 at 3:04 PM, Tixy (Jon Medhurst)
<email address hidden> wrote:
> On Wed, 2011-11-16 at 13:56 +0000, Mattias Backman wrote:
>> Thanks for adding the tests. We do also need the Android test cases. Can you have a look at TestGetBootCmdAndroid and TestGetSfdiskCmd and add a corresponding test method for the Vexpress as well?
>
> I will do that. What is the best way, commit another change and push
> that out? Or modify the existing change?

Just commit another revision and push to the branch. Bazaar should
have remembered the target so you can do
   bzr push
and if that does not work do
   bzr push lp:~tixy/etc/etc --remember
so it will be remembered for next time.

Then put a comment in the merge proposal since I don't think there's
any notification for new revisions.

>
> --
> Tixy
>
>
> https://code.launchpad.net/~tixy/linaro-image-tools/vexpress-a9-support/+merge/82372
> You are requested to review the proposed merge of lp:~tixy/linaro-image-tools/vexpress-a9-support into lp:linaro-image-tools.
>

462. By Tixy (Jon Medhurst)

Add vexpress-a9 test case for android.

Revision history for this message
Tixy (Jon Medhurst) (tixy) wrote :

On Wed, 2011-11-16 at 14:29 +0000, Mattias Backman wrote:
> On Wed, Nov 16, 2011 at 3:04 PM, Tixy (Jon Medhurst)
> <email address hidden> wrote:
> > On Wed, 2011-11-16 at 13:56 +0000, Mattias Backman wrote:
> >> Thanks for adding the tests. We do also need the Android test cases. Can you have a look at TestGetBootCmdAndroid and TestGetSfdiskCmd and add a corresponding test method for the Vexpress as well?
> >
> > I will do that. What is the best way, commit another change and push
> > that out? Or modify the existing change?
>
> Just commit another revision and push to the branch. Bazaar should
> have remembered the target so you can do
> bzr push
> and if that does not work do
> bzr push lp:~tixy/etc/etc --remember
> so it will be remembered for next time.
>
> Then put a comment in the merge proposal since I don't think there's
> any notification for new revisions.

I've done that, thanks. For planning purposes, what is the likelyhood
that this change would be in the tools in time for a vexpress Android
release this month? (I'm guessing it's a bit late now.)

--
Tixy

Revision history for this message
Mattias Backman (mabac) wrote :

Thanks for the additional tests.

> I've done that, thanks. For planning purposes, what is the likelyhood
> that this change would be in the tools in time for a vexpress Android
> release this month? (I'm guessing it's a bit late now.)

I'd say that there's a very good chance to have this in the next release of l-i-t. :) That is, I'll have another look and probably find that I'm still happy with it and merge it before we cut the release.

>
> --
> Tixy

Revision history for this message
Mattias Backman (mabac) wrote :

Thank you for working on this and adding the test cases. I have merged the change so it will be part of the next release.

review: Approve
Revision history for this message
Tixy (Jon Medhurst) (tixy) wrote :

On Thu, 2011-11-17 at 09:07 +0000, Mattias Backman wrote:
> Review: Approve
>
> Thank you for working on this and adding the test cases. I have merged the change so it will be part of the next release.

Thanks :-)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'linaro_image_tools/media_create/android_boards.py'
2--- linaro_image_tools/media_create/android_boards.py 2011-11-14 15:14:29 +0000
3+++ linaro_image_tools/media_create/android_boards.py 2011-11-16 14:37:01 +0000
4@@ -33,6 +33,7 @@
5 from linaro_image_tools.media_create.boards import SnowballEmmcConfig
6 from linaro_image_tools.media_create.boards import SMDKV310Config
7 from linaro_image_tools.media_create.boards import OrigenConfig
8+from linaro_image_tools.media_create.boards import VexpressA9Config
9 from linaro_image_tools.media_create.boards import (
10 align_up,
11 align_partition,
12@@ -282,6 +283,11 @@
13 android_specific_args = 'init=/init androidboot.console=ttySAC2'
14
15
16+class AndroidVexpressA9Config(AndroidBoardConfig, VexpressA9Config):
17+ _extra_serial_opts = 'console=tty0 console=ttyAMA0,38400n8'
18+ android_specific_args = 'init=/init androidboot.console=ttyAMA0'
19+
20+
21 android_board_configs = {
22 'beagle': AndroidBeagleConfig,
23 'panda': AndroidPandaConfig,
24@@ -291,4 +297,5 @@
25 'mx53loco': AndroidMx53LoCoConfig,
26 'iMX53': AndroidMx53LoCoConfig,
27 'origen': AndroidOrigenConfig,
28+ 'vexpress-a9': AndroidVexpressA9Config,
29 }
30
31=== modified file 'linaro_image_tools/media_create/boards.py'
32--- linaro_image_tools/media_create/boards.py 2011-11-09 17:39:45 +0000
33+++ linaro_image_tools/media_create/boards.py 2011-11-16 14:37:01 +0000
34@@ -1266,7 +1266,7 @@
35 initrd_addr = '0x81000000'
36 load_addr = kernel_addr
37 kernel_flavors = ['linaro-vexpress']
38- boot_script = None
39+ boot_script = 'boot.scr'
40 # ARM Boot Monitor is used to load u-boot, uImage etc. into flash and
41 # only allows for FAT16
42 fat_size = 16
43@@ -1287,6 +1287,13 @@
44 make_uInitrd(i_img_data, boot_dir)
45
46
47+class VexpressA9Config(VexpressConfig):
48+ # For now, this is a duplicate of VexpressConfig.
49+ # In future, there will also be A5 and A15 variants.
50+ # For all of these, there should never be any V1 hardware packs.
51+ pass
52+
53+
54 class SamsungConfig(BoardConfig):
55 @classproperty
56 def extra_serial_opts(cls):
57@@ -1430,6 +1437,7 @@
58 'igep': IgepConfig,
59 'panda': PandaConfig,
60 'vexpress': VexpressConfig,
61+ 'vexpress-a9': VexpressA9Config,
62 'ux500': Ux500Config,
63 'snowball_sd': SnowballSdConfig,
64 'snowball_emmc': SnowballEmmcConfig,
65
66=== modified file 'linaro_image_tools/media_create/tests/test_media_create.py'
67--- linaro_image_tools/media_create/tests/test_media_create.py 2011-11-15 08:07:46 +0000
68+++ linaro_image_tools/media_create/tests/test_media_create.py 2011-11-16 14:37:01 +0000
69@@ -919,6 +919,11 @@
70 expected = ['make_uImage', 'make_uInitrd']
71 self.assertEqual(expected, self.funcs_calls)
72
73+ def test_vexpress_a9_steps(self):
74+ self.make_boot_files(boards.VexpressA9Config)
75+ expected = ['make_uImage', 'make_uInitrd']
76+ self.assertEqual(expected, self.funcs_calls)
77+
78 def test_mx5_steps(self):
79 class SomeMx5Config(boards.Mx5Config):
80 uboot_flavor = 'uboot_flavor'
81@@ -1224,6 +1229,18 @@
82 'bootm 0x60008000 0x81000000'}
83 self.assertEqual(expected, boot_commands)
84
85+ def test_vexpress_a9(self):
86+ boot_commands = board_configs['vexpress-a9']._get_boot_env(
87+ is_live=False, is_lowmem=False, consoles=['ttyXXX'],
88+ rootfs_uuid="deadbeef", d_img_data=None)
89+ expected = {
90+ 'bootargs': 'console=tty0 console=ttyAMA0,38400n8 '
91+ 'console=ttyXXX root=UUID=deadbeef rootwait ro',
92+ 'bootcmd': 'fatload mmc 0:1 0x60008000 uImage; '
93+ 'fatload mmc 0:1 0x81000000 uInitrd; '
94+ 'bootm 0x60008000 0x81000000'}
95+ self.assertEqual(expected, boot_commands)
96+
97 def test_mx51(self):
98 boot_commands = boards.Mx51Config._get_boot_env(
99 is_live=False, is_lowmem=False, consoles=[],
100@@ -1436,6 +1453,17 @@
101 'bootm 0x40007000 0x42000000'}
102 self.assertEqual(expected, boot_commands)
103
104+ def test_android_vexpress_a9(self):
105+ boot_commands = (android_boards.AndroidVexpressA9Config.
106+ _get_boot_env(consoles=[]))
107+ expected = {
108+ 'bootargs': 'console=tty0 console=ttyAMA0,38400n8 '
109+ 'rootwait ro init=/init androidboot.console=ttyAMA0',
110+ 'bootcmd': 'fatload mmc 0:1 0x60008000 uImage; '
111+ 'fatload mmc 0:1 0x81000000 uInitrd; '
112+ 'bootm 0x60008000 0x81000000'}
113+ self.assertEqual(expected, boot_commands)
114+
115
116 class TestUnpackBinaryTarball(TestCaseWithFixtures):
117

Subscribers

People subscribed via source and target branches