[U-Boot-Users] [RFC] Host tool to perform semiautomatic updates

Ben Warren biggerbadderben at gmail.com
Fri Mar 14 15:23:37 CET 2008


llandre wrote:
> Hi all,
>
> I need a tool running on host (Linux or Windows) that is able to 
> interact with u-boot command line emulating a human operator. Also it 
> must be able to retrieve from a text file a sequential list of commands 
> it must issue.
> One of the purpose is to have a simple procedure to perform on-the-field 
> upgrades with just a laptop connected to the target via serial cable 
> (I'm aware about this 
> http://www.denx.de/wiki/view/UBootdoc/AutomaticUpdates but I need a 
> procedure that does not require USB nor ethernet).
>
> For example it should be able to parse and execute a "script" like this:
>
> - wait U-Boot startup messages
> - interrupt autoboot sequence
> - download new linux kernel image
> - erase flash region
> - program new linux kernel image
> - verify new linux kernel image is stored correctly
> - in case it failed, retry the erase/writing cycle until it is ok or 
> retry counter is reached
> - notify human operator about success/failure
>
> So the human operator should just:
> a) connect the target to the laptop via RS232 cable
> b) start the program on laptop
> c) reset the target
>
>  From now on the program will handle all the communication with the 
> target and the human operator will have just to wait for notification.
>
> Anybody knows is there is something like this available? If not, any 
> suggestions about how to implement it?
>
>
>   
How about expect?  This should get you started:
http://en.wikipedia.org/wiki/Expect

If you want to use Windows I'd go with expect through cygwin rather than 
the native Windows port of expect.

You can of course do all of this in something more modern like Python, 
but that might be a steeper learning curve.

regards,
Ben




More information about the U-Boot mailing list