fix patches and patching functions
beginnings of building in tmpfs