Merge lp:~salgado/linaro-image-tools/bug-711255 into lp:linaro-image-tools/11.11

Proposed by Guilherme Salgado
Status: Merged
Merged at revision: 286
Proposed branch: lp:~salgado/linaro-image-tools/bug-711255
Merge into: lp:linaro-image-tools/11.11
Diff against target: 132 lines (+17/-24)
3 files modified
linaro_media_create/__init__.py (+1/-1)
linaro_media_create/boards.py (+3/-11)
linaro_media_create/tests/test_media_create.py (+13/-12)
To merge this branch: bzr merge lp:~salgado/linaro-image-tools/bug-711255
Reviewer Review Type Date Requested Status
James Westby (community) Approve
Review via email: mp+49252@code.launchpad.net

Description of the change

When --consoles is passed to l-m-c, append (instead of prepend) them to the
list of serial options in the boot cmd.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'linaro_media_create/__init__.py'
2--- linaro_media_create/__init__.py 2011-01-28 19:50:48 +0000
3+++ linaro_media_create/__init__.py 2011-02-10 17:00:39 +0000
4@@ -78,7 +78,7 @@
5 'only-ubiquity option to allow use of live installer on '
6 'boards with 256M memory - like beagle.'))
7 parser.add_argument(
8- '--console', action='append', dest='consoles',
9+ '--console', action='append', dest='consoles', default=[],
10 help=('Add a console to kernel boot parameter; this parameter can be '
11 'defined multiple times.'))
12 parser.add_argument(
13
14=== modified file 'linaro_media_create/boards.py'
15--- linaro_media_create/boards.py 2011-02-01 13:16:43 +0000
16+++ linaro_media_create/boards.py 2011-02-10 17:00:39 +0000
17@@ -74,17 +74,9 @@
18 boot_args_options = 'rootwait ro'
19 if cls.extra_boot_args_options is not None:
20 boot_args_options += ' %s' % cls.extra_boot_args_options
21- serial_opts = ''
22- if consoles is not None:
23- for console in consoles:
24- serial_opts += ' console=%s' % console
25-
26- # XXX: I think this is not needed as we have board-specific
27- # serial options for when is_live is true.
28- if is_live:
29- serial_opts += ' serialtty=%s' % cls.serial_tty
30-
31- serial_opts += ' %s' % cls.extra_serial_opts
32+ serial_opts = cls.extra_serial_opts
33+ for console in consoles:
34+ serial_opts += ' console=%s' % console
35
36 lowmem_opt = ''
37 boot_snippet = 'root=UUID=%s' % rootfs_uuid
38
39=== modified file 'linaro_media_create/tests/test_media_create.py'
40--- linaro_media_create/tests/test_media_create.py 2011-02-02 17:38:16 +0000
41+++ linaro_media_create/tests/test_media_create.py 2011-02-10 17:00:39 +0000
42@@ -344,34 +344,34 @@
43
44 def test_vexpress(self):
45 boot_cmd = board_configs['vexpress']._get_boot_cmd(
46- is_live=False, is_lowmem=False, consoles=None,
47+ is_live=False, is_lowmem=False, consoles=['ttyXXX'],
48 rootfs_uuid="deadbeef")
49 expected = (
50 "setenv bootcmd 'fatload mmc 0:1 0x60008000 uImage; fatload mmc "
51 "0:1 0x81000000 uInitrd; bootm 0x60008000 0x81000000'\nsetenv "
52- "bootargs ' console=tty0 console=ttyAMA0,38400n8 "
53+ "bootargs 'console=tty0 console=ttyAMA0,38400n8 console=ttyXXX "
54 "root=UUID=deadbeef rootwait ro'\nboot")
55 self.assertEqual(expected, boot_cmd)
56
57 def test_mx51evk(self):
58 boot_cmd = board_configs['mx51evk']._get_boot_cmd(
59- is_live=False, is_lowmem=False, consoles=None,
60+ is_live=False, is_lowmem=False, consoles=[],
61 rootfs_uuid="deadbeef")
62 expected = (
63 "setenv bootcmd 'fatload mmc 0:2 0x90000000 uImage; fatload mmc "
64 "0:2 0x90800000 uInitrd; bootm 0x90000000 0x90800000'\nsetenv "
65- "bootargs ' console=tty0 console=ttymxc0,115200n8 "
66+ "bootargs 'console=tty0 console=ttymxc0,115200n8 "
67 "root=UUID=deadbeef rootwait ro'\nboot")
68 self.assertEqual(expected, boot_cmd)
69
70 def test_ux500(self):
71 boot_cmd = board_configs['ux500']._get_boot_cmd(
72- is_live=False, is_lowmem=False, consoles=None,
73+ is_live=False, is_lowmem=False, consoles=[],
74 rootfs_uuid="deadbeef")
75 expected = (
76 "setenv bootcmd 'fatload mmc 1:1 0x00100000 uImage; fatload mmc "
77 "1:1 0x08000000 uInitrd; bootm 0x00100000 0x08000000'\nsetenv "
78- "bootargs ' console=tty0 console=ttyAMA2,115200n8 "
79+ "bootargs 'console=tty0 console=ttyAMA2,115200n8 "
80 "root=UUID=deadbeef rootwait ro earlyprintk rootdelay=1 fixrtc "
81 "nocompcache mem=96M@0 mem_modem=32M@96M mem=44M@128M "
82 "pmem=22M@172M mem=30M@194M mem_mali=32M@224M "
83@@ -385,12 +385,12 @@
84 config = board_configs['panda']
85 config.serial_tty = config._serial_tty
86 boot_cmd = config._get_boot_cmd(
87- is_live=False, is_lowmem=False, consoles=None,
88+ is_live=False, is_lowmem=False, consoles=[],
89 rootfs_uuid="deadbeef")
90 expected = (
91 "setenv bootcmd 'fatload mmc 0:1 0x80200000 uImage; fatload mmc "
92 "0:1 0x81600000 uInitrd; bootm 0x80200000 0x81600000'\nsetenv "
93- "bootargs ' console=tty0 console=ttyO2,115200n8 "
94+ "bootargs 'console=tty0 console=ttyO2,115200n8 "
95 "root=UUID=deadbeef rootwait ro earlyprintk fixrtc nocompcache "
96 "vram=32M omapfb.vram=0:8M mem=463M "
97 "ip=none'\nboot")
98@@ -403,12 +403,12 @@
99 config = board_configs['beagle']
100 config.serial_tty = config._serial_tty
101 boot_cmd = config._get_boot_cmd(
102- is_live=False, is_lowmem=False, consoles=None,
103+ is_live=False, is_lowmem=False, consoles=[],
104 rootfs_uuid="deadbeef")
105 expected = (
106 "setenv bootcmd 'fatload mmc 0:1 0x80000000 uImage; "
107 "fatload mmc 0:1 0x81600000 uInitrd; bootm 0x80000000 "
108- "0x81600000'\nsetenv bootargs ' console=tty0 "
109+ "0x81600000'\nsetenv bootargs 'console=tty0 "
110 "console=ttyO2,115200n8 root=UUID=deadbeef rootwait ro "
111 "earlyprintk fixrtc nocompcache vram=12M "
112 "omapfb.mode=dvi:1280x720MR-16@60'\nboot")
113@@ -421,16 +421,17 @@
114 config = board_configs['overo']
115 config.serial_tty = config._serial_tty
116 boot_cmd = config._get_boot_cmd(
117- is_live=False, is_lowmem=False, consoles=None,
118+ is_live=False, is_lowmem=False, consoles=[],
119 rootfs_uuid="deadbeef")
120 expected = (
121 "setenv bootcmd 'fatload mmc 0:1 0x80000000 uImage; "
122 "fatload mmc 0:1 0x81600000 uInitrd; bootm 0x80000000 "
123- "0x81600000'\nsetenv bootargs ' console=tty0 "
124+ "0x81600000'\nsetenv bootargs 'console=tty0 "
125 "console=ttyO2,115200n8 root=UUID=deadbeef rootwait ro "
126 "earlyprintk'\nboot")
127 self.assertEqual(expected, boot_cmd)
128
129+
130 class TestUnpackBinaryTarball(TestCaseWithFixtures):
131
132 def setUp(self):

Subscribers

People subscribed via source and target branches