From patchwork Wed May 21 21:04:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ash Charles X-Patchwork-Id: 351312 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 14424140083 for ; Thu, 22 May 2014 07:13:24 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0CD614B6DB; Wed, 21 May 2014 23:13:21 +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 8SAhlzsZ6IuL; Wed, 21 May 2014 23:13:20 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E84344B6DD; Wed, 21 May 2014 23:13:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7C8FF4B6AE for ; Wed, 21 May 2014 23:13:11 +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 MmTaKwxU7jCl for ; Wed, 21 May 2014 23:13:08 +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-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by theia.denx.de (Postfix) with ESMTPS id 3CE014B6D1 for ; Wed, 21 May 2014 23:13:05 +0200 (CEST) Received: by mail-pa0-f47.google.com with SMTP id lf10so1774344pab.20 for ; Wed, 21 May 2014 14:13:04 -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=vRF5At6F8hCMKJgBKSQZVSpb4NQj12QxJvosnidTG2oD/B//gR4Lwh+rCz3CWmjmSc 4ITYDctowzj4IBpd/4egg3jtYR9bSNGynb7VIj33Bu6X/F0W/FwZbl7KwqtTSn1obkAf lHCqgm9eVc3dUU62F90IlWARAIFQSkDgdKCAcrS2e+7aKO0EqAY54qhdyGUSwlQdcwwc a3Qbaz8wksKBMhrYewr7n8cbRMiCYElWtKLT3PKGwgI0SAFM94YQrXMProROoZnONIcI PUp+EC4oJQhj9nTUHv3W961X9Zg0iWPBv+pLci4iUg0QbOdcBgPHiW6iK/DFUWaN+GqV UwvA== X-Received: by 10.68.138.227 with SMTP id qt3mr62261677pbb.6.1400706329121; Wed, 21 May 2014 14:05:29 -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 mt1sm9589587pbb.31.2014.05.21.14.05.28 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 May 2014 14:05:28 -0700 (PDT) From: Ash Charles To: u-boot@lists.denx.de Date: Wed, 21 May 2014 14:04:47 -0700 Message-Id: <1400706295-31871-2-git-send-email-ashcharles@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1400706295-31871-1-git-send-email-ashcharles@gmail.com> References: <1398813328-17365-1-git-send-email-ashcharles@gmail.com> <1400706295-31871-1-git-send-email-ashcharles@gmail.com> Cc: "Peter A. Bigot" , Ash Charles Subject: [U-Boot] [Patch v2 1/9] 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; " \