I did a kDiff on two the folders and recorded the differences. Next, I did a kDiff on the platformio and configuration files and reviewed the line by line differences and updated the bugfix version.
Next was a build (which had some errors) and I reviewed the failing sources and swapped in the MKS versions of the files where it seemed appropriate. In other cases I could see where the errors were. I went through three build cycles.
The end result, when I burned the firmware into the controller was great - the MKS version was marginal and I then had something that is working fine.
The six hours was up front work that has paid off, I haven’t had any other problems with the firmware build.
Sorry I don’t have a simpler solution for you.