From patchwork Tue Mar 26 09:10:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fathi Boudra X-Patchwork-Id: 15645 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 A6B7423E10 for ; Tue, 26 Mar 2013 09:10:21 +0000 (UTC) Received: from mail-vb0-f45.google.com (mail-vb0-f45.google.com [209.85.212.45]) by fiordland.canonical.com (Postfix) with ESMTP id 38C27A19881 for ; Tue, 26 Mar 2013 09:10:21 +0000 (UTC) Received: by mail-vb0-f45.google.com with SMTP id q16so2045022vbe.18 for ; Tue, 26 Mar 2013 02:10:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:content-type:mime-version:x-launchpad-project :x-launchpad-branch:x-launchpad-message-rationale :x-launchpad-branch-revision-number:x-launchpad-notification-type:to :from:subject:message-id:date:reply-to:sender:errors-to:precedence :x-generated-by:x-launchpad-hash:x-gm-message-state; bh=YOqXfxuGaHfaUKpZc4OB0tWc+y2oCTkiAx8KlBBJHCo=; b=PJW/AxXWrlP/+ohV8RrB8vIjkBSoEb7sepMqxOIFk4Gn3FyDMCwWKfKkdzXeMOYEvl o+kEo7hAs7eD0I6M65pXPcAwnJS8rJYySovGWYwnNcxEMoXLa/UGSw8Dhs1Wu4j1wSPz 9hJ6jigSWFuy9g636r1zjCDy3p3R4wpBVYyEyis3Kzx0uF9lUfOuHPVw7EuFRMG0BzW7 v5jAyB3XF6z/1C+zU0Kk5aqJOHJGNqbccF50daU8PX7uJOw0d3hquMzn27jT80dXZ5uJ lveJvmY/18gR5buUErOPNHvDQI4B9MAjDdjszxOlNfWNFmZl/tH3R+RtvB6apA6KOAvN EVyw== X-Received: by 10.59.3.9 with SMTP id bs9mr18975375ved.38.1364289020756; Tue, 26 Mar 2013 02:10:20 -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.59.4.204 with SMTP id cg12csp61994ved; Tue, 26 Mar 2013 02:10:20 -0700 (PDT) X-Received: by 10.180.11.148 with SMTP id q20mr1694381wib.18.1364289019259; Tue, 26 Mar 2013 02:10:19 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id ft9si489805wib.69.2013.03.26.02.10.17 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 26 Mar 2013 02:10:19 -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 1UKPtZ-0005Es-EN for ; Tue, 26 Mar 2013 09:10:17 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 5BB8EE0581 for ; Tue, 26 Mar 2013 09:10:17 +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: 613 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-image-tools/linaro-image-tools/trunk] Rev 613: Fixed regression when using actual dtb file name, not general one. Message-Id: <20130326091017.18990.77076.launchpad@ackee.canonical.com> Date: Tue, 26 Mar 2013 09:10:17 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16540"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 340832253e084fb3c93ead48f8e3b6528276b8ac X-Gm-Message-State: ALoCoQkqw+qJMLo3Zj/wbLeQAMVrM7ZrAtLkVWhVqOIlKtsSV0Rn5QITMge+OfUJV5n7GEWgdf4q Merge authors: Milo Casagrande (milo) Related merge proposals: https://code.launchpad.net/~milo/linaro-image-tools/fix-for-dtb/+merge/155433 proposed by: Milo Casagrande (milo) review: Approve - Fathi Boudra (fboudra) ------------------------------------------------------------ revno: 613 [merge] committer: Fathi Boudra branch nick: linaro-image-tools timestamp: Tue 2013-03-26 11:08:58 +0200 message: Fixed regression when using actual dtb file name, not general one. modified: linaro_image_tools/media_create/android_boards.py 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/android_boards.py' --- linaro_image_tools/media_create/android_boards.py 2013-03-25 12:51:45 +0000 +++ linaro_image_tools/media_create/android_boards.py 2013-03-26 08:59:38 +0000 @@ -514,6 +514,35 @@ self._extra_serial_options = 'ttySAC2,115200n8' self._extra_boot_args_options = 'rootdelay=3' + def _get_bootcmd(self, i_img_data, d_img_data): + """Get the bootcmd for this board. + + In general subclasses should not have to override this. + """ + replacements = dict( + fatload_command=self.fatload_command, uimage_path=self.uimage_path, + mmc_option=self.mmc_option, kernel_addr=self.kernel_addr, + initrd_addr=self.initrd_addr, dtb_addr=self.dtb_addr) + boot_script = ( + ("%(fatload_command)s mmc %(mmc_option)s %(kernel_addr)s " + + "%(uimage_path)suImage; ")) % replacements + if i_img_data is not None: + boot_script += ( + ("%(fatload_command)s mmc %(mmc_option)s %(initrd_addr)s " + + "%(uimage_path)suInitrd; ")) % replacements + if d_img_data is not None: + assert self.dtb_addr is not None, ( + "Need a dtb_addr when passing d_img_data") + boot_script += (("%(fatload_command)s mmc %(mmc_option)s " + "%(dtb_addr)s ")) % replacements + boot_script += "%s; " % d_img_data + boot_script += (("bootm %(kernel_addr)s")) % replacements + if i_img_data is not None: + boot_script += ((" %(initrd_addr)s")) % replacements + if d_img_data is not None: + boot_script += ((" %(dtb_addr)s")) % replacements + return boot_script + def populate_raw_partition(self, boot_device_or_file, chroot_dir): boot_bin_0 = {'name': 'arndale-bl1.bin', 'seek': 1} boot_bin_1 = {'name': 'u-boot-mmc-spl.bin', 'seek': 17} === modified file 'linaro_image_tools/media_create/boards.py' --- linaro_image_tools/media_create/boards.py 2013-03-25 12:52:08 +0000 +++ linaro_image_tools/media_create/boards.py 2013-03-26 09:08:58 +0000 @@ -534,8 +534,7 @@ assert self.dtb_addr is not None, ( "Need a dtb_addr when passing d_img_data") boot_script += (("%(fatload_command)s mmc %(mmc_option)s " - "%(dtb_addr)s ")) % replacements - boot_script += "%s; " % d_img_data + "%(dtb_addr)s board.dtb; ")) % replacements boot_script += (("bootm %(kernel_addr)s")) % replacements if i_img_data is not None: boot_script += ((" %(initrd_addr)s")) % replacements === modified file 'linaro_image_tools/media_create/tests/test_media_create.py' --- linaro_image_tools/media_create/tests/test_media_create.py 2013-03-25 12:52:28 +0000 +++ linaro_image_tools/media_create/tests/test_media_create.py 2013-03-26 08:59:38 +0000 @@ -2002,7 +2002,7 @@ 'root=UUID=deadbeef rootwait ro', 'bootcmd': 'fatload mmc 0:2 0x90000000 uImage; ' 'fatload mmc 0:2 0x92000000 uInitrd; ' - 'fatload mmc 0:2 0x91ff0000 mx51.dtb; ' + 'fatload mmc 0:2 0x91ff0000 board.dtb; ' 'bootm 0x90000000 0x92000000 0x91ff0000', 'fdt_high': '0xffffffff', 'initrd_high': '0xffffffff'} @@ -2126,7 +2126,7 @@ 'mem=456M@0x80000000 mem=512M@0xA0000000', 'bootcmd': 'fatload mmc 0:1 0x80200000 uImage; ' 'fatload mmc 0:1 0x81600000 uInitrd; ' - 'fatload mmc 0:1 0x815f0000 panda.dtb; ' + 'fatload mmc 0:1 0x815f0000 board.dtb; ' 'bootm 0x80200000 0x81600000 0x815f0000', 'fdt_high': '0xffffffff', 'initrd_high': '0xffffffff'} @@ -2149,7 +2149,7 @@ 'omapfb.mode=dvi:1280x720MR-16@60 mpurate=${mpurate}', 'bootcmd': 'fatload mmc 0:1 0x80000000 uImage; ' 'fatload mmc 0:1 0x81600000 uInitrd; ' - 'fatload mmc 0:1 0x815f0000 beagle.dtb; ' + 'fatload mmc 0:1 0x815f0000 board.dtb; ' 'bootm 0x80000000 0x81600000 0x815f0000', 'fdt_high': '0xffffffff', 'initrd_high': '0xffffffff'} @@ -2172,7 +2172,7 @@ 'omapfb.mode=dvi:1280x720MR-16@60 mpurate=${mpurate}', 'bootcmd': 'fatload mmc 0:1 0x80000000 uImage; ' 'fatload mmc 0:1 0x81600000 uInitrd; ' - 'fatload mmc 0:1 0x815f0000 igep.dtb; ' + 'fatload mmc 0:1 0x815f0000 board.dtb; ' 'bootm 0x80000000 0x81600000 0x815f0000', 'fdt_high': '0xffffffff', 'initrd_high': '0xffffffff'} @@ -2196,7 +2196,7 @@ 'omapfb.mode=dvi:${dvimode}', 'bootcmd': 'fatload mmc 0:1 0x80000000 uImage; ' 'fatload mmc 0:1 0x81600000 uInitrd; ' - 'fatload mmc 0:1 0x815f0000 overo.dtb; ' + 'fatload mmc 0:1 0x815f0000 board.dtb; ' 'bootm 0x80000000 0x81600000 0x815f0000', 'fdt_high': '0xffffffff', 'initrd_high': '0xffffffff'}