The formation of crystalline minerals and their role in the origin of life on Earth