[v2,5/5] colibri_vf: add update_uboot wrapper
diff mbox series

Message ID 20191209103333.6754-6-igor.opaniuk@gmail.com
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show
Series
  • toradex: imx: add update_uboot wrapper
Related show

Commit Message

Igor Opaniuk Dec. 9, 2019, 10:33 a.m. UTC
From: Igor Opaniuk <igor.opaniuk@toradex.com>

Add universal update_uboot wrapper that helps to update
U-Boot image on internal storage.

Usage example:
> tftpboot ${loadaddr} ${board_name}/u-boot-nand.imx
> run update_uboot

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---

 include/configs/colibri_vf.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Stefano Babic Dec. 29, 2019, 10:26 a.m. UTC | #1
> From: Igor Opaniuk <igor.opaniuk@toradex.com>
> Add universal update_uboot wrapper that helps to update
> U-Boot image on internal storage.
> Usage example:
> > tftpboot ${loadaddr} ${board_name}/u-boot-nand.imx
> > run update_uboot
> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Applied to u-boot-imx, -next, thanks !

Best regards,
Stefano Babic

Patch
diff mbox series

diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index 40c050a27e..1478ea844e 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -58,6 +58,10 @@ 
 	"ramdisk_addr_r=0x82100000\0" \
 	"scriptaddr=0x87000000\0"
 
+#define UBOOT_UPDATE \
+	"update_uboot=nand erase.part u-boot && " \
+		"nand write ${loadaddr} u-boot ${filesize}\0" \
+
 #define NFS_BOOTCMD \
 	"nfsargs=ip=:::::eth0: root=/dev/nfs\0"	\
 	"nfsboot=run setup; " \
@@ -112,6 +116,7 @@ 
 	NFS_BOOTCMD \
 	SD_BOOTCMD \
 	UBI_BOOTCMD \
+	UBOOT_UPDATE \
 	"console=ttyLP0\0" \
 	"defargs=user_debug=30\0" \
 	"dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \