From patchwork Tue Apr 29 23:15:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ash Charles X-Patchwork-Id: 344014 X-Patchwork-Delegate: trini@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 7D75F140159 for ; Wed, 30 Apr 2014 09:16:15 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B36FA4B90D; Wed, 30 Apr 2014 01:16:13 +0200 (CEST) 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 X3iGl3po6oYy; Wed, 30 Apr 2014 01:16:13 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7E0B34B87D; Wed, 30 Apr 2014 01:16:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F11BF4B8F0 for ; Wed, 30 Apr 2014 01:16:05 +0200 (CEST) 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 GCCKhNPeOCsc for ; Wed, 30 Apr 2014 01:16:02 +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-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by theia.denx.de (Postfix) with ESMTPS id 4D3D04B8EB for ; Wed, 30 Apr 2014 01:15:58 +0200 (CEST) Received: by mail-pd0-f174.google.com with SMTP id z10so813683pdj.5 for ; Tue, 29 Apr 2014 16:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WWdivJ7fnycDvuF3WF2IigbK3j0CbRqKBdBscgWqpN0=; b=DXSWp05c5IR7LCmjquHBe2ijoJAqjHlbZ4hE0fYw7S+1OQNdiBb4Xx+vJXONufy7fN oKx3ARw/R4n3Cb0+j9HaW4xvFkwNXSV4g+klkSmgIyCBCSI7yyqnqxy2CepIg1lYIKZ/ Z3UHuUMzG9B8nB3kHz9OdK2+w+3zkW2AFBeLL6Dqlst4M/V8XvYkQLA07sts0EQP33EB 5/kmcm+2H91Sb3nDLTkmjijEbMp9znQj1FRvV4+14E2ZZdiSuRCah3jh/reFHCa3uq+U yiT7mNQXIiQsmyz4GAyuPMwrWBsvWRXQ0DuKg8UxdELPlA8Fs5H8dUOdX9kgbG3tynD+ ruhw== X-Received: by 10.66.171.76 with SMTP id as12mr1636950pac.52.1398813356582; Tue, 29 Apr 2014 16:15:56 -0700 (PDT) Received: from gumstux.bchsia.telus.net (s206-116-3-18.bc.hsia.telus.net. [206.116.3.18]) by mx.google.com with ESMTPSA id xr9sm120609073pab.5.2014.04.29.16.15.55 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Apr 2014 16:15:55 -0700 (PDT) From: Ash Charles To: u-boot@lists.denx.de Date: Tue, 29 Apr 2014 16:15:21 -0700 Message-Id: <1398813328-17365-2-git-send-email-ashcharles@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1398813328-17365-1-git-send-email-ashcharles@gmail.com> References: <1398813328-17365-1-git-send-email-ashcharles@gmail.com> Cc: trini@ti.com, Ash Charles , "Peter A. Bigot" , steve@sakoman.com Subject: [U-Boot] [PATCH 1/8] omap: overo: allow the use of a plain text env file instead boot scripts X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 Adapted from d70f5480 described below. commit d70f54808dfa83b574e1239c3eccbcf3317343e1 Author: Javier Martinez Canillas Date: Mon Jan 7 03:51:20 2013 +0000 omap4: allow the use of a plain text env file instead boot scripts For production systems it is better to use script images since they are protected by checksums and carry valuable information like name and timestamp. Also, you can't validate the content passed to env import. But for development, it is easier to use the env import command and plain text files instead of script-images. Since both OMAP4 supported boards (Panda and TI SDP4430) are used primarily for development, this patch allows U-Boot to load env var from a text file in case that an boot.scr script-image is not present. 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. Signed-off-by: Javier Martinez Canillas Acked-by: Nishanth Menon Signed-off-by: Peter A. Bigot Tested-by: Ash Charles --- include/configs/omap3_overo.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h index 007e27f..f26d069 100644 --- a/include/configs/omap3_overo.h +++ b/include/configs/omap3_overo.h @@ -164,6 +164,9 @@ "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${mmcdev} ...; " \ + "env import -t ${loadaddr} ${filesize}\0" \ "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ @@ -178,6 +181,13 @@ "if run loadbootscript; then " \ "run bootscript; " \ "else " \ + "if run loadbootenv; then " \ + "run importbootenv; " \ + "if test -n ${uenvcmd}; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;" \ + "fi;" \ "if run loaduimage; then " \ "run mmcboot; " \ "else run nandboot; " \