
Dear Martin,
in message 41C968B7.6050300@egholm-nielsen.dk you wrote:
You're not the first to implement this. See the existing code.
Can you please guide me to where?
I already mentioned board/trab/auto_update.c in my message; see also board/esd/common/auto_update.c
Why a hardcoded address instead of the usual, configurable mechanism?
Because there is no keyboard, nor any display attached to the board.
You can (and should) still store the IP address in a envrionment variable so ir remains changeable - either through a netconsole interface, or by a Linux application.
That's right! But in case there is no tftpserver responding within x seconds, the commands should abandon.
Define "responding". There are many failure modes, some temporary and recoverable.
Hence, what I'd like, was a way to determine if the download was successfull - e.g. by comparing the return value for the command.
You can do that easily - just not by timeout only.
I was hoping to perform the logics using some scripting functionality in u-boot (although http://www.denx.de/twiki/publish/DULG/UBootScripts.html is quite empty).
Yes, of course. This is what I'm talking about, too. Depending on the complexity this can be done as script, or you may find it more efficient to code it in C.
As you mention, many before me has done (requested) this, but we all run different boards. Hence, wouldn't it be nice if one could use some "standard" u-boot runtime scripting to do this, instead of having to write the "same" update code in each of our boards' init-blocks?
It can be done in a general way now, but requirements differ, and so you will end up seeing many different implementations. Of course what you can actually _see_ is only what ends up as C code in the U-Boot tree. So far none of the customers I know of decided to put their scripts into CVS.
Of course, the boards' hardware configurations are different, but they often have a common denominator - namely serial- and ethernet-connections.
Sure. And/or USB memory sticks, or CompactFlash cards, or ...
Maybe we should gather this information in twiki... Any references?
Sorry, no.
Best regards,
Wolfgang Denk