All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 14/17] Blackfin: make default ADI env more flexible
Date: Sun, 14 Jun 2009 02:28:51 -0400	[thread overview]
Message-ID: <1244960934-20887-15-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1244960934-20887-1-git-send-email-vapier@gentoo.org>

Allow boards to easily override the root= and default bootcmd, allow
people to tweak the file used in default bootcmds at runtime via one env
var, and add a stock nandboot command.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 include/configs/bfin_adi_common.h |   30 +++++++++++++++++++++++++-----
 1 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h
index a581924..b824566 100644
--- a/include/configs/bfin_adi_common.h
+++ b/include/configs/bfin_adi_common.h
@@ -103,14 +103,19 @@
 #else
 # define CONFIG_BOOTDELAY	5
 #endif
-#define CONFIG_BOOTCOMMAND	"run ramboot"
+#ifndef CONFIG_BOOTCOMMAND
+# define CONFIG_BOOTCOMMAND	"run ramboot"
+#endif
 #ifdef CONFIG_VIDEO
 # define CONFIG_BOOTARGS_VIDEO "console=tty0 "
 #else
 # define CONFIG_BOOTARGS_VIDEO ""
 #endif
+#ifndef CONFIG_BOOTARGS_ROOT
+# define CONFIG_BOOTARGS_ROOT "/dev/mtdblock0 rw"
+#endif
 #define CONFIG_BOOTARGS	\
-	"root=/dev/mtdblock0 rw " \
+	"root=" CONFIG_BOOTARGS_ROOT " " \
 	"clkin_hz=" MK_STR(CONFIG_CLKIN_HZ) " " \
 	"earlyprintk=" \
 		"serial," \
@@ -118,7 +123,17 @@
 		MK_STR(CONFIG_BAUDRATE) " " \
 	CONFIG_BOOTARGS_VIDEO \
 	"console=ttyBF0," MK_STR(CONFIG_BAUDRATE)
-
+#if defined(CONFIG_CMD_NAND)
+# define NAND_ENV_SETTINGS \
+	"nandargs=set bootargs " CONFIG_BOOTARGS "\0" \
+	"nandboot=" \
+		"nand read $(loadaddr) 0x20000 0x100000;" \
+		"run nandargs;" \
+		"bootm" \
+		"\0"
+#else
+# define NAND_ENV_SETTINGS
+#endif
 #if defined(CONFIG_CMD_NET)
 # if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
 #  define UBOOT_ENV_FILE "u-boot.bin"
@@ -156,19 +171,23 @@
 		"ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):" \
 		   "$(hostname):eth0:off" \
 		"\0" \
+	\
+	"ramfile=uImage\0" \
 	"ramargs=set bootargs " CONFIG_BOOTARGS "\0" \
 	"ramboot=" \
-		"tftp $(loadaddr) uImage;" \
+		"tftp $(loadaddr) $(ramfile);" \
 		"run ramargs;" \
 		"run addip;" \
 		"bootm" \
 		"\0" \
+	\
+	"nfsfile=vmImage\0" \
 	"nfsargs=set bootargs " \
 		"root=/dev/nfs rw " \
 		"nfsroot=$(serverip):$(rootpath),tcp,nfsvers=3" \
 		"\0" \
 	"nfsboot=" \
-		"tftp $(loadaddr) vmImage;" \
+		"tftp $(loadaddr) $(nfsfile);" \
 		"run nfsargs;" \
 		"run addip;" \
 		"bootm" \
@@ -177,6 +196,7 @@
 # define NETWORK_ENV_SETTINGS
 #endif
 #define CONFIG_EXTRA_ENV_SETTINGS \
+	NAND_ENV_SETTINGS \
 	NETWORK_ENV_SETTINGS \
 	"flashboot=bootm 0x20100000\0"
 
-- 
1.6.3.1

  parent reply	other threads:[~2009-06-14  6:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-14  6:28 [U-Boot] [PATCH 00/17] Blackfin updates for post 2009.06 Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 01/17] Blackfin: add support for embedding the environment into LDRs Mike Frysinger
2009-06-14 10:51   ` Wolfgang Denk
2009-06-14 11:18     ` Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 02/17] Blackfin: new spibootldr command Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 03/17] Blackfin: cm-bf533: new board port Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 04/17] Blackfin: cm-bf537e: " Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 05/17] Blackfin: cm-bf561: " Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 06/17] Blackfin: tcm-bf537: " Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 07/17] Blackfin: cm-bf548: " Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 08/17] Blackfin: cm-bf527: " Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 09/17] Blackfin: bf537-pnav: " Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 10/17] Blackfin: bf537-minotaur: " Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 11/17] Blackfin: bf537-srv1: " Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 12/17] Blackfin: blackstamp: " Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 13/17] Blackfin: ibf-dsp561: " Mike Frysinger
2009-06-14  6:28 ` Mike Frysinger [this message]
2009-06-14  6:28 ` [U-Boot] [PATCH 15/17] Blackfin: enable LZMA for all ADI boards Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 16/17] Blackfin: convert specific pre/post config headers to common method Mike Frysinger
2009-06-14  6:28 ` [U-Boot] [PATCH 17/17] Blackfin: bf518f-ezbrd: enable SST SPI flash driver Mike Frysinger

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=1244960934-20887-15-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.