* [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates
@ 2008-03-14 14:10 llandre
2008-03-14 14:18 ` Øyvind Repvik
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: llandre @ 2008-03-14 14:10 UTC (permalink / raw)
To: u-boot
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?
Thanks in advance,
llandre
DAVE Electronics System House - R&D Department
web: http://www.dave.eu
email: r&d2 at dave-tech.it
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates
2008-03-14 14:10 [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates llandre
@ 2008-03-14 14:18 ` Øyvind Repvik
2008-03-14 14:23 ` Ben Warren
2008-03-14 15:33 ` Wolfgang Denk
2 siblings, 0 replies; 11+ messages in thread
From: Øyvind Repvik @ 2008-03-14 14:18 UTC (permalink / raw)
To: u-boot
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).
>
[snip]
>
> 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?
I believe what you are looking for is "expect"
http://linux.die.net/man/1/expect
Regards,
?yvind Repvik
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates
2008-03-14 14:10 [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates llandre
2008-03-14 14:18 ` Øyvind Repvik
@ 2008-03-14 14:23 ` Ben Warren
2008-03-14 16:18 ` llandre
2008-03-14 15:33 ` Wolfgang Denk
2 siblings, 1 reply; 11+ messages in thread
From: Ben Warren @ 2008-03-14 14:23 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates
2008-03-14 14:10 [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates llandre
2008-03-14 14:18 ` Øyvind Repvik
2008-03-14 14:23 ` Ben Warren
@ 2008-03-14 15:33 ` Wolfgang Denk
2 siblings, 0 replies; 11+ messages in thread
From: Wolfgang Denk @ 2008-03-14 15:33 UTC (permalink / raw)
To: u-boot
In message <47DA8762.2090008@dave-tech.it> you wrote:
>
> 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.
"expect" is your friend.
> 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).
See also http://www.denx.de/wiki/DUTS/DUTSDocs and
http://www.denx.de/cgi-bin/gitweb.cgi?p=duts.git;a=summary
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
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
Life is a game. Money is how we keep score. - Ted Turner
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates
2008-03-14 14:23 ` Ben Warren
@ 2008-03-14 16:18 ` llandre
2008-03-14 17:58 ` Nicolas Colombain
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: llandre @ 2008-03-14 16:18 UTC (permalink / raw)
To: u-boot
> 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.
I thought about expect/cygwin but in my opinion is too hard to use for
the average Windows operator who expects just to:
- install the application by running an .exe or unzipping a .zip
- launching the application
- press a couple of buttons on GUI and see the result.
I think Python could be a very good solution. Since I never worked with
it, I ask just few questions:
1) for Windows platform, is possible to generate one single .exe file
taht includes all the required stuff (such as libraries and runtime
components)? If not, it is possible to group all of them in one single
.zip file?
2) What about serial ports support? Is this really platform independent?
3) What about graphical interface? Is it possible to use the same
library (and consequently have similar look&feel) on Windows and Linux?
Cheers,
llandre
DAVE Electronics System House - R&D Department
web: http://www.dave.eu
email: r&d2 at dave-tech.it
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates
2008-03-14 16:18 ` llandre
@ 2008-03-14 17:58 ` Nicolas Colombain
2008-03-14 19:31 ` Hoi-Ho Chan
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Nicolas Colombain @ 2008-03-14 17:58 UTC (permalink / raw)
To: u-boot
>> I thought about expect/cygwin but in my opinion is too hard to use for
>> the average Windows operator who expects just to:
>> - install the application by running an .exe or unzipping a .zip
>> - launching the application
>> - press a couple of buttons on GUI and see the result.
>>
>> I think Python could be a very good solution. Since I never worked with
>> it, I ask just few questions:
>> 1) for Windows platform, is possible to generate one single .exe file
>> taht includes all the required stuff (such as libraries and runtime
>> components)? If not, it is possible to group all of them in one single
>> .zip file?
>> 2) What about serial ports support? Is this really platform independent?
>> 3) What about graphical interface? Is it possible to use the same
>> library (and consequently have similar look&feel) on Windows and Linux?
>>
The serial port support is platform independent if you use the right
library.
We use python to communicate with the target from a windows/linux host
without any problems.
You can design a simple graphical interface which will look exactly the
same on both operating systems.
I think the uboot list is not the right place to continue with this
discussion.
Cheers,
Nicolas
Armadeus Systems
www.armadeus.com
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates
2008-03-14 16:18 ` llandre
2008-03-14 17:58 ` Nicolas Colombain
@ 2008-03-14 19:31 ` Hoi-Ho Chan
2008-03-14 19:32 ` Hoi-Ho Chan
2008-03-15 12:20 ` Markus Klotzbücher
3 siblings, 0 replies; 11+ messages in thread
From: Hoi-Ho Chan @ 2008-03-14 19:31 UTC (permalink / raw)
To: u-boot
> 1) for Windows platform, is possible to generate one single .exe file
> taht includes all the required stuff (such as libraries and runtime
> components)? If not, it is possible to group all of them in one single
> .zip file?
Look for py2exe, it can convert your .py script into an executable
plus a few DLLs that you can zip up.
> 2) What about serial ports support? Is this really platform independent?
> 3) What about graphical interface? Is it possible to use the same
> library (and consequently have similar look&feel) on Windows and Linux?
You can look into wxPython for platform-independent GUI
Thanks
Donald
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates
2008-03-14 16:18 ` llandre
2008-03-14 17:58 ` Nicolas Colombain
2008-03-14 19:31 ` Hoi-Ho Chan
@ 2008-03-14 19:32 ` Hoi-Ho Chan
2008-03-15 9:25 ` llandre
2008-03-15 12:20 ` Markus Klotzbücher
3 siblings, 1 reply; 11+ messages in thread
From: Hoi-Ho Chan @ 2008-03-14 19:32 UTC (permalink / raw)
To: u-boot
> I thought about expect/cygwin but in my opinion is too hard to use for
> the average Windows operator who expects just to:
> - install the application by running an .exe or unzipping a .zip
> - launching the application
> - press a couple of buttons on GUI and see the result.
>
I forgot to say there is a Python expect implementation called pyexpect as well.
Thanks
Donald
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates
2008-03-14 19:32 ` Hoi-Ho Chan
@ 2008-03-15 9:25 ` llandre
0 siblings, 0 replies; 11+ messages in thread
From: llandre @ 2008-03-15 9:25 UTC (permalink / raw)
To: u-boot
>> I thought about expect/cygwin but in my opinion is too hard to use for
>> the average Windows operator who expects just to:
>> - install the application by running an .exe or unzipping a .zip
>> - launching the application
>> - press a couple of buttons on GUI and see the result.
>>
>
> I forgot to say there is a Python expect implementation called pyexpect as well.
Thank you all for the precious advices.
I think I'll propose a python-based solution to my team.
Cheers,
llandre
DAVE Electronics System House - R&D Department
web: http://www.dave.eu
email: r&d2 at dave-tech.it
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates
2008-03-14 16:18 ` llandre
` (2 preceding siblings ...)
2008-03-14 19:32 ` Hoi-Ho Chan
@ 2008-03-15 12:20 ` Markus Klotzbücher
2008-03-16 18:18 ` Robert Schwebel
3 siblings, 1 reply; 11+ messages in thread
From: Markus Klotzbücher @ 2008-03-15 12:20 UTC (permalink / raw)
To: u-boot
llandre <r&d2@dave-tech.it> writes:
> I think Python could be a very good solution. Since I never worked with
> it, I ask just few questions:
> 1) for Windows platform, is possible to generate one single .exe file
> taht includes all the required stuff (such as libraries and runtime
> components)? If not, it is possible to group all of them in one single
> .zip file?
> 2) What about serial ports support? Is this really platform independent?
> 3) What about graphical interface? Is it possible to use the same
> library (and consequently have similar look&feel) on Windows and Linux?
If you search the mailing list archive, you'll find some python expect
and serial code from Jerry Van Baren:
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/33594/focus=33733
Best regards
Markus Klotzbuecher
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates
2008-03-15 12:20 ` Markus Klotzbücher
@ 2008-03-16 18:18 ` Robert Schwebel
0 siblings, 0 replies; 11+ messages in thread
From: Robert Schwebel @ 2008-03-16 18:18 UTC (permalink / raw)
To: u-boot
On Sat, Mar 15, 2008 at 01:20:17PM +0100, Markus Klotzb?cher wrote:
> If you search the mailing list archive, you'll find some python expect
> and serial code from Jerry Van Baren:
>
> http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/33594/focus=33733
You've probably read my answer...
Robert
--
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-03-16 18:18 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-14 14:10 [U-Boot-Users] [RFC] Host tool to perform semiautomatic updates llandre
2008-03-14 14:18 ` Øyvind Repvik
2008-03-14 14:23 ` Ben Warren
2008-03-14 16:18 ` llandre
2008-03-14 17:58 ` Nicolas Colombain
2008-03-14 19:31 ` Hoi-Ho Chan
2008-03-14 19:32 ` Hoi-Ho Chan
2008-03-15 9:25 ` llandre
2008-03-15 12:20 ` Markus Klotzbücher
2008-03-16 18:18 ` Robert Schwebel
2008-03-14 15:33 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox