From patchwork Wed Sep 23 17:25:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Harkin X-Patchwork-Id: 54066 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id CAB3722F10 for ; Wed, 23 Sep 2015 17:27:57 +0000 (UTC) Received: by laff1 with SMTP id f1sf9561923laf.2 for ; Wed, 23 Sep 2015 10:27:56 -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:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list; bh=Q+U+zMaBvWJkPGnenS1IJdjPgUqKkdjSvoWLNm/xl8w=; b=hM7VyU+RgSBnaccVIS5XbsLIsS1n2L0BvgJPT6poodZ+AK68pZ8h4JHL8TUxUOZBjx +N4WYRA620j0EqEHD0len3wG559CITM3Ldg+XxYTGeldi0AACtCZvpjobLJD6ZBYoDej TthV/X3xSNyoJkz+f2Ck31KOe8vEoJeE30nM2rOhRK4eAaepBjK7ycg+V2BkKsUpKJkW rPB5WR/vTSva8GZOpo2L2r7uXoqj097RhBgnjpRrZMWMfTMc4W3K4hYSuf1E9cLzIEtH h2W1tAdN6N1eL3bAMFx5FIQbumWUuc/FDxiVW0TEyUc3Ois3lFK4N6w/myKaMBDwQdbe 9+Gw== X-Gm-Message-State: ALoCoQm/qlJivD9ajL8Lp0QmFa42yfzG+y49NbcNvXQOj6gASEccxwCYWx3U4bxuNVrfEBmkB6EA X-Received: by 10.112.89.228 with SMTP id br4mr5427327lbb.3.1443029276762; Wed, 23 Sep 2015 10:27:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.72 with SMTP id h8ls51349laa.36.gmail; Wed, 23 Sep 2015 10:27:56 -0700 (PDT) X-Received: by 10.112.134.73 with SMTP id pi9mr962566lbb.83.1443029276629; Wed, 23 Sep 2015 10:27:56 -0700 (PDT) Received: from mail-la0-f51.google.com (mail-la0-f51.google.com. [209.85.215.51]) by mx.google.com with ESMTPS id a5si4525836lah.50.2015.09.23.10.27.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2015 10:27:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) client-ip=209.85.215.51; Received: by lahh2 with SMTP id h2so35242986lah.0 for ; Wed, 23 Sep 2015 10:27:56 -0700 (PDT) X-Received: by 10.112.51.142 with SMTP id k14mr10158564lbo.76.1443029276499; Wed, 23 Sep 2015 10:27:56 -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.59.35 with SMTP id w3csp23700lbq; Wed, 23 Sep 2015 10:27:56 -0700 (PDT) X-Received: by 10.112.137.105 with SMTP id qh9mr12188760lbb.54.1443029275450; Wed, 23 Sep 2015 10:27:55 -0700 (PDT) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id mz10si2647455lbb.122.2015.09.23.10.27.55; Wed, 23 Sep 2015 10:27:55 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3E24F4B898; Wed, 23 Sep 2015 19:27:47 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f3puuuJSyXyb; Wed, 23 Sep 2015 19:27:47 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 682804B94B; Wed, 23 Sep 2015 19:27:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9E2114B93B for ; Wed, 23 Sep 2015 19:27:36 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sKNI-DLc7yiB for ; Wed, 23 Sep 2015 19:27:36 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by theia.denx.de (Postfix) with ESMTPS id 8C3A24B960 for ; Wed, 23 Sep 2015 19:27:23 +0200 (CEST) Received: by pacgz1 with SMTP id gz1so11882822pac.3 for ; Wed, 23 Sep 2015 10:27:22 -0700 (PDT) X-Received: by 10.69.12.162 with SMTP id er2mr39174255pbd.24.1443029242265; Wed, 23 Sep 2015 10:27:22 -0700 (PDT) Received: from localhost.localdomain ([70.35.39.2]) by smtp.gmail.com with ESMTPSA id fm5sm9061765pab.24.2015.09.23.10.27.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Sep 2015 10:27:21 -0700 (PDT) From: Ryan Harkin To: ryan.harkin@linaro.org, u-boot@lists.denx.de, Albert Aribaud , Tom Rini Date: Wed, 23 Sep 2015 10:25:42 -0700 Message-Id: <1443029143-22313-11-git-send-email-ryan.harkin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443029143-22313-1-git-send-email-ryan.harkin@linaro.org> References: <1443029143-22313-1-git-send-email-ryan.harkin@linaro.org> Cc: Steve Rae Subject: [U-Boot] [PATCH 10/11] vexpress64: juno: add alternate kernel and device tree filenames X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ryan.harkin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.51 as permitted sender) smtp.mailfrom=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 The default Juno firmware has renamed the kernel and device tree filenames to norkern and board.dtb. Rather than change the default configuration to use the new names, breaking those with the old firmware, attempt to load the existing filename first. If that fails, attempt to load the alternate filename. I've echo'd that we are loading the alternate file to counter the output from "afs load" when the first load attempt fails. For example, I see this output on my Juno board: image "Image" not found in flash Loading norkern instead of Image loaded region 0 from 08500000 to 80000000, 00AB6318 bytes image "juno" not found in flash Loading board.dtb instead of juno loaded region 0 from 0A000000 to 83000000, 00003188 bytes Signed-off-by: Ryan Harkin Reviewed-by: Linus Walleij CC: David Feng CC: Bhupesh Sharma CC: Linus Walleij --- include/configs/vexpress_aemv8a.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h index c62c3ac..192568a 100644 --- a/include/configs/vexpress_aemv8a.h +++ b/include/configs/vexpress_aemv8a.h @@ -185,11 +185,13 @@ * be copied into DRAM */ #define CONFIG_EXTRA_ENV_SETTINGS \ - "kernel_name=Image\0" \ + "kernel_name=norkern\0" \ + "kernel_alt_name=Image\0" \ "kernel_addr=0x80000000\0" \ "initrd_name=ramdisk.img\0" \ "initrd_addr=0x84000000\0" \ - "fdt_name=juno\0" \ + "fdt_name=board.dtb\0" \ + "fdt_alt_name=juno\0" \ "fdt_addr=0x83000000\0" \ "fdt_high=0xffffffffffffffff\0" \ "initrd_high=0xffffffffffffffff\0" \ @@ -205,7 +207,17 @@ /* Copy the kernel and FDT to DRAM memory and boot */ #define CONFIG_BOOTCOMMAND "afs load ${kernel_name} ${kernel_addr} ; " \ + "if test $? -eq 1; then "\ + " echo Loading ${kernel_alt_name} instead of "\ + "${kernel_name}; "\ + " afs load ${kernel_alt_name} ${kernel_addr};"\ + "fi ; "\ "afs load ${fdt_name} ${fdt_addr} ; " \ + "if test $? -eq 1; then "\ + " echo Loading ${fdt_alt_name} instead of "\ + "${fdt_name}; "\ + " afs load ${fdt_alt_name} ${fdt_addr}; "\ + "fi ; "\ "fdt addr ${fdt_addr}; fdt resize; " \ "if afs load ${initrd_name} ${initrd_addr} ; "\ "then "\