summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2016-01-26 11:10:12 -0700
committerSimon Glass <sjg@chromium.org>2016-01-28 21:01:23 -0700
commit3483b75d94716191b354d046b4ed3f322500a3ee (patch)
tree6978404ba1b3c484d875bbc64d8f34b1bf88319b /include
parente578b92cdb378df0f09065e3222fe8620867a57a (diff)
downloadblackbird-obmc-uboot-3483b75d94716191b354d046b4ed3f322500a3ee.tar.gz
blackbird-obmc-uboot-3483b75d94716191b354d046b4ed3f322500a3ee.zip
distro bootcmd: make net boot only optionally start USB
Currently, the distro boot commands always enumerate USB devices before performing network operations. However, depending on the board and end- user configuration, network devices may not be attached to USB, and so enumerating USB may not be necessary. Enhance the scripts to make this step optional, so that the user can decrease boot time if they don't need USB. This change is performed by moving the "usb start" invocation into a standalone variable. If the user desires, they can replace that variable's value with some no-op command such as "true" instead. Booting from a USB storage device always needs to enumerate USB devices, so this action is still hard-coded. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/config_distro_bootcmd.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 66264ce3b4..c027d86439 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -140,15 +140,16 @@
#endif
#ifdef CONFIG_CMD_USB
-#define BOOTENV_RUN_USB_INIT "usb start; "
+#define BOOTENV_RUN_NET_USB_START "run boot_net_usb_start; "
#define BOOTENV_SHARED_USB \
+ "boot_net_usb_start=usb start\0" \
"usb_boot=" \
- BOOTENV_RUN_USB_INIT \
+ "usb start; " \
BOOTENV_SHARED_BLKDEV_BODY(usb)
#define BOOTENV_DEV_USB BOOTENV_DEV_BLKDEV
#define BOOTENV_DEV_NAME_USB BOOTENV_DEV_NAME_BLKDEV
#else
-#define BOOTENV_RUN_USB_INIT
+#define BOOTENV_RUN_NET_USB_START
#define BOOTENV_SHARED_USB
#define BOOTENV_DEV_USB \
BOOT_TARGET_DEVICES_references_USB_without_CONFIG_CMD_USB
@@ -159,7 +160,7 @@
#if defined(CONFIG_CMD_DHCP)
#define BOOTENV_DEV_DHCP(devtypeu, devtypel, instance) \
"bootcmd_dhcp=" \
- BOOTENV_RUN_USB_INIT \
+ BOOTENV_RUN_NET_USB_START \
"if dhcp ${scriptaddr} ${boot_script_dhcp}; then " \
"source ${scriptaddr}; " \
"fi\0"
@@ -175,7 +176,7 @@
#if defined(CONFIG_CMD_DHCP) && defined(CONFIG_CMD_PXE)
#define BOOTENV_DEV_PXE(devtypeu, devtypel, instance) \
"bootcmd_pxe=" \
- BOOTENV_RUN_USB_INIT \
+ BOOTENV_RUN_NET_USB_START \
"dhcp; " \
"if pxe get; then " \
"pxe boot; " \
OpenPOWER on IntegriCloud