For a two axis lathe, we suggest starting with LinuxCNC firmware,  LinuxCNC (see template directory for metric/standard mode), and NativeCAM.