Question [Q] How to port roms from different manufacturer?

Plzzz could u tell me how to port a rom from different manufacturer...for rxample from samsung to micromax !!

And could anyone tell me how to port lewa os to micromax a54?