Evolution of endo and exo-skeletons

I was wondering if anyone has any information on the biochemical evolution of the exoskeleton. A kid asked in bio class how organisms evolved from soft bodied to shelled. I am aware of how modern mollusks form their shells but I could not find any information on the possible biochemical pathways involved and the gene mutations necessary for the change. Do we simply not know the answer yet?

Also, do we know the mutations that were necessary for the evolution of the endoskeleton? Again, I am aware how bone cells secrete the minerals into the extracellular matrix, but I can find few details on its evolution.