[U-Boot] so u-boot can be configured to try to update itself on every boot?

Wolfgang Denk wd at denx.de
Wed Mar 29 14:32:51 UTC 2017


Dear Robert,

In message <alpine.LFD.2.20.1703290927110.21547 at uk63952.mitel.com> you wrote:
> 
>   kind of a trivial question but i was just perusing the code related
> to FIT images and ran across this in main.c:
...
>   #if defined(CONFIG_UPDATE_TFTP)
>         update_tftp(0UL, NULL, NULL);        <----- THERE
>   #endif /* CONFIG_UPDATE_TFTP */
>   ... snip ...
> 
> i'm assuming that, given the proper configuration, u-boot will try to
> update its own binary on every single boot, yes? not sure why i never
> noticed that before.

This is documented in the "README" and especially in the
"doc/README.update" files.  It also describes how one would normally
use the "updatefile" environment variable to enable / disable this
feature.  But yes, if you keep this vaiable around, this will repeat
on every boot, according to good old UNIX philosophy:

"UNIX was not designed to stop you from doing stupid things,  because
that would also stop you from doing clever things."       - Doug Gwyn

;-)

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Our OS who art in CPU, UNIX be thy name.
Thy programs run, thy syscalls done,
In kernel as it is in user!


More information about the U-Boot mailing list