diff options
author | Vagrant Cascadian <vagrant@debian.org> | 2014-10-01 10:29:36 -0700 |
---|---|---|
committer | Dennis Gilmore <dennis@ausil.us> | 2014-10-14 19:41:53 -0500 |
commit | e35f16a3b1d651e2ce0b07ec67572f55fafff092 (patch) | |
tree | 8f89b5009d9d946d0d7317bd1fc4883ca6a59671 | |
parent | d4ec2d9e7134d8deb403f82577b04c63e724ab08 (diff) | |
download | u-boot-e35f16a3b1d651e2ce0b07ec67572f55fafff092.tar.gz u-boot-e35f16a3b1d651e2ce0b07ec67572f55fafff092.tar.xz u-boot-e35f16a3b1d651e2ce0b07ec67572f55fafff092.zip |
Add support for loading environment from uEnv.txt in config_distro_bootcmd.
-rw-r--r-- | include/config_distro_bootcmd.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 25034317f4..aaa010e782 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -174,6 +174,7 @@ BOOTENV_SHARED_IDE \ "boot_prefixes=/ /boot/\0" \ "boot_scripts=boot.scr.uimg boot.scr\0" \ + "boot_uenv_files=uEnv.txt\0" \ BOOTENV_BOOT_TARGETS \ "boot_partitions="BOOTENV_BOOT_PARTITIONS"\0" \ \ @@ -205,6 +206,25 @@ "fi; " \ "done\0" \ \ + "import_uenv_file=" \ + "load ${devtype} ${devnum}:${bootpart} " \ + "${scriptaddr} ${prefix}${uenv_file}; " \ + "env import -t -r ${scriptaddr} ${filesize}\0; " \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;" \ + "fi;\0" \ + \ + "scan_dev_for_uenv_files=" \ + "for uenv_file in ${boot_uenv_files}; do " \ + "if test -e ${devtype} ${devnum}:${bootpart} " \ + "${prefix}${uenv_file}; then " \ + "echo Found U-boot env file" \ + "${prefix}${uenv_file}; " \ + "run import_uenv_file; " \ + "fi; " \ + "done\0" \ + \ "scan_dev_for_boot=" \ "for partition in ${boot_partitions}; do " \ "echo Scanning ${devtype} ${devnum}:${partition}...; " \ @@ -212,6 +232,7 @@ "for prefix in ${boot_prefixes}; do " \ "run scan_dev_for_extlinux; " \ "run scan_dev_for_scripts; " \ + "run scan_dev_for_uenv_files; " \ "done;" \ "done\0" \ \ |