You want to start with the Marlin code they shipped the unit. It should be available on their site. It is part of the license agreement. Marlin is free to use and ship in commercial products, but as a condition to this, they have to provide the full source to anybody that asks for it.
With the code base that shipped with your unit, you can easily start making changes or migrate to a new version of Marlin.
With the code base that shipped with your unit, you can easily start making changes or migrate to a new version of Marlin.