clearfog: Implement USB booting
Here's how to load this from a possible bricked device:
1) Set the boot switches to 01001 (yes, it's different from what the doc
says)
2) Load the bootloader via UART, e.g.:
`./tools/kwboot -b ./u-boot-spl.kwb -t -p /dev/ttyUSB0`
3) Interrupt U-Boot's autoboot to get a prompt
4) Plug a USB flash with images/usb-flash.img loaded
5) One on the U-Boot prompt, execute:
`usb start; fatload usb 0:1 00800000 usb-boot.scr; source 00800000`
6) Get a nice emergency shell
Change-Id: Icef4badc9105bbed78ad949c060c0a46e9ff7f76
diff --git a/board/czechlight/clearfog/patches/u-boot/boot.patch b/board/czechlight/clearfog/patches/u-boot/boot.patch
index 1c6032c..44c1c3e 100644
--- a/board/czechlight/clearfog/patches/u-boot/boot.patch
+++ b/board/czechlight/clearfog/patches/u-boot/boot.patch
@@ -88,7 +88,7 @@
+CONFIG_WDT=y
+CONFIG_WDT_ORION=y
diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
-index bf87bac300..4c5ac5b075 100644
+index bf87bac300..75926b00ed 100644
--- a/include/configs/clearfog.h
+++ b/include/configs/clearfog.h
@@ -32,6 +32,11 @@
@@ -113,7 +113,7 @@
#define CONFIG_PHY_MARVELL /* there is a marvell phy */
#define PHY_ANEG_TIMEOUT 8000 /* PHY needs a longer aneg time */
-@@ -161,17 +169,47 @@
+@@ -161,17 +169,48 @@
"kernel_addr_r=" KERNEL_ADDR_R "\0" \
"fdt_addr_r=" FDT_ADDR_R "\0" \
"ramdisk_addr_r=" RAMDISK_ADDR_R "\0" \
@@ -129,6 +129,7 @@
- "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
"console=ttyS0,115200\0" \
- BOOTENV
++ "usbboot=usb start; fatload usb 0:1 ${script_addr_r} usb-boot.scr; source ${script_addr_r}\0" \
+ "bootcmd=test -n \"${BOOT_A_LEFT}\" || setenv BOOT_A_LEFT 3;" \
+ "test -n \"${BOOT_B_LEFT}\" || setenv BOOT_B_LEFT 3;" \
+ "test -n \"${BOOT_ORDER}\" || setenv BOOT_ORDER \"A B\";" \