From patchwork Wed Mar 2 20:26:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Kridner X-Patchwork-Id: 85134 X-Patchwork-Delegate: s-paulraj@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9D8E81007D6 for ; Thu, 3 Mar 2011 07:26:35 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3CC7228085; Wed, 2 Mar 2011 21:26:33 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 tCaZwCKE9I0e; Wed, 2 Mar 2011 21:26:33 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EC50628087; Wed, 2 Mar 2011 21:26:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2D80928087 for ; Wed, 2 Mar 2011 21:26:29 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 eenl4ML0oVW9 for ; Wed, 2 Mar 2011 21:26:28 +0100 (CET) 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-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by theia.denx.de (Postfix) with ESMTPS id 092A128085 for ; Wed, 2 Mar 2011 21:26:26 +0100 (CET) Received: by vws6 with SMTP id 6so295369vws.3 for ; Wed, 02 Mar 2011 12:26:24 -0800 (PST) Received: by 10.52.164.168 with SMTP id yr8mr427996vdb.16.1299097584769; Wed, 02 Mar 2011 12:26:24 -0800 (PST) Received: from localhost.localdomain (ec2-75-101-156-174.compute-1.amazonaws.com [75.101.156.174]) by mx.google.com with ESMTPS id x17sm86658vds.19.2011.03.02.12.26.23 (version=SSLv3 cipher=OTHER); Wed, 02 Mar 2011 12:26:24 -0800 (PST) From: Jason Kridner To: u-boot@lists.denx.de Date: Wed, 2 Mar 2011 14:26:22 -0600 Message-Id: <1299097582-12206-1-git-send-email-jkridner@beagleboard.org> X-Mailer: git-send-email 1.5.6.4 In-Reply-To: <1299022621-2780-1-git-send-email-jkridner@beagleboard.org> References: <1299022621-2780-1-git-send-email-jkridner@beagleboard.org> Cc: beagleboard@googlegroups.com Subject: [U-Boot] [PATCH v3] omap3_beagle: enable the use of a plain text file named uEnv.txt instead of boot.scr X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Alexander Holler Using the new env import command it is possible to use plain text files instead of script-images. Plain text files are much easier to handle. E.g. If your boot.scr contains the following: ----------------------------------- setenv dvimode 1024x768-16@60 run loaduimage run mmcboot ----------------------------------- you could create a file named uEnv.txt and use that instead of boot.scr: ----------------------------------- dvimode=1024x768-16@60 uenvcmd=run loaduimage; run mmcboot ----------------------------------- The variable uenvcmd (if existent) will be executed (using run) after uEnv.txt was loaded. If uenvcmd doesn't exist the default boot sequence will be started, therefore you could just use ----------------------------------- dvimode=1024x768-16@60 ----------------------------------- as uEnv.txt because loaduimage and mmcboot is part of the default boot sequence. For backwards compatibility the use of boot.scr is still supported. --- Changes for v2: - Eliminated else redundant clause that would be ignored if boot succeeds. Changes for v3: - Removed boot.scr per discussion with Alexander. Signed-off-by: Jason Kridner --- include/configs/omap3_beagle.h | 28 ++++++++++++++++------------ 1 files changed, 16 insertions(+), 12 deletions(-) diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 8b580ef..c85537c 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -213,9 +213,9 @@ "omapdss.def_disp=${defaultdisplay} " \ "root=${nandroot} " \ "rootfstype=${nandrootfstype}\0" \ - "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ - "bootscript=echo Running bootscript from mmc ...; " \ - "source ${loadaddr}\0" \ + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ + "importbootenv=echo Importing environment from mmc ...; " \ + "env import -t $loadaddr $filesize\0" \ "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ @@ -227,15 +227,19 @@ #define CONFIG_BOOTCOMMAND \ "if mmc rescan ${mmcdev}; then " \ - "if run loadbootscript; then " \ - "run bootscript; " \ - "else " \ - "if run loaduimage; then " \ - "run mmcboot; " \ - "else run nandboot; " \ - "fi; " \ - "fi; " \ - "else run nandboot; fi" + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadbootenv; then " \ + "run importbootenv;" \ + "fi;" \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "if run loaduimage; then " \ + "run mmcboot;" \ + "fi;" \ + "fi;" \ + "run nandboot;" \ #define CONFIG_AUTO_COMPLETE 1 /*