diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2013-04-19 03:42:00 +0000 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2013-04-25 21:33:30 +0200 |
commit | 0798d5785d3fe71f1e2b30dab908fc9a9b40e016 (patch) | |
tree | 6898171ad6127e0bf8e3d187e1156f8342b1ebb8 /include/configs | |
parent | 1e1cbde0db46c96a236b7b3c5604d1f30467cb2d (diff) | |
download | u-boot-imx-0798d5785d3fe71f1e2b30dab908fc9a9b40e016.zip u-boot-imx-0798d5785d3fe71f1e2b30dab908fc9a9b40e016.tar.gz u-boot-imx-0798d5785d3fe71f1e2b30dab908fc9a9b40e016.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>
Diffstat (limited to 'include/configs')
-rw-r--r-- | include/configs/wandboard.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index bd3e727..0dc3286 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=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_ENV_PART) "\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=" \ |