Default How modify device source to a newer android version

Hi. I have this question. If I have a device config source, how can I modify it to make it compatible to newer android version (also or cm)?? My goal is to port a build to KitKat.
Thanks in advance
Sorry for my bad english if I wrote something wrong
If I helped you, you may click button Thanks

LG Optimus GT540
ROM: Project IceCreamSwift Final ( DEAD )

Asus Eee Pad Transformer TF101 Wi-Fi 16GB
ROM: Android Revolution HD 3.6 by mike1986 (waiting also for an Ubuntu IMG)

LG Nexus 4
ROM: Stock 4.4.4

LG Nexus 5
ROM: Paranoid Android 4.4.1 (Android 4.4.4)