summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-02-05 09:24:58 -0700
committerTom Warren <twarren@nvidia.com>2014-03-05 16:59:08 -0700
commit4d7d2e570a47df28b308bbdbf7c9f265cdcf17ca (patch)
tree6fabe385cb42e48e4a96b875c382ebecb8097d27
parent68cf64db1d1ba3dffa364862a63b92a837dd8a81 (diff)
downloadu-boot-imx-4d7d2e570a47df28b308bbdbf7c9f265cdcf17ca.zip
u-boot-imx-4d7d2e570a47df28b308bbdbf7c9f265cdcf17ca.tar.gz
u-boot-imx-4d7d2e570a47df28b308bbdbf7c9f265cdcf17ca.tar.bz2
ARM: tegra: rework boot scripts
Update the common Tegra boot scripts in the default environment to a) Make use of the new "test -e" shell command to avoid some error messages. b) Allow booting using the sysboot command and extlinux.conf. This allows easy creation of boot menus, and provides a simple interface for distros to parameterize/configure the boot process. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
-rw-r--r--include/configs/tegra-common-post.h39
1 files changed, 30 insertions, 9 deletions
diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h
index e1a3bbc..3bf55ce 100644
--- a/include/configs/tegra-common-post.h
+++ b/include/configs/tegra-common-post.h
@@ -69,20 +69,41 @@
#define BOOTCMDS_COMMON \
"rootpart=1\0" \
\
+ "do_script_boot=" \
+ "load ${devtype} ${devnum}:${rootpart} " \
+ "${scriptaddr} ${prefix}${script}; " \
+ "source ${scriptaddr}\0" \
+ \
"script_boot=" \
- "if load ${devtype} ${devnum}:${rootpart} " \
- "${scriptaddr} ${prefix}${script}; then " \
- "echo ${script} found! Executing ...;" \
- "source ${scriptaddr};" \
- "fi;\0" \
+ "for script in ${boot_scripts}; do " \
+ "if test -e ${devtype} ${devnum}:${rootpart} " \
+ "${prefix}${script}; then " \
+ "echo Found U-Boot script " \
+ "${prefix}${script}; " \
+ "run do_script_boot; " \
+ "echo SCRIPT FAILED: continuing...; " \
+ "fi; " \
+ "done\0" \
+ \
+ "do_sysboot_boot=" \
+ "sysboot ${devtype} ${devnum}:${rootpart} any " \
+ "${scriptaddr} ${prefix}extlinux.conf\0" \
+ \
+ "sysboot_boot=" \
+ "if test -e ${devtype} ${devnum}:${rootpart} " \
+ "${prefix}extlinux.conf; then " \
+ "echo Found extlinux config " \
+ "${prefix}extlinux.conf; " \
+ "run do_sysboot_boot; " \
+ "echo SCRIPT FAILED: continuing...; " \
+ "fi\0" \
\
"scan_boot=" \
"echo Scanning ${devtype} ${devnum}...; " \
"for prefix in ${boot_prefixes}; do " \
- "for script in ${boot_scripts}; do " \
- "run script_boot; " \
- "done; " \
- "done;\0" \
+ "run sysboot_boot; " \
+ "run script_boot; " \
+ "done\0" \
\
"boot_targets=" \
BOOT_TARGETS_MMC " " \