clearfog: Add a crude eMMC flashing script
Boot the board via UART with a USB flash disk loaded with
`usb-flash.img`:
./tools/kwboot -b ./u-boot-spl.kwb -t -p /dev/ttyUSB0
usb start; fatload usb 0:1 00800000 boot.scr; source 00800000
Run this from within U-Boot:
mount /dev/sda1 /mnt; sh /mnt/usb-reflash-factory.sh
Don't forget to re-jumper the board for eMMC boot afterwards (00111), do
not leave it in the UART mode (01001).
Change-Id: Iea55c065b2a7e2cf01eed2cbf7cf480d4db85f65
diff --git a/board/czechlight/clearfog/usb-flash-genimage.sh b/board/czechlight/clearfog/usb-flash-genimage.sh
index c907625..3ef30dd 100755
--- a/board/czechlight/clearfog/usb-flash-genimage.sh
+++ b/board/czechlight/clearfog/usb-flash-genimage.sh
@@ -2,6 +2,8 @@
set -ex
+install -m 0644 -D ${BR2_EXTERNAL_CZECHLIGHT_PATH}/board/czechlight/clearfog/usb-reflash-factory.sh ${BINARIES_DIR}/usb-reflash-factory.sh
+
mksquashfs ${BINARIES_DIR}/sdcard.img ${BINARIES_DIR}/sdcard.img.squashfs -root-owned -comp gzip -progress
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"