From patchwork Fri Nov 21 13:16:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 41310 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0BC13244B0 for ; Fri, 21 Nov 2014 13:19:46 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id e53sf3319536eek.7 for ; Fri, 21 Nov 2014 05:19:45 -0800 (PST) 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:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=cEC3nReHOAbvYWXGBwXQRr0p62LFru/xYrI2boMOaBk=; b=m1Ev2neXP76sHwhhNTtyOq+0PSpgVJiC2BSlYeTBWmUo3S01xWdkEtuOL1p+7lnD77 qIdxYbRqKv7uYjdjCt5j+Rsv/uMYTEVAaxu5upKdJJ91cTdE03MmyEwig/N7fhK43RmZ VGonA3mfgKsxXSiVBZ929E6ddKe4lo5261rhqgznFsBG/jYhoAN2hCrGIjF4SJeOKc4H c81pyFy3xlMtyjl0B0xXw1rb4IxceAu7znWst11hDx2eZPQhcxXbwxC+xbfpwxSkNO+U M33LyrT4N2SVPcvhJvaR+4Lq+jpNHFQUQKj+sYLPqleD52Ir/7y2Qs/XFGzEkvjCrgtK MeBw== X-Gm-Message-State: ALoCoQm+ob0wJynn7dboGXo++/lVU23s0GfTjlHkItSANwBb1Ya0xFM+lmTtHQZ6vB9j3eL+0Lmo X-Received: by 10.112.204.71 with SMTP id kw7mr1545122lbc.13.1416575984769; Fri, 21 Nov 2014 05:19:44 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.227 with SMTP id n3ls200005lan.71.gmail; Fri, 21 Nov 2014 05:19:44 -0800 (PST) X-Received: by 10.152.1.130 with SMTP id 2mr3395317lam.89.1416575984518; Fri, 21 Nov 2014 05:19:44 -0800 (PST) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id da5si5317358lac.76.2014.11.21.05.19.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Nov 2014 05:19:44 -0800 (PST) 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 u10so1134394lbd.34 for ; Fri, 21 Nov 2014 05:19:44 -0800 (PST) X-Received: by 10.152.6.228 with SMTP id e4mr4439905laa.71.1416575984353; Fri, 21 Nov 2014 05:19:44 -0800 (PST) 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.184.201 with SMTP id ew9csp87308lbc; Fri, 21 Nov 2014 05:19:43 -0800 (PST) X-Received: by 10.236.14.100 with SMTP id c64mr1585841yhc.139.1416575982974; Fri, 21 Nov 2014 05:19:42 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id o9si6757103qcg.16.2014.11.21.05.19.31 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 21 Nov 2014 05:19:42 -0800 (PST) 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 1Xro5N-0007Hd-8Z; Fri, 21 Nov 2014 13:17:17 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xro5L-0007GT-Qw for xen-devel@lists.xen.org; Fri, 21 Nov 2014 13:17:15 +0000 Received: from [193.109.254.147] by server-14.bemta-14.messagelabs.com id 52/0D-02698-B5B3F645; Fri, 21 Nov 2014 13:17:15 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1416575829!13439228!3 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.12.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 4854 invoked from network); 21 Nov 2014 13:17:14 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 21 Nov 2014 13:17:14 -0000 X-IronPort-AV: E=Sophos;i="5.07,431,1413244800"; d="scan'208";a="195229167" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Fri, 21 Nov 2014 08:17:13 -0500 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 1Xro5I-0003Al-5H; Fri, 21 Nov 2014 13:17:13 +0000 Received: by zakaz.uk.xensource.com (sSMTP sendmail emulation); Fri, 21 Nov 2014 13:17:12 +0000 From: Ian Campbell To: Date: Fri, 21 Nov 2014 13:16:57 +0000 Message-ID: <1416575824-15555-8-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1416505070.26869.2.camel@citrix.com> References: <1416505070.26869.2.camel@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH OSSTEST v3 08/15] 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 1b4d7a7..9530aa4 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -114,6 +114,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= { }; @@ -132,6 +141,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 <