Re: *new version* A little zenity-gui for flashing images to the neo

2008-09-15 Thread Ilja O.
On Mon, Sep 15, 2008 at 4:13 AM, fredrik normann 
[EMAIL PROTECTED] wrote:

 On Sun, Sep 14, 2008 at 8:34 AM, Dale Maggee [EMAIL PROTECTED]wrote:

  I have been developing small python wx-based gui that currently can be
 used
  for flashing, log data obtaining and is able to do some backup (last two
 via
  ssh).
 
  I'd be glad to share if you want. (Just will need to do some
 docstrings).
 
 yeah, I'd be really interested in seeing it! I don't really know any
 python yet, but I've looked into it a little bit lately, and I've
 decided I want to learn it, so if you share what you have it will
 probably help my learning and I can probably contribute to it.


 I thought about doing this in Python aswell. I got enought time, so if you
 want to share what you've done so fare, that would be great.


Okay. I didn't really expected  that somebody would be interested.
Than, what project hosting is preferably used by OM community?

Is it http://projects.openmoko.org/ ? Or something else?
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: *new version* A little zenity-gui for flashing images to the neo

2008-09-14 Thread Dale Maggee
Ilja O. wrote:
 On Fri, Sep 12, 2008 at 5:13 AM, Charles Pax [EMAIL PROTECTED] wrote:

   
 So at some point here I'm guessing Zenity will have to be dropped in favor
 of maybe a Python + Glade combination. Is anyone out there capable and
 willing to do such a thing? It should probably happen sooner rather than
 later.

 

 I have been developing small python wx-based gui that currently can be used
 for flashing, log data obtaining and is able to do some backup (last two via
 ssh).

 I'd be glad to share if you want. (Just will need to do some docstrings).
   
yeah, I'd be really interested in seeing it! I don't really know any 
python yet, but I've looked into it a little bit lately, and I've 
decided I want to learn it, so if you share what you have it will 
probably help my learning and I can probably contribute to it.

Cheers,
-Dale

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


Re: *new version* A little zenity-gui for flashing images to the neo

2008-09-13 Thread Ilja O.
On Fri, Sep 12, 2008 at 5:13 AM, Charles Pax [EMAIL PROTECTED] wrote:

 So at some point here I'm guessing Zenity will have to be dropped in favor
 of maybe a Python + Glade combination. Is anyone out there capable and
 willing to do such a thing? It should probably happen sooner rather than
 later.


I have been developing small python wx-based gui that currently can be used
for flashing, log data obtaining and is able to do some backup (last two via
ssh).

I'd be glad to share if you want. (Just will need to do some docstrings).
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: *new version* A little zenity-gui for flashing images to the neo

2008-09-11 Thread Dale Maggee
http://www.dict.org/bin/Dict?Form=Dict2Database=*Query=transmogrificationOk, 
so I've been slaving away over my (not so) little script, and it's about 
time for another release.


Changes

- Utility now has the ability to flash the splash image as per request

- Utility can now also backup your device to flashable rootfs / kernel 
images (david might like this for building FDOM images)


- Configurification is loaded on startup and saved in /etc/frutil (you 
can only modify settings if you run it as root)


- more idiot proofing - uses 'which' to find dfu-util, checks to ensure 
it's being run as root, checks that zenity is installed on the host, 
checks that you have mkfs.jffs2 installed before backing up, checks that 
you have pv installed and acts accordingly (by either using it or not 
during the backup [this is not properly tested because I don't have pv, 
please report]), and possibly other stuff I've forgotten about.


- new name to reflect the new abilities

Notes:

- I mentioned using dialog instead of zenity for a faster and more 
consistent text-only interface. I investigated this, but dialog's file 
selection dialog is so awful that I reconsidered and stuck with zenity. 
if anybody knows of a decent text-based alternative like dialog but with 
a better file selection dialog, I'd be interested to hear about it


- I recommend setting up an ssh authorized key before doing the backup, 
otherwise you'll be prompted multiple times to enter the device's root 
password. To do this, run 'ssh-keygen' on your host machine and then 
copy the contents of ~/.ssh/id_rsa.pub on your host into 
/home/root/authorized keys on your device. This also means you don't 
have to enter your password to ssh anymore.


- I'm taking suggestions for names. I've gone with 'frutil', but 
'neotool' also appeals to me. I was calling it 'uberscript' there for a 
while, but I'm not a big fan of that...


- I'll get around to making a wiki page for this and linking to it from 
the flash and backup pages, but I won't complain if somebody beats me to 
it. A copy is available for download at http://users.on.net/~antisol/frutil


Thoughts for future versions / when I have time:

- ability to specify the names of the backup images (currently hardcoded 
to ./FreeRunner_rootfs_Backup_`date +%Y%m%d%H%M`.jffs2 and 
./FreeRunner_Kernel_Backup_`date +%Y%m%d%H%M`.bin)


- ability to bypass the zenity menus via command-line parameters, i.e: 
frutil --flash kernel ./kernelfile.bin rootfs ./rootfs.jffs


- another method of bypassing menus - you create symbolic links called 
'neoflash' and 'neobackup', and the utility checks $0 on start and goes 
straight to the applicable function, the same way busybox works


- maybe ability to auto-download more things from 
downloads.openmoko.org, like the latest kernel / image?


- maybe addressbook management? ability to import contacts into the 
device? to do this I'd have to find a way to determine which distro is 
installed and act accordingly.


- things people suggest!
*
*As always, suggestions, comments, reports of catastrophic failure, 
beer, job offers, sportscars, and millions of dollars are all 
appreciated. ;)


enjoy!

-Dale
#!/bin/bash

#
# FreeRunner UberSkript 1.0
# By AntiSol, antisol (at) internode (dot) on (dot) net
# GNU GPL licensed
# loosely based on a script by 'rorschach'
# Thanks to:
#   Charles Pax (suggestion to fetch dfu-util)
#   David Samblas (info on 'which' command)
#

settings_file='/etc/frutil'
tmp_error_log_path='/tmp/flash-error-log'

if [ -z `which zenity 2/dev/null` ]; then
echo it looks like zenity isn't installed, and this tool requires it!
exit
fi  

#function detect_FR {
#   tmp=`ping -c 1 192.168.0.202`
#   if [ $? != 0 ]; then 
#   echo no freerunner found!
#   else 
#   echo Freerunner found at 192.168.0.1
#   fi
#}

function find_dfu {
#use 'which'...
dfutils_path=`which dfu-util 2/dev/null`

if [ -z $dfutils_path ]; then
#look in current directory...
if [ -x './dfu-util' ]; then
dfutils_path='./dfu-util'
fi
fi

}

function check_dfu {

if [ ! -x $dfutils_path ]; then

find_dfu

if [ -z $dfutils_path ]; then
#not found. 
zenity --title dfu-util not found --question --text 
The dfu utility could not be found, or is not executable. Do you want to 
automagically download it from downloads.openmoko.org?

if [ $? = 0 ]; then
clear
echo 'Downloading dfu-util...'
rm ./dfu-util  /dev/null 21

Re: *new version* A little zenity-gui for flashing images to the neo

2008-09-11 Thread Dale Maggee
I'm an idiot, ignore the dict.org link. I pasted it into the email 
accidentally, and I thought I'd deleted it, but apparently not. damn 
HTML-format emails... :(

Dale Maggee wrote:
 http://www.dict.org/bin/Dict?Form=Dict2Database=*Query=transmogrificationOk,
  
 so I've been slaving away over my (not so) little script, and it's 
 about time for another release.

 Changes

 - Utility now has the ability to flash the splash image as per request

 - Utility can now also backup your device to flashable rootfs / kernel 
 images (david might like this for building FDOM images)

 - Configurification is loaded on startup and saved in /etc/frutil (you 
 can only modify settings if you run it as root)

 - more idiot proofing - uses 'which' to find dfu-util, checks to 
 ensure it's being run as root, checks that zenity is installed on the 
 host, checks that you have mkfs.jffs2 installed before backing up, 
 checks that you have pv installed and acts accordingly (by either 
 using it or not during the backup [this is not properly tested because 
 I don't have pv, please report]), and possibly other stuff I've 
 forgotten about.

 - new name to reflect the new abilities

 Notes:

 - I mentioned using dialog instead of zenity for a faster and more 
 consistent text-only interface. I investigated this, but dialog's file 
 selection dialog is so awful that I reconsidered and stuck with 
 zenity. if anybody knows of a decent text-based alternative like 
 dialog but with a better file selection dialog, I'd be interested to 
 hear about it

 - I recommend setting up an ssh authorized key before doing the 
 backup, otherwise you'll be prompted multiple times to enter the 
 device's root password. To do this, run 'ssh-keygen' on your host 
 machine and then copy the contents of ~/.ssh/id_rsa.pub on your host 
 into /home/root/authorized keys on your device. This also means you 
 don't have to enter your password to ssh anymore.

 - I'm taking suggestions for names. I've gone with 'frutil', but 
 'neotool' also appeals to me. I was calling it 'uberscript' there for 
 a while, but I'm not a big fan of that...

 - I'll get around to making a wiki page for this and linking to it 
 from the flash and backup pages, but I won't complain if somebody 
 beats me to it. A copy is available for download at 
 http://users.on.net/~antisol/frutil

 Thoughts for future versions / when I have time:

 - ability to specify the names of the backup images (currently 
 hardcoded to ./FreeRunner_rootfs_Backup_`date +%Y%m%d%H%M`.jffs2 and 
 ./FreeRunner_Kernel_Backup_`date +%Y%m%d%H%M`.bin)

 - ability to bypass the zenity menus via command-line parameters, i.e: 
 frutil --flash kernel ./kernelfile.bin rootfs ./rootfs.jffs

 - another method of bypassing menus - you create symbolic links called 
 'neoflash' and 'neobackup', and the utility checks $0 on start and 
 goes straight to the applicable function, the same way busybox works

 - maybe ability to auto-download more things from 
 downloads.openmoko.org, like the latest kernel / image?

 - maybe addressbook management? ability to import contacts into the 
 device? to do this I'd have to find a way to determine which distro is 
 installed and act accordingly.

 - things people suggest!
 *
 *As always, suggestions, comments, reports of catastrophic failure, 
 beer, job offers, sportscars, and millions of dollars are all 
 appreciated. ;)

 enjoy!

 -Dale


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


Re: *new version* A little zenity-gui for flashing images to the neo

2008-09-11 Thread Charles Pax
So at some point here I'm guessing Zenity will have to be dropped in favor
of maybe a Python + Glade combination. Is anyone out there capable and
willing to do such a thing? It should probably happen sooner rather than
later.

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