I thought this might help anyone attempting to compile CHDK on Ubuntu based Linux machines.
Please note this is not the standard supported configuration for compiling CHDK on linux, so use at your own risk.
Note, it is not necessary to compile your own CHDK unless you are adding featues or porting to a new camera. Most CHDK users can simply download the precompiled versions from the autobuild server.
I should explain that before going down the route I am about to describe, I had followed a couple of other forum posts, regarding compiling on Linux, however I kept ending up in dependency hell, or compiler version and switch confusion. I therefore decided to look to see if there was a reliable PPA for the arm-elf compiler packages for Ubuntu 11.10. I make no claims for the hard work done by the PPA's author, and any problems with it should be addressed to him via the links on the PPA page. Also note that there are packages for Natty and Lucid in this PPA too, so if you are using an earlier version you may be in luck. I haven't tested these versions to build CHDK however so let us know if you have success with them.
The build process boils down to a few simple steps.
First create a folder for the chdk download. I tend to put non mainstream stuff in a subfolder of my home folder called PersonalApps. So fire up your a terminal window with <CTRL>+<ALT>T and proceed as follows.
mkdir ~/PersonalApps
mkdir ~/PersonalApps/CHDK
cd ~/PersonalApps/CHDK
Next checkout the latest CHDK code.
svn checkout https://tools.assembla.com/svn/chdk/trunk chdk-devel
or if you perfer the stable branch,
svn checkout https://tools.assembla.com/svn/chdk/branches/release-1_0 chdk-release
Now that we have some code to work with, we need a suitable compiler. There are other forum posts which detail obtaining and building from scratch, but we can cut out all of that hard work by using prebuilt packages.
Navigate to
https://launchpad.net/~bdrung/+archive/bsprak/+index?field.series_filter=oneiric You will see on the page that there are packages for Lucid and Natty too, I haven't tried them, but I cant think why they would not work.
Follow the instructions for adding the PPA and installing the packages and you should be ready to compile.
sudo add-apt-repository ppa:bdrung/bsprak
sudo apt-get update
sudo apt-get install arm-elf-toolchain
And finally compile your code. To do this, cd to the folder where you downloaded the code to, and run make.
cd ~/PersonalApps/CHDK/chdk-devel
Note we use make, not gmake, and it takes a number of opions (see the makefile.inc for all of the possibilities).
Note also that if you make a mess, either use make clean, or remove the folder and download again using svn.
Here are a couple of examples for different models, f/w versions, to cleanup and to compile all of the downloaded code and save the results as .zip
make PLATFORM=ixus70_sd1000 PLATFORMSUB=102a firzipsubcomplete
make PLATFORM=ixus85_sd770 PLATFORMSUB=100b firzipsubcomplete
make PLATFORM=ixus85_sd770 PLATFORMSUB=100a all
make batch-clean
make batch-zip-complete
Have a play, I'm sure you will quickly get the idea.
Note: the resultant compiled code ends up in the bin folder of the source folder.
I hope this helps make life a little simpler for anyone using a Ubuntu based distro and trying to roll their own CHDK.
I have tested this on my Ixy 25 (Ixus 85) and it produces a fully fuctional CHDK. Next on the agenda, I am going to try to port the Ixus Wireless. Wish me luck