diff options
author | Wolfgang Denk <wd@denx.de> | 2010-03-11 23:56:03 +0100 |
---|---|---|
committer | Michael BRANDT <michael.brandt@stericsson.com> | 2010-10-21 14:24:33 +0200 |
commit | 3fe00dfb8dd6f6b69302a5b91303691ace0d3c08 (patch) | |
tree | e437a95cad7a6e46eefd170bb3702efb4bd6490b /common/main.c | |
parent | c32970bd4b99a3569cad6076b6a66efc41699945 (diff) |
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>
Change-Id: I966d6c549e172c183f6ea894eb29440c1df4bf46
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/6814
Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com>
Tested-by: Michael BRANDT <michael.brandt@stericsson.com>
Reviewed-by: Mikael LARSSON <mikael.xt.larsson@stericsson.com>
Reviewed-by: Joakim AXELSSON <joakim.axelsson@stericsson.com>
Diffstat (limited to 'common/main.c')
-rw-r--r-- | common/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/main.c b/common/main.c index 548c7a89e..6eeaa792d 100644 --- a/common/main.c +++ b/common/main.c @@ -308,10 +308,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++; @@ -372,6 +368,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; |