How to get Source Code?

How developers get the source code to develop a custom rom?
for example, How CyanogenMod get marshmallow source code for SIII 9300 which hasn't have this Android version?
I wan't to develop my own rom for my device, but I can't find specially Marshmallow pure source code for s3.

Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by emard.luis
4 hours ago
Last post by richie.corwin
4 hours ago
Last post by arthur28
3 hours ago
Last post by gutkowski.hank
34 minutes ago
Last post by bosco.arielle
4 hours ago
Last post by edison.dibbert
3 hours ago
Last post by pfeffer.torrance
3 hours ago
Last post by wjohnston
3 hours ago
Last post by jhagenes
1 hour ago