I'd start with the CHDK version for your camera, and just put the code you want in the loader. You can remove the other stuff, or just leave it and never execute it. The FI2 does need to be some minimum size to actually get loaded.
Doing it this way will ensure that you are using a tried and tested build process.
Note that after your PS.FI2 loads, the canon OS will be trashed so you'll need to reboot or something.
edit: note that this also means that you can't use most canon firmware functions, like the libc etc.
There should be some stuff on the wiki regarding setting up a build environment under Mac OS. You'll also need to get the FI2 keys for your camera, which is described in
http://chdk.setepontos.com/index.php/topic,2995.msg28117.html#msg28117