summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorAndreas Pretzsch <apr@cn-eng.de>2011-07-16 05:50:59 +0000
committerWolfgang Denk <wd@denx.de>2011-07-26 16:58:44 +0200
commit8d6b73202c65f40f88ac27f5e5d2203fe6ae3f1d (patch)
tree87c548aa0f5aa8506190cf3b67655efd75a1e9f9 /common/main.c
parent975afc34dd3ca51ef3f3e7c0c0dcece89dda10ae (diff)
automatic update from FIT image: add optional address parameter
Current update_tftp() flow: 1.) fetch "updatefile" from defined TFTP server 2.) check if FIT format 3.) flash contained images Add an address parameter to update_tftp(). If this address is non-zero, skip the TFTP transfer and use the image at this address. Also extend update_tftp() to return success/fail. Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/main.c b/common/main.c
index 21245268193..1f221423a20 100644
--- a/common/main.c
+++ b/common/main.c
@@ -51,7 +51,7 @@ void inline __show_boot_progress (int val) {}
void show_boot_progress (int val) __attribute__((weak, alias("__show_boot_progress")));
#if defined(CONFIG_UPDATE_TFTP)
-void update_tftp (void);
+int update_tftp (ulong addr);
#endif /* CONFIG_UPDATE_TFTP */
#define MAX_DELAY_STOP_STR 32
@@ -341,7 +341,7 @@ void main_loop (void)
#endif /* CONFIG_PREBOOT */
#if defined(CONFIG_UPDATE_TFTP)
- update_tftp ();
+ update_tftp (0UL);
#endif /* CONFIG_UPDATE_TFTP */
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)