summaryrefslogtreecommitdiff
path: root/include/configs
diff options
context:
space:
mode:
authorDiego Rondini <diego.rondini@kynetics.it>2014-10-02 12:16:41 -0700
committerStefano Babic <sbabic@denx.de>2014-10-06 17:57:22 +0200
commit5b7103e0af5435d68489b2b579e9e46226782e64 (patch)
tree953234f970c0048f423c1c0aefdcaf12c99a0087 /include/configs
parent84e2dc0c89dc5c70ae17224141a745edcd36402c (diff)
downloadu-boot-imx-5b7103e0af5435d68489b2b579e9e46226782e64.zip
u-boot-imx-5b7103e0af5435d68489b2b579e9e46226782e64.tar.gz
u-boot-imx-5b7103e0af5435d68489b2b579e9e46226782e64.tar.bz2
nitrogen6x: config: allow boot to USB stick
This patch enables boot to USB storage devices by expanding on the list of boot devices. Because the USB startup currently takes a long time, it places USB at the end of the list of supported devices. You can over-ride the boot order using the bootdevs environment variable. For instance, this will make USB the first (highest priority) device: U-Boot > setenv bootdevs usb mmc sata U-Boot > saveenv Signed-off-by: Diego Rondini <diego.rondini@kynetics.it> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Diffstat (limited to 'include/configs')
-rw-r--r--include/configs/nitrogen6x.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 5e9b743..21a25e0 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -173,7 +173,13 @@
#define CONFIG_DRIVE_MMC
#endif
-#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC
+#ifdef CONFIG_USB_STORAGE
+#define CONFIG_DRIVE_USB "usb "
+#else
+#define CONFIG_DRIVE_USB
+#endif
+
+#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_SATA CONFIG_DRIVE_MMC CONFIG_DRIVE_USB
#if defined(CONFIG_SABRELITE)
#define CONFIG_EXTRA_ENV_SETTINGS \
@@ -253,12 +259,16 @@
"run netboot; "
#else
#define CONFIG_EXTRA_ENV_SETTINGS \
+ "bootdevs=" CONFIG_DRIVE_TYPES "\0" \
"console=ttymxc1\0" \
"clearenv=if sf probe || sf probe || sf probe 1 ; then " \
"sf erase 0xc0000 0x2000 && " \
"echo restored environment to factory default ; fi\0" \
- "bootcmd=for dtype in " CONFIG_DRIVE_TYPES \
+ "bootcmd=for dtype in ${bootdevs}" \
"; do " \
+ "if itest.s \"xusb\" == \"x${dtype}\" ; then " \
+ "usb start ;" \
+ "fi; " \
"for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
"for fs in fat ext2 ; do " \
"${fs}load " \
@@ -274,7 +284,7 @@
"echo ; echo serial console at 115200, 8N1 ; echo ; " \
"echo details at http://boundarydevices.com/6q_bootscript ; " \
"setenv stdout serial\0" \
- "upgradeu=for dtype in " CONFIG_DRIVE_TYPES \
+ "upgradeu=for dtype in ${bootdevs}" \
"; do " \
"for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
"for fs in fat ext2 ; do " \