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/genimage.cfg b/board/czechlight/clearfog/genimage.cfg
index 7633c8f..01866bb 100644
--- a/board/czechlight/clearfog/genimage.cfg
+++ b/board/czechlight/clearfog/genimage.cfg
@@ -36,3 +36,25 @@
size = 2000M
}
}
+
+image usb-flash.vfat {
+ vfat {
+ files = {
+ "usb-boot.scr",
+ "zImage",
+ "czechlight-clearfog.dtb",
+ "rootfs.cpio.uboot"
+ }
+ }
+ size = 64M
+}
+
+image usb-flash.img {
+ hdimage {
+ }
+
+ partition boot {
+ partition-type = 0xc
+ image = "usb-flash.vfat"
+ }
+}