ergothioneine biosynthesis. {ECO:0000269|PubMed:23629716, ECO:0000305|PubMed:20420449}.