summaryrefslogtreecommitdiffstats
path: root/common/main.c
diff options
context:
space:
mode:
authorBartlomiej Sieka <tur@semihalf.com>2008-10-01 15:26:31 +0200
committerWolfgang Denk <wd@denx.de>2008-10-18 21:54:00 +0200
commit4bae90904b69ce3deb9f7c334ef12ed74e18a275 (patch)
tree609ddd18652c6289cfd43dfd6447377bd3fb12fc /common/main.c
parent3f0cf51dabacc2724731c5079a60ea989103bb8f (diff)
downloadu-boot-4bae90904b69ce3deb9f7c334ef12ed74e18a275.tar.gz
u-boot-4bae90904b69ce3deb9f7c334ef12ed74e18a275.tar.xz
u-boot-4bae90904b69ce3deb9f7c334ef12ed74e18a275.zip
Automatic software update from TFTP server
The auto-update feature allows to automatically download software updates from a TFTP server and store them in Flash memory during boot. Updates are contained in a FIT file and protected with SHA-1 checksum. More detailed description can be found in doc/README.update. Signed-off-by: Rafal Czubak <rcz@semihalf.com> Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c
index 187ef8a3a5..c06ea07d41 100644
--- a/common/main.c
+++ b/common/main.c
@@ -56,6 +56,9 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* fo
extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+#if defined(CONFIG_UPDATE_TFTP)
+void update_tftp (void);
+#endif /* CONFIG_UPDATE_TFTP */
#define MAX_DELAY_STOP_STR 32
@@ -301,6 +304,10 @@ void main_loop (void)
trab_vfd (bmp);
#endif /* CONFIG_VFD && VFD_TEST_LOGO */
+#if defined(CONFIG_UPDATE_TFTP)
+ update_tftp ();
+#endif /* CONFIG_UPDATE_TFTP */
+
#ifdef CONFIG_BOOTCOUNT_LIMIT
bootcount = bootcount_load();
bootcount++;