DFUScript v0.1 - Script to help flashing

Dale Maggee antisol at internode.on.net
Mon Sep 15 08:39:46 CEST 2008


Shawn,

I beat you to it ;)

See my email off-list and let me know if my changes work or not.

There is already a cancel option at the final confirmation dialog :)

Cheers,
-Dale

Shawn "prjktdtnt" Thompson wrote:
> 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 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 at lists.openmoko.org
>> http://lists.openmoko.org/mailman/listinfo/community
>>   
>>     
>
>
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
>
>   





More information about the community mailing list