summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2013-04-19 03:42:00 +0000
committerLiu Ying <Ying.Liu@freescale.com>2013-11-22 17:25:22 +0800
commita2d68cdad6a13a48f1b0023afef29988a704567b (patch)
treef3c4dcb603a1424599d251f4d925f42d3afafe94
parent6c49efa816bdb4f3c9de8b3df12641989bfaa1a9 (diff)
downloadu-boot-imx-a2d68cdad6a13a48f1b0023afef29988a704567b.zip
u-boot-imx-a2d68cdad6a13a48f1b0023afef29988a704567b.tar.gz
u-boot-imx-a2d68cdad6a13a48f1b0023afef29988a704567b.tar.bz2
wandboard: Add update_sd_firmware support
This allow for easy update of firmware in the SD card from a running U-Boot. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> (cherry picked from commit 0798d5785d3fe71f1e2b30dab908fc9a9b40e016) Signed-off-by: Jason Liu <r64343@freescale.com> (cherry picked from commit dfa136614b8ab08692f6b621413ceee39948059b)
-rw-r--r--include/configs/wandboard.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h
index 120e3f6..a5bfc49 100644
--- a/include/configs/wandboard.h
+++ b/include/configs/wandboard.h
@@ -47,6 +47,8 @@
#undef CONFIG_CMD_IMLS
+#define CONFIG_CMD_SETEXPR
+
#define CONFIG_BOOTDELAY 5
#define CONFIG_SYS_MEMTEST_START 0x10000000
@@ -100,6 +102,20 @@
"mmcdev=0\0" \
"mmcpart=2\0" \
"mmcroot=/dev/mmcblk0p3 rootwait rw\0" \
+ "update_sd_firmware_filename=u-boot.imx\0" \
+ "update_sd_firmware=" \
+ "if test ${ip_dyn} = yes; then " \
+ "setenv get_cmd dhcp; " \
+ "else " \
+ "setenv get_cmd tftp; " \
+ "fi; " \
+ "if mmc dev ${mmcdev}; then " \
+ "if ${get_cmd} ${update_sd_firmware_filename}; then " \
+ "setexpr fw_sz ${filesize} / 0x200; " \
+ "setexpr fw_sz ${fw_sz} + 1; " \
+ "mmc write ${loadaddr} 0x2 ${fw_sz}; " \
+ "fi; " \
+ "fi\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=${mmcroot}\0" \
"loadbootscript=" \