From 8d6b73202c65f40f88ac27f5e5d2203fe6ae3f1d Mon Sep 17 00:00:00 2001 From: Andreas Pretzsch Date: Sat, 16 Jul 2011 05:50:59 +0000 Subject: 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 --- common/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/main.c') diff --git a/common/main.c b/common/main.c index 2124526819..1f221423a2 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) -- cgit v1.2.3