Leprechaun's guide to E680 programming
Updates goes here:
05/7-05
Ages since I updated this site! Sorry! For those not aware of it yet, the kernel sources for e680 is now available through MFC! And a new e680i firmware is available at pashkovsky, unbranded and very nice!
So what have I've been up to, as I've evidently haven't done much related to e680?
Well, I've got my self a new job, started my own part-time business as well and got engaged to my girlfriend.
I've got some new plans for the phone now actually, since the kernel sources are out. What about a totally refurbished firmware for example? It can be based on the "familiar" project at handhelds.org. Away with ezx, start using Qtopia or OPIE. Yes, I know Opera is very nice in the latest firmwares, but naaa..
26/4-05
OMG! Amazing!
Check out http://www.pashkovsky.com/e680/ !
You should expect this guide to expand too also include how to make your own firmware, any time soon!
These guys also provide a nice forum!
23/3-05
Updated needed partition size for cramfs (according to rpconnect)
21/3-05
Fixed typo on running qpe
Added note about TOOLCHAIN_DIR (haskellmail had problem with this) Corrected some errors in the cramfs section
cramfs-1.1 from SF recommeded
CVS-dirs removal added
chown to ezx:ezx added
added my email-address, cause MFC seems down
18/3-05
New thought on how to install the suite. CramFS!
16/3-05
Disk usage added
Point out some about my download-script
Softfloat-patch is now bziped/unziped in my scripts too (thanks rpconnect)
Hurray! EZX-apps can run on a homemade qws (not the other way around though.. =( )
Hi all you E680 fans!
Bet you have longed for this quite a while, huh?!
Well here it is, it's not a pretty site.. for now just let's say it's practical. As time goes I intend to fill this site with more and more useful stuff, and put most of the stuff needed on this server as well. Ok, that's that.. let's talk about the current stuff!
As I mentioned in a few posts in the oh so lovely MFC forum, I've succeded to crosscompile OPIE for my precious E680. The current status on this is that the apps run and actually gets input from the touchscreen, but only if the native windowserver is down. Native apps can run in the OPIE environment tough!
My email is: marcus aet bluetroll.se (yes, you know how to read that, I just don't want more spam)
What you need to do this:
First of all, you can use my download script found in e680-scripts to download all of the below from my site (all but e680-scripts that is)! The downloads, including them done by crosstool, will be at about 144 MB. The needed space totally should be below 2 GB. I will not put any precompiled cross-compilers here, mainly because I use 64-bit linux and most probably don't. Here's the list:
- Linux (or Cygwin I guess.. you're on our own there tough)
- About 2 GB of disk space.
- My nice scripts e680-scripts.
- Other stuff you need to compile, e680-cross.
- crosstool
- A VFP-softfloat patch found here.
- OPIE-sources.
- A config for OPIE.
- The UIC binary.
- QT-embedded 2.3.10 sources.
- mkfs.cramfs should be available in newer linux distros BUT I recommend you the sources at SF, because they don't include the MAXENTRIES when building the directory structure.
- A can of patience.
How to build the apps:
OK, since I promised that this thing should be up this evening, I'll have to cut down on the long story for now.
Fortunetly I've created a number of nice scripts, running them in the prescribed order should produce something useful. Might still be bugs in them though, please tell me if you find any. You might want to change the TOOLCHAIN_DIR in setenv.sh, or maybe you have to create /opt/toolchain by hand as root and chown to your user. Here comes to scripts (in correct order):
source setenv.sh # this is for setting env-vars./unpack.sh # unpack all of the downloads./go-cross.sh # create the cross-compilersource setpath.sh # set PATH to cross-compiler./go-qte.sh # create the qte-libs for opie./go-opie.sh # create the opie apps
Piece of cake! Oh, yeah you might wonder what to do in the opie menuconfig.. Well, if you want to go with the standard just exit and save. A tip: no bluetooth and no rdesktop should keep you out of trouble.
How to test the apps:
This is the new idea, we'll use cramfs instead of copying and creating those links. The thought is quite simple, copy the dirs needed by OPIE to a seperate dir. Strip away those CVS-dirs and perhaps strip the libs and bins as well. Then compile a cramfs-image by using mkfs.cramfs, create an extra partition on you sd-card (about 100 MB should be fine anytime) and dd the image to that partition. Then you'll just have to mount that partition in the phone..
This prepares the phone for the above stuff:
#!/bin/bash
# this is what you need to do on the phone before mounting
# only needs to be done once!
export OPIEDIR=/ezxlocal/download/opie
mkdir -p $OPIEDIR
cd /ezxlocal/download
mknod mmca2 b 243 2 # you might have to do this as root tough
This is how to create the cramfs-image (you'll have to set $REALOPIE) :
#!/bin/bash
mkdir -p $REALOPIE/i18n
cp -a $OPIEDIR/bin $OPIEDIR/apps $OPIEDIR/lib $OPIEDIR/pics $OPIEDIR/sounds $OPIEDIR/plugins $OPIEDIR/pics-hires $REALOPIE
cp -a $OPIEDIR/i18n/en $REALOPIE/i18n/
cp -a $QTDIR/lib/* $REALOPIE/lib/
find $REALOPIE -type d -name CVS | xargs rm -rf
# strip the libs and bins
chown -R 2000:233 $REALOPIE # ezx:ezx
mkcramfs $REALOPIE opie.cramfs
This is what you need to do on the sd (and 1-10 only once we'll hope):
- Backup what you got on it!
- Notice the total size of the card.
- Notice the size of opie.cramfs
- Start fdisk on you sd-card (not the first partition, the CARD: /dev/sd?).
- Remove all partitions (o)
- Create a new partition (n,p,1) of size: total - cramfssize - someMB_to_be_sure (or total - 100MB, that should do fine).
- Create another partition (n,p,2) of the remaining size.
- Change type of the 1st part to FAT16 (t,6).
- Save the changes (w).
- Format the 1st partition,
mkdosfs /dev/sd?1 - Fix the 2nd partition,
dd if=opie.cramfs of=/dev/sd?2
Ok, so how do you mount this partition on the phone then? Well, for know I'm not sure, you might have to be root. But you do it like this:
#!/bin/bash
export OPIEDIR=/ezxlocal/download/opie
mount -t cramfs /ezxlocal/download/mmca2 $OPIEDIR
An example of testing an app:
#!/bin/bash
export QTDIR=/ezxlocal/download/opie
export OPIEDIR=$QTDIR
export LD_LIBRARY_PATH=/lib:/usr/lib:$QTDIR/lib
export PATH=$PATH:$OPIEDIR/bin
export HOME=/mmc/mmca1/opie
$OPIEDIR/bin/clock -qws 2> /diska/opie.log
# use qws, since opie/qte apps can't run on ezx-qws (as far as I know)
Running opie as main app (logged on as root):
- Kill the main windowsserver,
ps -Ato find the pid, thenkill -9 #pid - Start the qpe app by the same means as the example above, just switch
clock -qwsforqpe
FAQ:
I don't get out much, what should I do?
Well for starters you shouldn't have bought that bloody phone! Now you've got no money and that thingy kills all your free time instantly!




