mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-05 02:50:44 +09:00
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>
This commit is contained in:
parent
68cf64db1d
commit
4d7d2e570a
@ -69,20 +69,41 @@
|
|||||||
#define BOOTCMDS_COMMON \
|
#define BOOTCMDS_COMMON \
|
||||||
"rootpart=1\0" \
|
"rootpart=1\0" \
|
||||||
\
|
\
|
||||||
|
"do_script_boot=" \
|
||||||
|
"load ${devtype} ${devnum}:${rootpart} " \
|
||||||
|
"${scriptaddr} ${prefix}${script}; " \
|
||||||
|
"source ${scriptaddr}\0" \
|
||||||
|
\
|
||||||
"script_boot=" \
|
"script_boot=" \
|
||||||
"if load ${devtype} ${devnum}:${rootpart} " \
|
"for script in ${boot_scripts}; do " \
|
||||||
"${scriptaddr} ${prefix}${script}; then " \
|
"if test -e ${devtype} ${devnum}:${rootpart} " \
|
||||||
"echo ${script} found! Executing ...;" \
|
"${prefix}${script}; then " \
|
||||||
"source ${scriptaddr};" \
|
"echo Found U-Boot script " \
|
||||||
"fi;\0" \
|
"${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=" \
|
"scan_boot=" \
|
||||||
"echo Scanning ${devtype} ${devnum}...; " \
|
"echo Scanning ${devtype} ${devnum}...; " \
|
||||||
"for prefix in ${boot_prefixes}; do " \
|
"for prefix in ${boot_prefixes}; do " \
|
||||||
"for script in ${boot_scripts}; do " \
|
"run sysboot_boot; " \
|
||||||
"run script_boot; " \
|
"run script_boot; " \
|
||||||
"done; " \
|
"done\0" \
|
||||||
"done;\0" \
|
|
||||||
\
|
\
|
||||||
"boot_targets=" \
|
"boot_targets=" \
|
||||||
BOOT_TARGETS_MMC " " \
|
BOOT_TARGETS_MMC " " \
|
||||||
|
Loading…
Reference in New Issue
Block a user