From patchwork Thu Oct 6 08:59:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattias Backman X-Patchwork-Id: 4545 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id A855923EF7 for ; Thu, 6 Oct 2011 08:59:25 +0000 (UTC) Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 892BFA18CD4 for ; Thu, 6 Oct 2011 08:59:25 +0000 (UTC) Received: by bke5 with SMTP id 5so4144185bke.11 for ; Thu, 06 Oct 2011 01:59:25 -0700 (PDT) Received: by 10.223.58.138 with SMTP id g10mr2274284fah.20.1317891565103; Thu, 06 Oct 2011 01:59:25 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.23.170 with SMTP id n10cs121439laf; Thu, 6 Oct 2011 01:59:18 -0700 (PDT) Received: by 10.216.189.82 with SMTP id b60mr845526wen.23.1317891557349; Thu, 06 Oct 2011 01:59:17 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id et19si3428671wbb.114.2011.10.06.01.59.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Oct 2011 01:59:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1RBjnQ-0002Aw-FW for ; Thu, 06 Oct 2011 08:59:16 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 6E020E0419 for ; Thu, 6 Oct 2011 08:59:16 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: linaro-image-tools X-Launchpad-Branch: ~linaro-image-tools/linaro-image-tools/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 442 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-image-tools/linaro-image-tools/trunk] Rev 442: Disable temp Omap fix for hwpacks V2, where it's not longer needed. Message-Id: <20111006085916.24994.13321.launchpad@ackee.canonical.com> Date: Thu, 06 Oct 2011 08:59:16 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14085"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 9c0dbd1fd44d68af6e2f75582491a07e1875919d Merge authors: Mattias Backman (mabac) Related merge proposals: https://code.launchpad.net/~mabac/linaro-image-tools/bug-867416/+merge/78230 proposed by: Mattias Backman (mabac) review: Approve - James Tunnicliffe (dooferlad) ------------------------------------------------------------ revno: 442 [merge] committer: Mattias Backman branch nick: linaro-image-tools timestamp: Thu 2011-10-06 10:56:40 +0200 message: Disable temp Omap fix for hwpacks V2, where it's not longer needed. 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 === modified file 'linaro_image_tools/media_create/boards.py' --- linaro_image_tools/media_create/boards.py 2011-09-22 20:11:46 +0000 +++ linaro_image_tools/media_create/boards.py 2011-10-04 15:21:57 +0000 @@ -834,6 +834,8 @@ If the kernel found in the chroot dir is << 2.6.36 we use tyyS2, else we use the default value (_serial_tty). """ + # XXX: delete this method when hwpacks V1 can die + assert cls.hwpack_format == HardwarepackHandler.FORMAT_1 # XXX: This is also part of our temporary hack to fix bug 697824. cls.serial_tty = classproperty(lambda cls: cls._serial_tty) vmlinuz = _get_file_matching( @@ -852,7 +854,8 @@ # XXX: This is also part of our temporary hack to fix bug 697824; we # need to call set_appropriate_serial_tty() before doing anything that # may use cls.serial_tty. - cls.set_appropriate_serial_tty(chroot_dir) + if cls.hwpack_format == HardwarepackHandler.FORMAT_1: + cls.set_appropriate_serial_tty(chroot_dir) super(OmapConfig, cls).make_boot_files( uboot_parts_dir, is_live, is_lowmem, consoles, chroot_dir, rootfs_uuid, boot_dir, boot_device_or_file) @@ -861,6 +864,8 @@ def _make_boot_files(cls, boot_env, chroot_dir, boot_dir, boot_device_or_file, k_img_data, i_img_data, d_img_data): + # XXX: delete this method when hwpacks V1 can die + assert cls.hwpack_format == HardwarepackHandler.FORMAT_1 install_omap_boot_loader(chroot_dir, boot_dir, cls) make_uImage(cls.load_addr, k_img_data, boot_dir) make_uInitrd(i_img_data, boot_dir) @@ -926,6 +931,8 @@ def _make_boot_files(cls, boot_env, chroot_dir, boot_dir, boot_device_or_file, k_img_data, i_img_data, d_img_data): + # XXX: delete this method when hwpacks V1 can die + assert cls.hwpack_format == HardwarepackHandler.FORMAT_1 make_uImage(cls.load_addr, k_img_data, boot_dir) make_uInitrd(i_img_data, boot_dir) make_dtb(d_img_data, boot_dir) @@ -962,6 +969,8 @@ def _make_boot_files(cls, boot_env, chroot_dir, boot_dir, boot_device_or_file, k_img_data, i_img_data, d_img_data): + # XXX: delete this method when hwpacks V1 can die + assert cls.hwpack_format == HardwarepackHandler.FORMAT_1 make_uImage(cls.load_addr, k_img_data, boot_dir) make_uInitrd(i_img_data, boot_dir) boot_script_path = os.path.join(boot_dir, cls.boot_script) @@ -979,6 +988,8 @@ def _make_boot_files(cls, boot_env, chroot_dir, boot_dir, boot_device_or_file, k_img_data, i_img_data, d_img_data): + # XXX: delete this method when hwpacks V1 can die + assert cls.hwpack_format == HardwarepackHandler.FORMAT_1 make_uImage(cls.load_addr, k_img_data, boot_dir) boot_script_path = os.path.join(boot_dir, cls.boot_script) make_boot_script(boot_env, boot_script_path) @@ -1032,6 +1043,8 @@ def _make_boot_files(cls, boot_env, chroot_dir, boot_dir, boot_device_or_file, k_img_data, i_img_data, d_img_data): + # XXX: delete this method when hwpacks V1 can die + assert cls.hwpack_format == HardwarepackHandler.FORMAT_1 make_uImage(cls.load_addr, k_img_data, boot_dir) boot_script_path = os.path.join(boot_dir, cls.boot_script) make_boot_script(boot_env, boot_script_path) @@ -1185,6 +1198,8 @@ def _make_boot_files(cls, boot_env, chroot_dir, boot_dir, boot_device_or_file, k_img_data, i_img_data, d_img_data): + # XXX: delete this method when hwpacks V1 can die + assert cls.hwpack_format == HardwarepackHandler.FORMAT_1 with cls.hardwarepack_handler: uboot_file = cls.get_file('u_boot', default=os.path.join( chroot_dir, 'usr', 'lib', 'u-boot', cls.uboot_flavor, @@ -1299,6 +1314,8 @@ def _make_boot_files(cls, boot_env, chroot_dir, boot_dir, boot_device_or_file, k_img_data, i_img_data, d_img_data): + # XXX: delete this method when hwpacks V1 can die + assert cls.hwpack_format == HardwarepackHandler.FORMAT_1 cls.install_samsung_boot_loader(cls._get_samsung_spl(chroot_dir), cls._get_samsung_uboot(chroot_dir), boot_device_or_file) @@ -1316,6 +1333,8 @@ @classmethod def _get_samsung_spl(cls, chroot_dir): + # XXX: delete this method when hwpacks V1 can die + assert cls.hwpack_format == HardwarepackHandler.FORMAT_1 spl_dir = os.path.join( chroot_dir, 'usr', 'lib', 'u-boot', cls.uboot_flavor) old_spl_path = os.path.join(spl_dir, 'v310_mmc_spl.bin') @@ -1339,6 +1358,8 @@ @classmethod def _get_samsung_uboot(cls, chroot_dir): + # XXX: delete this method when hwpacks V1 can die + assert cls.hwpack_format == HardwarepackHandler.FORMAT_1 uboot_file = os.path.join( chroot_dir, 'usr', 'lib', 'u-boot', cls.uboot_flavor, 'u-boot.bin') === modified file 'linaro_image_tools/media_create/tests/test_media_create.py' --- linaro_image_tools/media_create/tests/test_media_create.py 2011-09-20 14:51:30 +0000 +++ linaro_image_tools/media_create/tests/test_media_create.py 2011-10-04 15:21:57 +0000 @@ -1066,6 +1066,24 @@ self.set_appropriate_serial_tty_called, "make_boot_files didn't call set_appropriate_serial_tty") + def test_omap_make_boot_files_v2(self): + self.set_appropriate_serial_tty_called = False + class config(boards.BeagleConfig): + hwpack_format = HardwarepackHandler.FORMAT_2 + self.mock_set_appropriate_serial_tty(config) + self.useFixture(MockSomethingFixture( + boards.BoardConfig, 'make_boot_files', + classmethod(lambda *args: None))) + # We don't need to worry about what's passed to make_boot_files() + # because we mock the method which does the real work above and here + # we're only interested in ensuring that OmapConfig.make_boot_files() + # does not call set_appropriate_serial_tty(). + config.make_boot_files( + None, None, None, None, None, None, None, None) + self.assertFalse( + self.set_appropriate_serial_tty_called, + "make_boot_files called set_appropriate_serial_tty") + def test_set_appropriate_serial_tty_old_kernel(self): tempdir = self.useFixture(CreateTempDirFixture()).tempdir boot_dir = os.path.join(tempdir, 'boot')