diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2013-04-19 03:41:57 +0000 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2013-04-25 21:29:46 +0200 |
commit | 810d6df0e26399a2971b775836d8ed579e548764 (patch) | |
tree | d83810639b985157fde1e067f1706220d0f1411d /include/configs/mx6qsabre_common.h | |
parent | 492938a33484e8d1b14ed82d2545ecde08f6be30 (diff) | |
download | u-boot-imx-810d6df0e26399a2971b775836d8ed579e548764.zip u-boot-imx-810d6df0e26399a2971b775836d8ed579e548764.tar.gz u-boot-imx-810d6df0e26399a2971b775836d8ed579e548764.tar.bz2 |
mx6qsabre{sd, auto}: 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/mx6qsabre_common.h')
-rw-r--r-- | include/configs/mx6qsabre_common.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/configs/mx6qsabre_common.h b/include/configs/mx6qsabre_common.h index f5f115f..7298a76 100644 --- a/include/configs/mx6qsabre_common.h +++ b/include/configs/mx6qsabre_common.h @@ -78,6 +78,7 @@ #define CONFIG_CMD_BMODE #define CONFIG_CMD_BOOTZ +#define CONFIG_CMD_SETEXPR #undef CONFIG_CMD_IMLS #define CONFIG_BOOTDELAY 1 @@ -98,6 +99,19 @@ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_ENV_PART) "\0" \ "mmcroot=" CONFIG_MMCROOT " rootwait rw\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=" \ |