From patchwork Fri Aug 16 06:10:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fathi Boudra X-Patchwork-Id: 19209 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 957082486D for ; Fri, 16 Aug 2013 06:10:43 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id h10sf1868035vbh.1 for ; Thu, 15 Aug 2013 23:10:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:delivered-to:mime-version:to:from:subject :message-id:date:reply-to:sender:errors-to:precedence :x-original-sender:x-original-authentication-results:mailing-list :list-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=1ufOvUyu1Mr8aMVkWsaioQllyRH3vTcHGStbX7JxEDc=; b=X8WSXfr/CC8xDoN1TjsiqcauuPaQj0ZeQYcl/9Y36bNDg0k3WKHFpbfqqAYsAqO9zU M3mACdlMwfUfsL8NPvsoOS8Sc7M5T/cenk0mWRyGXPL8/Rq4SJ4Hug0gdYHUXCea+val nSCXbC8DR3zvCKk/imzwVi7DTDMFb4KHqHyuO8bNHgaYP5KTuXDKDoDCE8N147UU7SCS iRWoXjZSRvfp4QXEYgEVoiZ/0yOt5QSfLLl6kFaRaWXjmCZG86vr/uOe7fcowXT/9RCY uj1BMMdWTud1+JfSzETeaovl/jKpFoClxGCf45N6xrXjR4N56kTox8mo8mJhFf436t+7 1lRA== X-Received: by 10.236.0.229 with SMTP id 65mr613829yhb.15.1376633443057; Thu, 15 Aug 2013 23:10:43 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.1.168 with SMTP id 8ls586053qen.8.gmail; Thu, 15 Aug 2013 23:10:42 -0700 (PDT) X-Received: by 10.52.69.142 with SMTP id e14mr26180vdu.29.1376633442846; Thu, 15 Aug 2013 23:10:42 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id vf5si872551vdc.122.2013.08.15.23.10.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 23:10:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id cy12so1178545veb.18 for ; Thu, 15 Aug 2013 23:10:42 -0700 (PDT) X-Gm-Message-State: ALoCoQm1VmW+yRDAiddNUk2WFSTrTQwvot6W3bnBWk4vLJBAiMu/YgPCcM8mgM4ZcW+g08ii3Lnw X-Received: by 10.58.211.227 with SMTP id nf3mr18309378vec.20.1376633442674; Thu, 15 Aug 2013 23:10:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp52630vcz; Thu, 15 Aug 2013 23:10:42 -0700 (PDT) X-Received: by 10.14.45.70 with SMTP id o46mr28121224eeb.19.1376633441744; Thu, 15 Aug 2013 23:10:41 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id z8si2178837eee.353.2013.08.15.23.10.41 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 23:10:41 -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; Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1VADFB-0006Sp-1I for ; Fri, 16 Aug 2013 06:10:41 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id EBF42E00B4 for ; Fri, 16 Aug 2013 06:10:40 +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: 634 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-image-tools/linaro-image-tools/trunk] Rev 634: Fix _get_bootcmd() to cover all bootm use cases: Message-Id: <20130816061040.23876.55091.launchpad@ackee.canonical.com> Date: Fri, 16 Aug 2013 06:10:40 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16723"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: ecfe556bb6cc3c6f570cc05b69b9c1b3dfe81ec9 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Merge authors: Fathi Boudra (fboudra) Related merge proposals: https://code.launchpad.net/~fboudra/linaro-image-tools/bootm-fixes/+merge/178705 proposed by: Fathi Boudra (fboudra) review: Approve - Milo Casagrande (milo) ------------------------------------------------------------ revno: 634 [merge] committer: Fathi Boudra branch nick: linaro-image-tools timestamp: Fri 2013-08-16 09:09:14 +0300 message: Fix _get_bootcmd() to cover all bootm use cases: * kernel only * kernel + initrd * kernel + dtb * kernel + initrd + dtb 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 2013-08-06 07:25:33 +0000 +++ linaro_image_tools/media_create/boards.py 2013-08-06 10:09:32 +0000 @@ -534,21 +534,27 @@ boot_script = ( ("%(fatload_command)s %(load_interface)s %(mmc_option)s " "%(kernel_addr)s %(uimage_path)suImage; ")) % replacements - if i_img_data is not None: + boot_script_bootm = (("bootm %(kernel_addr)s")) % replacements + if i_img_data is not None and d_img_data is not None: + boot_script += ( + ("%(fatload_command)s %(load_interface)s %(mmc_option)s " + "%(initrd_addr)s %(uimage_path)suInitrd; " + "%(fatload_command)s %(load_interface)s %(mmc_option)s " + "%(dtb_addr)s board.dtb; ")) % replacements + boot_script_bootm += ( + (" %(initrd_addr)s %(dtb_addr)s")) % replacements + elif i_img_data is None and d_img_data is not None: + boot_script += ( + ("%(fatload_command)s %(load_interface)s %(mmc_option)s " + "%(dtb_addr)s board.dtb; ")) % replacements + boot_script_bootm += ((" - %(dtb_addr)s")) % replacements + elif i_img_data is not None and d_img_data is None: boot_script += ( ("%(fatload_command)s %(load_interface)s %(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 %(load_interface)s %(mmc_option)s " - "%(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 - if self.dtb_addr is not None: - boot_script += ((" %(dtb_addr)s")) % replacements + boot_script_bootm += ((" %(initrd_addr)s")) % replacements + + boot_script += boot_script_bootm return boot_script def add_boot_args(self, extra_args): === modified file 'linaro_image_tools/media_create/tests/test_media_create.py' --- linaro_image_tools/media_create/tests/test_media_create.py 2013-07-25 08:00:25 +0000 +++ linaro_image_tools/media_create/tests/test_media_create.py 2013-08-08 07:34:16 +0000 @@ -2261,11 +2261,13 @@ board_conf = get_board_config('highbank') boot_commands = board_conf._get_boot_env( is_live=False, is_lowmem=False, consoles=[], - rootfs_id="UUID=deadbeef", i_img_data="initrd", d_img_data=None) + rootfs_id="UUID=deadbeef", i_img_data="initrd", + d_img_data="board.dtb") expected = { 'bootargs': 'root=UUID=deadbeef rootwait ro', 'bootcmd': 'ext2load scsi 0:1 0x00800000 uImage; ' 'ext2load scsi 0:1 0x01000000 uInitrd; ' + 'ext2load scsi 0:1 0x00001000 board.dtb; ' 'bootm 0x00800000 0x01000000 0x00001000', 'fdt_high': '0xffffffff', 'initrd_high': '0xffffffff'}