[U-Boot] trigger automatic update (FIT image) from prompt instead of "updatefile" env variable

Is there a way to manually trigger an automatic update using a FIT image, based on the way described in doc/README.update ?
I mean beside setting "updatefile" environment variable, saveenv and reboot, but trigger it from U-Boot prompt resp. script ?
As far as I can see, update_tftp() is only called once during the startup, but not referenced by any command.
Use case: Disaster recovery update via altbootcmd.
Thanks in advance, A. Pretzsch

Dear Andreas Pretzsch,
In message 1302554333.13241.158.camel@ws-apr.office.loc you wrote:
Is there a way to manually trigger an automatic update using a FIT image, based on the way described in doc/README.update ?
Yes, there is.
I mean beside setting "updatefile" environment variable, saveenv and reboot, but trigger it from U-Boot prompt resp. script ?
As far as I can see, update_tftp() is only called once during the startup, but not referenced by any command.
It requires a two-step approach. In the first step, implement such a command - patches welcome :-)
Best regards,
Wolfgang Denk

Am Montag, den 11.04.2011, 23:11 +0200 schrieb Wolfgang Denk:
In message 1302554333.13241.158.camel@ws-apr.office.loc you wrote:
Is there a way to manually trigger an automatic update using a FIT image, based on the way described in doc/README.update ?
Yes, there is.
I suppose you meant as soon as there is a new command ?
I mean beside setting "updatefile" environment variable, saveenv and reboot, but trigger it from U-Boot prompt resp. script ?
As far as I can see, update_tftp() is only called once during the startup, but not referenced by any command.
It requires a two-step approach. In the first step, implement such a command - patches welcome :-)
Ok, let's see what I can squeeze in before the merge window closes.
Browsing the code, I see four ways to implement this, with #1 being my favorite. Straightforward and no risk of side effects. In all variants, I'm unsure about the command name and hope for suggestions.
1.) new command calling update_tftp(), optionally with address parameter to omit the tftp load
2.) additional fdt subcommand, like in tftp fit_image ; fdt addr ${loadaddr} ; fdt flash
3.) "imxtract ${loadaddr} flash" or similar
4.) extend "source" command

Am Mittwoch, den 13.04.2011, 21:47 +0200 schrieb Andreas Pretzsch:
Am Montag, den 11.04.2011, 23:11 +0200 schrieb Wolfgang Denk:
In message 1302554333.13241.158.camel@ws-apr.office.loc you wrote:
Is there a way to manually trigger an automatic update using a FIT image, based on the way described in doc/README.update ?
Yes, there is.
I suppose you meant as soon as there is a new command ?
I mean beside setting "updatefile" environment variable, saveenv and reboot, but trigger it from U-Boot prompt resp. script ?
As far as I can see, update_tftp() is only called once during the startup, but not referenced by any command.
It requires a two-step approach. In the first step, implement such a command - patches welcome :-)
Ok, let's see what I can squeeze in before the merge window closes.
Browsing the code, I see four ways to implement this, with #1 being my favorite. Straightforward and no risk of side effects. In all variants, I'm unsure about the command name and hope for suggestions.
1.) new command calling update_tftp(), optionally with address parameter to omit the tftp load
Took this approach, as most easy and non-intrusive. Named the new command "fitupd", sounds appropriate to me. Feel free to still request a name change. See patch series "update from FIT image: add optional address, new command fitupd".
participants (2)
-
Andreas Pretzsch
-
Wolfgang Denk