By condensation of 2-aminopyrimidine (I) with acetone (II) in acetic acid, followed by reduction with NaBH4.