you should read the wiki, especially the part about porting.
For Developers - CHDK Wikiwhen you have done that, i suggest reading one of the several "...porting..." threads in this forum, there are a lot of valuable posts by the likes of ewavr, jeff666, grAnd, mx3 and Dataghost (there are lots more of course), explaining porting in detail.