For a five axis mill, we suggest starting with LinuxCNC firmware, LinuxCNC (see template directory for metric/standard mode), and NativeCAM or FreeCAD Path.