2015-03-21 17:40:21 +00:00
|
|
|
From cfee6c407f7ed0ab2ed0f98645c10b2d34497f46 Mon Sep 17 00:00:00 2001
|
2015-03-06 13:05:47 +00:00
|
|
|
From: Peter Robinson <pbrobinson@gmail.com>
|
|
|
|
Date: Fri, 6 Mar 2015 10:52:53 +0000
|
2015-03-21 17:40:21 +00:00
|
|
|
Subject: [PATCH 10/14] Add support for loading environment from uEnv.txt in
|
2014-11-26 05:17:04 +00:00
|
|
|
config_distro_bootcmd.
|
|
|
|
|
|
|
|
---
|
|
|
|
include/config_distro_bootcmd.h | 21 +++++++++++++++++++++
|
|
|
|
1 file changed, 21 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
|
2015-03-21 17:40:21 +00:00
|
|
|
index 7f8b393..8614cc4 100644
|
2014-11-26 05:17:04 +00:00
|
|
|
--- a/include/config_distro_bootcmd.h
|
|
|
|
+++ b/include/config_distro_bootcmd.h
|
2015-03-21 17:40:21 +00:00
|
|
|
@@ -179,6 +179,7 @@
|
2014-11-26 05:17:04 +00:00
|
|
|
"boot_prefixes=/ /boot/\0" \
|
|
|
|
"boot_scripts=boot.scr.uimg boot.scr\0" \
|
2015-03-06 13:05:47 +00:00
|
|
|
"boot_script_dhcp=boot.scr.uimg\0" \
|
2014-11-26 05:17:04 +00:00
|
|
|
+ "boot_uenv_files=uEnv.txt\0" \
|
|
|
|
BOOTENV_BOOT_TARGETS \
|
|
|
|
\
|
2015-03-06 13:05:47 +00:00
|
|
|
"boot_extlinux=" \
|
2015-03-21 17:40:21 +00:00
|
|
|
@@ -209,11 +210,31 @@
|
2014-11-26 05:17:04 +00:00
|
|
|
"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=" \
|
2015-03-06 13:05:47 +00:00
|
|
|
"echo Scanning ${devtype} ${devnum}:${bootpart}...; " \
|
|
|
|
"for prefix in ${boot_prefixes}; do " \
|
|
|
|
"run scan_dev_for_extlinux; " \
|
|
|
|
"run scan_dev_for_scripts; " \
|
|
|
|
+ "run scan_dev_for_uenv_files; " \
|
2014-11-26 05:17:04 +00:00
|
|
|
"done\0" \
|
|
|
|
\
|
2015-03-06 13:05:47 +00:00
|
|
|
"scan_dev_for_boot_part=" \
|
2014-11-26 05:17:04 +00:00
|
|
|
--
|
2015-03-21 17:40:21 +00:00
|
|
|
2.3.2
|
2014-11-26 05:17:04 +00:00
|
|
|
|