From: Jon Medhurst (Tixy) <jon.medhurst@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] ARM: vexpress: Extend default boot sequence to load script from MMC
Date: Tue, 29 Nov 2011 13:46:16 +0000 [thread overview]
Message-ID: <1322574376.4500.34.camel@linaro1> (raw)
Extend the default boot sequence on Versatile Express to load a boot
script from MMC.
Signed-off-by: Jon Medhurst <jon.medhurst@linaro.org>
---
include/configs/vexpress_common.h | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/include/configs/vexpress_common.h b/include/configs/vexpress_common.h
index a4ae5a8..d56f19d 100644
--- a/include/configs/vexpress_common.h
+++ b/include/configs/vexpress_common.h
@@ -178,6 +178,8 @@
#define CONFIG_CMD_SAVEENV
#define CONFIG_NET_MULTI
#define CONFIG_CMD_RUN
+#define CONFIG_CMD_BOOTD
+#define CONFIG_CMD_ECHO
#define CONFIG_CMD_FAT
#define CONFIG_DOS_PARTITION 1
@@ -226,7 +228,14 @@
#define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET
/* Basic environment settings */
-#define CONFIG_BOOTCOMMAND "run bootflash;"
+#define CONFIG_BOOTCOMMAND \
+ "if mmc rescan ${mmcdev}; then " \
+ "if run loadbootscript; then " \
+ "run bootscript; " \
+ "fi; " \
+ "fi; " \
+ "run bootflash;"
+
#ifdef CONFIG_VEXPRESS_ORIGINAL_MEMORY_MAP
#define CONFIG_PLATFORM_ENV_SETTINGS \
"loadaddr=0x80008000\0" \
@@ -258,7 +267,12 @@
"devtmpfs.mount=0 vmalloc=256M\0" \
"bootflash=run flashargs; " \
"cp ${ramdisk_addr} ${ramdisk_addr_r} ${maxramdisk}; " \
- "bootm ${kernel_addr} ${ramdisk_addr_r}\0"
+ "bootm ${kernel_addr} ${ramdisk_addr_r}\0" \
+ "mmcdev=0\0" \
+ "bootscr=boot.scr\0" \
+ "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} ${bootscr}\0" \
+ "bootscript=echo Running bootscript from mmc ...; " \
+ "source ${loadaddr}\0"
/* FLASH and environment organization */
#define PHYS_FLASH_SIZE 0x04000000 /* 64MB */
@@ -305,6 +319,8 @@
#define CONFIG_SYS_PROMPT "VExpress# "
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
sizeof(CONFIG_SYS_PROMPT) + 16)
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot args buffer */
#define CONFIG_CMD_SOURCE
#define CONFIG_SYS_LONGHELP
--
1.7.4.1
next reply other threads:[~2011-11-29 13:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 13:46 Jon Medhurst [this message]
2011-11-29 16:04 ` [U-Boot] ARM: vexpress: Extend default boot sequence to load script from MMC Ryan Harkin
2011-11-29 20:46 ` Tom Rini
2011-11-30 8:32 ` Jon Medhurst
2011-11-30 14:51 ` Tom Rini
2011-11-30 15:19 ` Jon Medhurst
2011-11-30 15:46 ` 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=1322574376.4500.34.camel@linaro1 \
--to=jon.medhurst@linaro.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.