From patchwork Thu Feb 10 18:43:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guilherme Salgado X-Patchwork-Id: 117 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:40:07 -0000 Delivered-To: patches@linaro.org Received: by 10.147.124.5 with SMTP id b5cs192833yan; Thu, 10 Feb 2011 10:43:32 -0800 (PST) Received: by 10.216.167.148 with SMTP id i20mr18223606wel.65.1297363412075; Thu, 10 Feb 2011 10:43:32 -0800 (PST) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id o2si637591wer.172.2011.02.10.10.43.30; Thu, 10 Feb 2011 10:43:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=bounces@canonical.com Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1PnbUH-0007ii-Vy for ; Thu, 10 Feb 2011 18:43:30 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id ECA022E8056 for ; Thu, 10 Feb 2011 18:43:29 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: linaro-image-tools X-Launchpad-Branch: ~linaro-maintainers/linaro-image-tools/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 286 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-maintainers/linaro-image-tools/trunk] Rev 286: When --consoles is passed to l-m-c, append (instead of prepend) them to the list of serial option... Message-Id: <20110210184329.32262.38631.launchpad@loganberry.canonical.com> Date: Thu, 10 Feb 2011 18:43:29 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="12335"; Instance="initZopeless config overlay" X-Launchpad-Hash: dc98a29da42a1df10996a1b698e98a3ddcca4956 Merge authors: Guilherme Salgado (salgado) Related merge proposals: https://code.launchpad.net/~salgado/linaro-image-tools/bug-711255/+merge/49252 proposed by: Guilherme Salgado (salgado) review: Approve - James Westby (james-w) ------------------------------------------------------------ revno: 286 [merge] committer: Guilherme Salgado branch nick: trunk timestamp: Thu 2011-02-10 16:37:39 -0200 message: When --consoles is passed to l-m-c, append (instead of prepend) them to the list of serial options in the boot cmd (fixes bug #711255) modified: linaro_media_create/__init__.py linaro_media_create/boards.py linaro_media_create/tests/test_media_create.py --- lp:linaro-image-tools https://code.launchpad.net/~linaro-maintainers/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-maintainers/linaro-image-tools/trunk/+edit-subscription === modified file 'linaro_media_create/__init__.py' --- linaro_media_create/__init__.py 2011-01-28 19:50:48 +0000 +++ linaro_media_create/__init__.py 2011-02-10 16:58:11 +0000 @@ -78,7 +78,7 @@ 'only-ubiquity option to allow use of live installer on ' 'boards with 256M memory - like beagle.')) parser.add_argument( - '--console', action='append', dest='consoles', + '--console', action='append', dest='consoles', default=[], help=('Add a console to kernel boot parameter; this parameter can be ' 'defined multiple times.')) parser.add_argument( === modified file 'linaro_media_create/boards.py' --- linaro_media_create/boards.py 2011-02-01 13:16:43 +0000 +++ linaro_media_create/boards.py 2011-02-10 16:58:11 +0000 @@ -74,17 +74,9 @@ boot_args_options = 'rootwait ro' if cls.extra_boot_args_options is not None: boot_args_options += ' %s' % cls.extra_boot_args_options - serial_opts = '' - if consoles is not None: - for console in consoles: - serial_opts += ' console=%s' % console - - # XXX: I think this is not needed as we have board-specific - # serial options for when is_live is true. - if is_live: - serial_opts += ' serialtty=%s' % cls.serial_tty - - serial_opts += ' %s' % cls.extra_serial_opts + serial_opts = cls.extra_serial_opts + for console in consoles: + serial_opts += ' console=%s' % console lowmem_opt = '' boot_snippet = 'root=UUID=%s' % rootfs_uuid === modified file 'linaro_media_create/tests/test_media_create.py' --- linaro_media_create/tests/test_media_create.py 2011-02-02 17:38:16 +0000 +++ linaro_media_create/tests/test_media_create.py 2011-02-10 16:58:11 +0000 @@ -344,34 +344,34 @@ def test_vexpress(self): boot_cmd = board_configs['vexpress']._get_boot_cmd( - is_live=False, is_lowmem=False, consoles=None, + is_live=False, is_lowmem=False, consoles=['ttyXXX'], rootfs_uuid="deadbeef") expected = ( "setenv bootcmd 'fatload mmc 0:1 0x60008000 uImage; fatload mmc " "0:1 0x81000000 uInitrd; bootm 0x60008000 0x81000000'\nsetenv " - "bootargs ' console=tty0 console=ttyAMA0,38400n8 " + "bootargs 'console=tty0 console=ttyAMA0,38400n8 console=ttyXXX " "root=UUID=deadbeef rootwait ro'\nboot") self.assertEqual(expected, boot_cmd) def test_mx51evk(self): boot_cmd = board_configs['mx51evk']._get_boot_cmd( - is_live=False, is_lowmem=False, consoles=None, + is_live=False, is_lowmem=False, consoles=[], rootfs_uuid="deadbeef") expected = ( "setenv bootcmd 'fatload mmc 0:2 0x90000000 uImage; fatload mmc " "0:2 0x90800000 uInitrd; bootm 0x90000000 0x90800000'\nsetenv " - "bootargs ' console=tty0 console=ttymxc0,115200n8 " + "bootargs 'console=tty0 console=ttymxc0,115200n8 " "root=UUID=deadbeef rootwait ro'\nboot") self.assertEqual(expected, boot_cmd) def test_ux500(self): boot_cmd = board_configs['ux500']._get_boot_cmd( - is_live=False, is_lowmem=False, consoles=None, + is_live=False, is_lowmem=False, consoles=[], rootfs_uuid="deadbeef") expected = ( "setenv bootcmd 'fatload mmc 1:1 0x00100000 uImage; fatload mmc " "1:1 0x08000000 uInitrd; bootm 0x00100000 0x08000000'\nsetenv " - "bootargs ' console=tty0 console=ttyAMA2,115200n8 " + "bootargs 'console=tty0 console=ttyAMA2,115200n8 " "root=UUID=deadbeef rootwait ro earlyprintk rootdelay=1 fixrtc " "nocompcache mem=96M@0 mem_modem=32M@96M mem=44M@128M " "pmem=22M@172M mem=30M@194M mem_mali=32M@224M " @@ -385,12 +385,12 @@ config = board_configs['panda'] config.serial_tty = config._serial_tty boot_cmd = config._get_boot_cmd( - is_live=False, is_lowmem=False, consoles=None, + is_live=False, is_lowmem=False, consoles=[], rootfs_uuid="deadbeef") expected = ( "setenv bootcmd 'fatload mmc 0:1 0x80200000 uImage; fatload mmc " "0:1 0x81600000 uInitrd; bootm 0x80200000 0x81600000'\nsetenv " - "bootargs ' console=tty0 console=ttyO2,115200n8 " + "bootargs 'console=tty0 console=ttyO2,115200n8 " "root=UUID=deadbeef rootwait ro earlyprintk fixrtc nocompcache " "vram=32M omapfb.vram=0:8M mem=463M " "ip=none'\nboot") @@ -403,12 +403,12 @@ config = board_configs['beagle'] config.serial_tty = config._serial_tty boot_cmd = config._get_boot_cmd( - is_live=False, is_lowmem=False, consoles=None, + is_live=False, is_lowmem=False, consoles=[], rootfs_uuid="deadbeef") expected = ( "setenv bootcmd 'fatload mmc 0:1 0x80000000 uImage; " "fatload mmc 0:1 0x81600000 uInitrd; bootm 0x80000000 " - "0x81600000'\nsetenv bootargs ' console=tty0 " + "0x81600000'\nsetenv bootargs 'console=tty0 " "console=ttyO2,115200n8 root=UUID=deadbeef rootwait ro " "earlyprintk fixrtc nocompcache vram=12M " "omapfb.mode=dvi:1280x720MR-16@60'\nboot") @@ -421,16 +421,17 @@ config = board_configs['overo'] config.serial_tty = config._serial_tty boot_cmd = config._get_boot_cmd( - is_live=False, is_lowmem=False, consoles=None, + is_live=False, is_lowmem=False, consoles=[], rootfs_uuid="deadbeef") expected = ( "setenv bootcmd 'fatload mmc 0:1 0x80000000 uImage; " "fatload mmc 0:1 0x81600000 uInitrd; bootm 0x80000000 " - "0x81600000'\nsetenv bootargs ' console=tty0 " + "0x81600000'\nsetenv bootargs 'console=tty0 " "console=ttyO2,115200n8 root=UUID=deadbeef rootwait ro " "earlyprintk'\nboot") self.assertEqual(expected, boot_cmd) + class TestUnpackBinaryTarball(TestCaseWithFixtures): def setUp(self):