Re: DFUScript v0.1 - Script to help flashing

2008-09-14 Thread Dale Maggee
Shawn,

I don't have multiple devices which support DFU, but I'd love to add 
support for this in my utility, so can you give me some advice on how 
this might work?
 - is there a way to list attached devices which are DFU-capable?
 - how are these hex codes obtained?
 - since you have them hardcoded, I assume they're an identifier code 
which is the same for all FR's and all 1973s (i.e the code identifies 
the type of device)?
 - is the hex code an argument you always need to pass if you're 
flashing a 1973 (i.e if you only have 1 device attached and it's a 1973, 
do you still need to give it the hex code or does it detect the 1973 and 
flash it without the hex code)?

One thought which might be the easiest method is to implement it as an 
item in the 'setup' menu which allows you to choose between a freerunner 
and a 1973 and provides the appropriate hex code. but it would be nice 
if I could detect that you have 2 devices attached and show an 'which 
device do you want to flash?' screen with a list of detected devices. 
this way if you only have one device attached it doesn't matter whether 
it's a 1973 or a freerunner.

I am planning on adding command line support for my script, which should 
make you happy. I may 'borrow' some of your code to implement this ;)

I will also add a 'flashing u-boot on a 1973 may give you a paperweight' 
warning to my tool.

I should probably also change all references to 'freerunner' in my 
script to say 'neo'.

as for the 'only have 30 seconds' thing, this is why I have the 'now is 
the time to turn on your device and activate the nand/nor menu' screen - 
the idea is that you select your desired flashing option, then get into 
the nand/nor menu on your device, then press OK and it starts. this is 
also why I included the ability to flash multiple images at once - so 
that for example you can flash rootfs and kernel without having the 
thing power off while you're typing the second command [I also type 
quicker than I click, but I don't do either particularly quickly ;) ]



Shawn prjktdtnt Thompson wrote:
 Minh,
 I am aware of Dale's work but if you have multiple devices that 
 support DFU then the gui will error out. I have seen the UI and it does 
 look very promising. I may stop using my script and go back to Dale's 
 gui when it supports the ability to select a specific device. I am kind 
 of a CLI enthusiast because I type much faster than I can click, which 
 is good when you've only got 30 seconds to issue a command.

 Thanks for the suggestion, I will add the link now.

 -Shawn

 Minh Ha Duong wrote:
   
 Shawn: are you aware of Dale's work ?

 May I suggest also a link to the script's page from:
 http://wiki.openmoko.org/wiki/Flashing_the_Neo_FreeRunner#A_script_to_do_all_this_from_a_nice_GUI...

 Minh

 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community
   
 


 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community

   


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: DFUScript v0.1 - Script to help flashing

2008-09-14 Thread Shawn prjktdtnt Thompson
Dale,
I would be honored to see my code used in a project that serves a 
wider audience. I wrote the script mainly for my own use and figured I 
would submit it as a community project for those who wanted to use 
and/or improve upon it.

To find multiple DFU devices I would have to type dfu-util -l then 
pass dfu-util -d hexcode -a alternate -R -D imagefile.bin or some 
similar command to flash my device. Now I type ./dfuscript device 
alternate file.bin which takes me about half of what it did since I no 
longer need to list to grab the hex or type in additional arguments such 
as -R or -D.

The hex codes should be static for all Neo1973 or Neo FreeRunners as 
far as I'm aware. If anyone knows otherwise please correct me.

I think that adding the option to select your device type and then 
what images you would like to update would be great, a setup menu, as 
you suggested, would work for this also.

One feature I would love to see is the option you mentioned of 
updating multiple sections at once. Ex: if I have a new kernel and 
rootfs, instead of doing them separately I would be able to select, via 
a checkbox instead of radio-button, both of them, select each file, 
confirm that is what I want to flash to each section and finally be 
advised that I should power into NAND/NOR and press ok for it to loop 
through each section. My script doesn't have this ability but it was 
something I considered as it would make life quite a bit faster in that 
regard.

If I knew more about coding I would love to contribute additional 
code but for now all I can offer is what I have done so far. If any of 
my code could be useful to your script please use it. The fact that two 
open source fans can build upon each-other's work is why I love and back 
open-source wherever I can.

I'm looking forward to seeing more improvements to the gui and 
hopefully eventually seeing my script being made completely obsolete or 
even integrated into your program in some form.

-Shawn prjktdtnt Thompson

Dale Maggee wrote:
 Shawn,

 I don't have multiple devices which support DFU, but I'd love to add 
 support for this in my utility, so can you give me some advice on how 
 this might work?
  - is there a way to list attached devices which are DFU-capable?
  - how are these hex codes obtained?
  - since you have them hardcoded, I assume they're an identifier code 
 which is the same for all FR's and all 1973s (i.e the code identifies 
 the type of device)?
  - is the hex code an argument you always need to pass if you're 
 flashing a 1973 (i.e if you only have 1 device attached and it's a 1973, 
 do you still need to give it the hex code or does it detect the 1973 and 
 flash it without the hex code)?

 One thought which might be the easiest method is to implement it as an 
 item in the 'setup' menu which allows you to choose between a freerunner 
 and a 1973 and provides the appropriate hex code. but it would be nice 
 if I could detect that you have 2 devices attached and show an 'which 
 device do you want to flash?' screen with a list of detected devices. 
 this way if you only have one device attached it doesn't matter whether 
 it's a 1973 or a freerunner.

 I am planning on adding command line support for my script, which should 
 make you happy. I may 'borrow' some of your code to implement this ;)

 I will also add a 'flashing u-boot on a 1973 may give you a paperweight' 
 warning to my tool.

 I should probably also change all references to 'freerunner' in my 
 script to say 'neo'.

 as for the 'only have 30 seconds' thing, this is why I have the 'now is 
 the time to turn on your device and activate the nand/nor menu' screen - 
 the idea is that you select your desired flashing option, then get into 
 the nand/nor menu on your device, then press OK and it starts. this is 
 also why I included the ability to flash multiple images at once - so 
 that for example you can flash rootfs and kernel without having the 
 thing power off while you're typing the second command [I also type 
 quicker than I click, but I don't do either particularly quickly ;) ]



 Shawn prjktdtnt Thompson wrote:
   
 Minh,
 I am aware of Dale's work but if you have multiple devices that 
 support DFU then the gui will error out. I have seen the UI and it does 
 look very promising. I may stop using my script and go back to Dale's 
 gui when it supports the ability to select a specific device. I am kind 
 of a CLI enthusiast because I type much faster than I can click, which 
 is good when you've only got 30 seconds to issue a command.

 Thanks for the suggestion, I will add the link now.

 -Shawn

 Minh Ha Duong wrote:
   
 
 Shawn: are you aware of Dale's work ?

 May I suggest also a link to the script's page from:
 http://wiki.openmoko.org/wiki/Flashing_the_Neo_FreeRunner#A_script_to_do_all_this_from_a_nice_GUI...

 Minh

 ___
 Openmoko community mailing list
 

Re: DFUScript v0.1 - Script to help flashing

2008-09-14 Thread Dale Maggee
Bill,
 On my work laptop with an external sun usb keyboard, I get two codes, so
 have to specify the FR when flashing.

 I can get a list (dfu-util -l) from it tomorrow afternoon if you wish.
   
that would be great
 ./dfu-util -d 0x1d50:0x5119 -a kernel -R -D uImage

 BillK
   
Thanks for the info, looking forward to seeing the dfu-util -l output. 
send it off-list if you prefer :)

-Dale

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: DFUScript v0.1 - Script to help flashing

2008-09-14 Thread Dale Maggee
Shawn,

replies inline.

Shawn prjktdtnt Thompson wrote:
 Dale,
 I would be honored to see my code used in a project that serves a 
 wider audience. I wrote the script mainly for my own use and figured I 
 would submit it as a community project for those who wanted to use 
 and/or improve upon it.
   
hehe, same here - I modified the original script for my own use, and 
decided to put it out there. fortunately for the 'wider audience' you 
mention, I'm part of that wider audience insofar as I'm have been known 
to make stupid mistakes every now and then, and I like to protect myself 
from them! When I say 'Idiot-proofing', I'm usually talking about myself! ;)
 To find multiple DFU devices I would have to type dfu-util -l then 
 pass dfu-util -d hexcode -a alternate -R -D imagefile.bin or some 
 similar command to flash my device. Now I type ./dfuscript device 
 alternate file.bin which takes me about half of what it did since I no 
 longer need to list to grab the hex or type in additional arguments such 
 as -R or -D.

 The hex codes should be static for all Neo1973 or Neo FreeRunners as 
 far as I'm aware. If anyone knows otherwise please correct me.
   
thanks for the info. Adding this to my utility will be a priority once I 
get the dfu-util -l output from Bill (you could send it too if you like)
 I think that adding the option to select your device type and then 
 what images you would like to update would be great, a setup menu, as 
 you suggested, would work for this also.
   
have you checked out the latest version of my utility? see [1]. The 
current version has a setup menu already, I'm thinking that this would 
be the place to put this option.

but if dfu-util -l gives hex codes I'll make it an option which will 
appear if multiple dfu-capable devices are attached, and it will list 
the devices and allow you to choose which one to flash.
 One feature I would love to see is the option you mentioned of 
 updating multiple sections at once. Ex: if I have a new kernel and 
 rootfs, instead of doing them separately I would be able to select, via 
 a checkbox instead of radio-button, both of them, select each file, 
 confirm that is what I want to flash to each section and finally be 
 advised that I should power into NAND/NOR and press ok for it to loop 
 through each section. My script doesn't have this ability but it was 
 something I considered as it would make life quite a bit faster in that 
 regard.
   
This is exactly what my utility does - it has checkboxes instead of 
radio buttons, you choose what to flash, then the file(s) you want to 
flash, then it shows you a confirmation screen which also advises you to 
go to NAND/NOR, you press OK, and it flashes everything you chose.

my tool is (now very loosely) based on the script by rorschach. This is 
the one which had radio buttons. I suspect that you're thinking of his 
script and not my version. The reason I modified it was to be able to 
flash multiple images at once... Then I kept thinking of other things to 
add ;)

(the original list of things I did to rorschach's script can be found at 
[2])

if you can make it through all my rambling at [1], you'll see that I 
make mention of being able to use my tool via the command-line. This 
would also support flashing multiple files at once I envision something 
like this:

frutil --flash kernel=/path/to/kernelfile.bin 
rootfs=/path/to/rootfsfile.jffs2 splash=/path/to/splashfile.tar.gz
 If I knew more about coding I would love to contribute additional 
 code but for now all I can offer is what I have done so far. If any of 
 my code could be useful to your script please use it. The fact that two 
 open source fans can build upon each-other's work is why I love and back 
 open-source wherever I can.
   
I've become a big open source fan for exactly this reason - the ability 
to collaborate like this is  IMHO vastly superior to the closed source 
model.
 I'm looking forward to seeing more improvements to the gui and 
 hopefully eventually seeing my script being made completely obsolete or 
 even integrated into your program in some form.
   
This is high praise and very encouraging, thanks alot! :)

-Dale

[1] http://lists.openmoko.org/pipermail/community/2008-September/030257.html
[2] http://lists.openmoko.org/pipermail/community/2008-September/029731.html

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: DFUScript v0.1 - Script to help flashing

2008-09-14 Thread Shawn prjktdtnt Thompson
Dale,
After looking at the source I may actually be able to assist in 
adding some of the code. I have work today so it would have to be later 
on. Also a suggestion is instead of telling someone to turn on their 
device and press ok, allow them to also cancel this action (for people 
like me who are only testing the program) ;)

First here is the hex codes to select:
Freerunner: 0x1d50:0x5119
Neo1973: 0x1457:0x5119
   
Flash kernel on freerunner: dfu-util -d 0x1d50:0x5119 -a kernel 
-R -D ./kernel.image.bin

The output of dfu-util -l looks like this (the hardware you see is 
not my phone but my laptop's built in bluetooth).

dfu-util - (C) 2007 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

Found Runtime: [0x413c:0x8126] devnum=0, cfg=0, intf=3, alt=0, 
name=UNDEFINED

I'll look through the source of your gui and see what I can add in 
terms of selecting multiple devices and such. Will it add only the 
Neo1973 and Freerunner or allow it to do any listed device but just have 
the freerunner and neo1973 auto recognize? For me the reason I hard 
coded mine is because I am horrible with regex ;)  Hope this info helps.

-Shawn

Dale Maggee wrote:
 Shawn,

 replies inline.

 Shawn prjktdtnt Thompson wrote:
   
 Dale,
 I would be honored to see my code used in a project that serves a 
 wider audience. I wrote the script mainly for my own use and figured I 
 would submit it as a community project for those who wanted to use 
 and/or improve upon it.
   
 
 hehe, same here - I modified the original script for my own use, and 
 decided to put it out there. fortunately for the 'wider audience' you 
 mention, I'm part of that wider audience insofar as I'm have been known 
 to make stupid mistakes every now and then, and I like to protect myself 
 from them! When I say 'Idiot-proofing', I'm usually talking about myself! ;)
   
 To find multiple DFU devices I would have to type dfu-util -l then 
 pass dfu-util -d hexcode -a alternate -R -D imagefile.bin or some 
 similar command to flash my device. Now I type ./dfuscript device 
 alternate file.bin which takes me about half of what it did since I no 
 longer need to list to grab the hex or type in additional arguments such 
 as -R or -D.

 The hex codes should be static for all Neo1973 or Neo FreeRunners as 
 far as I'm aware. If anyone knows otherwise please correct me.
   
 
 thanks for the info. Adding this to my utility will be a priority once I 
 get the dfu-util -l output from Bill (you could send it too if you like)
   
 I think that adding the option to select your device type and then 
 what images you would like to update would be great, a setup menu, as 
 you suggested, would work for this also.
   
 
 have you checked out the latest version of my utility? see [1]. The 
 current version has a setup menu already, I'm thinking that this would 
 be the place to put this option.

 but if dfu-util -l gives hex codes I'll make it an option which will 
 appear if multiple dfu-capable devices are attached, and it will list 
 the devices and allow you to choose which one to flash.
   
 One feature I would love to see is the option you mentioned of 
 updating multiple sections at once. Ex: if I have a new kernel and 
 rootfs, instead of doing them separately I would be able to select, via 
 a checkbox instead of radio-button, both of them, select each file, 
 confirm that is what I want to flash to each section and finally be 
 advised that I should power into NAND/NOR and press ok for it to loop 
 through each section. My script doesn't have this ability but it was 
 something I considered as it would make life quite a bit faster in that 
 regard.
   
 
 This is exactly what my utility does - it has checkboxes instead of 
 radio buttons, you choose what to flash, then the file(s) you want to 
 flash, then it shows you a confirmation screen which also advises you to 
 go to NAND/NOR, you press OK, and it flashes everything you chose.

 my tool is (now very loosely) based on the script by rorschach. This is 
 the one which had radio buttons. I suspect that you're thinking of his 
 script and not my version. The reason I modified it was to be able to 
 flash multiple images at once... Then I kept thinking of other things to 
 add ;)

 (the original list of things I did to rorschach's script can be found at 
 [2])

 if you can make it through all my rambling at [1], you'll see that I 
 make mention of being able to use my tool via the command-line. This 
 would also support flashing multiple files at once I envision something 
 like this:

 frutil --flash kernel=/path/to/kernelfile.bin 
 rootfs=/path/to/rootfsfile.jffs2 splash=/path/to/splashfile.tar.gz
   
 If I knew more about coding I would love to contribute additional 
 code but for now all I can offer is what I have done so far. If any of 
 my code could be useful to your script please use it. The 

Re: DFUScript v0.1 - Script to help flashing

2008-09-13 Thread Minh Ha Duong
Shawn: are you aware of Dale's work ?

May I suggest also a link to the script's page from:
http://wiki.openmoko.org/wiki/Flashing_the_Neo_FreeRunner#A_script_to_do_all_this_from_a_nice_GUI...

Minh

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: DFUScript v0.1 - Script to help flashing

2008-09-13 Thread Shawn prjktdtnt Thompson
Minh,
I am aware of Dale's work but if you have multiple devices that 
support DFU then the gui will error out. I have seen the UI and it does 
look very promising. I may stop using my script and go back to Dale's 
gui when it supports the ability to select a specific device. I am kind 
of a CLI enthusiast because I type much faster than I can click, which 
is good when you've only got 30 seconds to issue a command.

Thanks for the suggestion, I will add the link now.

-Shawn

Minh Ha Duong wrote:
 Shawn: are you aware of Dale's work ?

 May I suggest also a link to the script's page from:
 http://wiki.openmoko.org/wiki/Flashing_the_Neo_FreeRunner#A_script_to_do_all_this_from_a_nice_GUI...

 Minh

 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community
   


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: DFUScript v0.1 - Script to help flashing

2008-09-12 Thread Shawn Thompson
Quick update:
Thanks to Rod Whitby (rwhitby) I corrected some errors on the wiki 
page and the script itself (FreeRunner not subject to being bricked by 
u-boot update, etc). The new updated script can be downloaded from 
http://projects.openmoko.org/projects/dfuscript/
   
A wiki page with documentation has also been added at 
http://wiki.openmoko.org/wiki/DFUScript

Thanks,
   Shawn prjktdtnt Thompson


Shawn Thompson wrote:
 Community,
I got a little bored today and somewhat inspired to write a script 
 to help those flashing their freerunner or 1973 often. dfu-utils has 
 to have a -d argument if you have multiple DFU capable devices on your 
 computer. I got tired of typing out the -d and hex code or copy and 
 paste so I wrote a nifty script that does that part of it for you.

To use this script just login to your linux-machine as root and 
 make sure that dfu-utils is in your path, if not go ahead and edit the 
 PATH= line by appending :/path/to/your/script/folder to the end of 
 that line.

Example usage:
   ./dfuscript.sh fr kernel uImage-something.image.bin

Please note this does NOT check to see if you are using a valid 
 .image.bin, .bin, or .jffs2 so make sure that all file names are 
 correct before pressing enter. The script will be on GForge soon but 
 for now the script is available at 
 http://projektenterprises.com/openmoko/dfuscript.sh

 -Shawn prjktdtnt Thompson


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community