public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/8] AM3517 EVM: Add uEnv.txt to the default bootcmd
Date: Tue, 6 Dec 2011 08:49:38 -0700	[thread overview]
Message-ID: <1323186582-2811-5-git-send-email-trini@ti.com> (raw)
In-Reply-To: <1323186582-2811-1-git-send-email-trini@ti.com>

This adds uEnv.txt (and optargs/uenvcmd) support to the MMC boot section

Signed-off-by: Tom Rini <trini@ti.com>
---
 include/configs/am3517_evm.h |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index d44eeec..39f1a82 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -191,10 +191,20 @@
 	"loadaddr=0x82000000\0" \
 	"console=ttyO2,115200n8\0" \
 	"mmcdev=0\0" \
-	"mmcargs=setenv bootargs console=${console} " \
+	"bootenv=uEnv.txt\0" \
+	"loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}\0" \
+	"importbootenv=echo Importing environment from mmc ...; " \
+		"env import -t $loadaddr $filesize\0" \
+	"optargs=\0" \
+	"bootargs_defaults=setenv bootargs " \
+		"console=${console} " \
+		"${optargs}\0" \
+	"mmcargs=run bootargs_defaults; " \
+		"setenv bootargs ${bootargs} " \
 		"root=/dev/mmcblk0p2 rw " \
 		"rootfstype=ext3 rootwait\0" \
-	"nandargs=setenv bootargs console=${console} " \
+	"nandargs=run bootargs_defaults; " \
+		"setenv bootargs ${bootargs} " \
 		"root=/dev/mtdblock4 rw " \
 		"rootfstype=jffs2\0" \
 	"loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
@@ -214,6 +224,14 @@
 		"if run loadbootscript; then " \
 			"run bootscript; " \
 		"else " \
+			"if run loadbootenv; then " \
+				"echo Loaded environment from ${bootenv};" \
+				"run importbootenv;" \
+			"fi;" \
+			"if test -n $uenvcmd; then " \
+				"echo Running uenvcmd ...;" \
+				"run uenvcmd;" \
+			"fi;" \
 			"if run loaduimage; then " \
 				"run mmcboot; " \
 			"else run nandboot; " \
-- 
1.7.0.4

  parent reply	other threads:[~2011-12-06 15:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06 15:49 [U-Boot] [PATCH 0/8] AM3517 EVM / Crane enhancements Tom Rini
2011-12-06 15:49 ` [U-Boot] [PATCH 1/8] OMAP3: Correct SYSBOOT_MASK Tom Rini
2011-12-06 15:49 ` [U-Boot] [PATCH 2/8] OMAP3: Drop extra delay in gpmc_init Tom Rini
2011-12-06 15:49 ` [U-Boot] [PATCH 3/8] AM3517: Add NOR Flash boot mode Support Tom Rini
2011-12-07 14:25   ` Igor Grinberg
2011-12-08  1:07     ` Tom Rini
2011-12-08 14:12       ` Igor Grinberg
2011-12-08 14:38         ` Tom Rini
2011-12-08 15:11           ` Igor Grinberg
2011-12-08 11:11     ` Hiremath, Vaibhav
2011-12-08 13:48       ` Igor Grinberg
2011-12-08 17:40         ` Hiremath, Vaibhav
2011-12-06 15:49 ` Tom Rini [this message]
2011-12-06 15:49 ` [U-Boot] [PATCH 5/8] AM3517 EVM: Add am3517_evm_norflash and _norflash_boot targets Tom Rini
2011-12-06 15:49 ` [U-Boot] [PATCH 6/8] AM35xx: Read and set ethaddr for EMAC Tom Rini
2011-12-07 14:48   ` Igor Grinberg
2011-12-07 14:54     ` Tom Rini
2011-12-07 17:41       ` Wolfgang Denk
2011-12-06 15:49 ` [U-Boot] [PATCH 7/8] AM3517 EVM: Enable ethernet Tom Rini
2011-12-06 15:49 ` [U-Boot] [PATCH 8/8] AM3517 Crane: " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1323186582-2811-5-git-send-email-trini@ti.com \
    --to=trini@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox