Default Porting Roms

Hi people, i have an xperia J, i used arch linux by 3 years, but now i want to learn how to port roms for our device. I red that a *nix system us required, that's ok, but anyone can give me materials? I want to learn an port roms like cm or miui