From patchwork Wed Oct 29 10:41:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 39748 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8DE2D24029 for ; Wed, 29 Oct 2014 10:42:50 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id l4sf1506534lbv.5 for ; Wed, 29 Oct 2014 03:42:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=XfyPDoAJE/r666iP+u0WSaR55Hi6xOEkssZbRLxPPcM=; b=WFK5V9nxaaOFTaV+dvI36SveOBmL6CinLPEbA40JQIw1PUmrZWX4O6+ZGL3CUS/cQn DhZtSMQzSyeJsZmzXXU25J6VNSnoGYf5prOGf1QJjxMVdWan4rUmwCYYftqND+ssxzD5 IgncNqIiCKTYG2cR/JP6OFfBPmK2/nQByjQf1OCQi2tUePRyM0Rm4hv1H4Mi0VCeWt2K NzAAFSxFfCpxex0BUc+gLIu6ZgJiqJdH90ZuuZETNuzVyQaPlnnUKML+LE062MLx+qmK giXtz7FdTBp+d/DGD9IyNSgybsTPhsDjYlMWJOBGpz/6wETkMEeL4rKCPpjxdNK/+vae f6WQ== X-Gm-Message-State: ALoCoQktN4ZUxTs1gIQgEJWIbQHXUf6FM7apBxIcdCXWE19vr8ZCFWKVyJh/3jRYH7zwXMFlP+9J X-Received: by 10.152.42.171 with SMTP id p11mr1604428lal.4.1414579369377; Wed, 29 Oct 2014 03:42:49 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.225 with SMTP id r1ls172544lal.84.gmail; Wed, 29 Oct 2014 03:42:49 -0700 (PDT) X-Received: by 10.152.36.33 with SMTP id n1mr2154648laj.95.1414579369209; Wed, 29 Oct 2014 03:42:49 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id k10si6548931lbp.126.2014.10.29.03.42.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Oct 2014 03:42:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id b6so2246445lbj.34 for ; Wed, 29 Oct 2014 03:42:49 -0700 (PDT) X-Received: by 10.112.140.5 with SMTP id rc5mr10371774lbb.32.1414579369106; Wed, 29 Oct 2014 03:42:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp633464lbz; Wed, 29 Oct 2014 03:42:48 -0700 (PDT) X-Received: by 10.220.82.199 with SMTP id c7mr2885838vcl.61.1414579367746; Wed, 29 Oct 2014 03:42:47 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id dc6si2272459vdc.36.2014.10.29.03.42.47 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 29 Oct 2014 03:42:47 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XjQhY-0002ax-Rt; Wed, 29 Oct 2014 10:42:04 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XjQhV-0002TK-CE for xen-devel@lists.xen.org; Wed, 29 Oct 2014 10:42:01 +0000 Received: from [85.158.139.211] by server-15.bemta-5.messagelabs.com id 8C/F6-02707-874C0545; Wed, 29 Oct 2014 10:42:00 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-5.tower-206.messagelabs.com!1414579318!12389610!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.12.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 485 invoked from network); 29 Oct 2014 10:41:59 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-5.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 29 Oct 2014 10:41:59 -0000 X-IronPort-AV: E=Sophos;i="5.04,809,1406592000"; d="scan'208";a="186004750" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Wed, 29 Oct 2014 06:41:58 -0400 Received: from kazak.uk.xensource.com ([10.80.2.80] helo=zakaz.uk.xensource.com) by ukmail1.uk.xensource.com with smtp (Exim 4.69) (envelope-from ) id 1XjQhQ-00014t-Md; Wed, 29 Oct 2014 10:41:57 +0000 Received: by zakaz.uk.xensource.com (sSMTP sendmail emulation); Wed, 29 Oct 2014 10:41:56 +0000 From: Ian Campbell To: Date: Wed, 29 Oct 2014 10:41:36 +0000 Message-ID: <1414579302-6692-14-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1414579268.29975.13.camel@citrix.com> References: <1414579268.29975.13.camel@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH OSSTEST v2 14/20] Osstest/Debian: Support for loading an FDT from u-boot script X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: The currently supported platform provides an FDT preloaded at 0x1000. Replace this with ${fdt_addr} (which the current platform exposes) and for platforms which do not provide an fdt arrange to load the relevant file as named in the ${fdtfile} (which is conventionally provided by u-boot for platforms which need this). Drop some random memory clearing rune, I've no idea what the intended purpose was, 0x800000 doesn't correspond to any $foo_addr_r on the midway systems for example. Also get rid of the scsi scan which must necessarily have already happened (since the boot.scr itselfs lives on a scsi drive). Lastly, add some echos to show progress through the script, as an aid to debugging. Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- v2: Refactor uboot dtb loading scriptlet, which previously appeared twice --- Osstest/Debian.pm | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 6bb14f7..e390ec9 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -112,6 +112,15 @@ sub bl_getmenu_open ($$$) { return $f; } +sub uboot_scr_load_dtb () { + return <<'END'; +if test -z "\${fdt_addr}" && test -n "\${fdtfile}" ; then + echo Loading dtbs/\${fdtfile} + ext2load scsi 0 \${fdt_addr_r} dtbs/\${fdtfile} + setenv fdt_addr \${fdt_addr_r} +fi +END +} sub setupboot_uboot ($$$) { my ($ho,$want_kernver,$xenhopt,$xenkopt) = @_; my $bl= { }; @@ -130,6 +139,8 @@ sub setupboot_uboot ($$$) { my $early_commands = get_host_property($ho, 'UBootScriptEarlyCommands', ''); + my $load_dtb = uboot_scr_load_dtb(); + target_cmd_root($ho, </boot/boot <\$r/boot/boot <