The full guide is here: Compiling_CHDK_under_Linux.
This is a summary of what I have done.
/usr/local/arm-elf/binto your PATH
svn co https://tools.assembla.com/svn/chdk/trunk chdk
echo -n BOOTDISK | dd bs=1 count=8 seek=64 of=/dev/mmcblk0p1” (see Bootable_SD_card)
bin/PS.FIRto the root of the SD card (the first partition for cards > 4GB)
CHDKdirectory to the root of the SD card (the second partition for cards > 4GB)