summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-03-11 23:56:03 +0100
committerWolfgang Denk <wd@denx.de>2010-03-11 23:56:03 +0100
commit143cd21fe22e69bf0cdaefd57be98f07ed8f04fa (patch)
tree5ec5cad02c97e90ff1c4c2d03b5013ab590e0230 /common
parent1b691bb0c2fa18c9b68f15398ef6c8b9e0c0f3e3 (diff)
downloadu-boot-imx-143cd21fe22e69bf0cdaefd57be98f07ed8f04fa.zip
u-boot-imx-143cd21fe22e69bf0cdaefd57be98f07ed8f04fa.tar.gz
u-boot-imx-143cd21fe22e69bf0cdaefd57be98f07ed8f04fa.tar.bz2
Move CONFIG_UPDATE_TFTP code after CONFIG_PREBOOT
The auto-update feature (CONFIG_UPDATE_TFTP) requires that the env variable serverip be set for the TFTP access. If DHCP is to be used to get the serverip env variable, this doesn't work as DHCP happens after the auto-update attempt has run. A solution is to run DHCP in PREBOOT, but even this is too late. To solve this, we move update_tftp() below the PREBOOT stuff. Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'common')
-rw-r--r--common/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/main.c b/common/main.c
index 10d8904..c860b0b 100644
--- a/common/main.c
+++ b/common/main.c
@@ -305,10 +305,6 @@ 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++;
@@ -369,6 +365,10 @@ void main_loop (void)
}
#endif /* CONFIG_PREBOOT */
+#if defined(CONFIG_UPDATE_TFTP)
+ update_tftp ();
+#endif /* CONFIG_UPDATE_TFTP */
+
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
s = getenv ("bootdelay");
bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY;