According to many texts, hydrogen, helium and traces of lithium-7 were created in a brief period after the big bang; helium is created through fusion (pp, CNO) in main sequence stars; elements like carbon, nitrogen and oxygen and neon are created in main sequence stars heavier than the Sun.
I've also learnt that sun-like stars enrich the interstellar medium with hydrogen and helium through mass loss after leaving the main sequence; that stars with a greater mass but too light to end as a supernova (roughly up to 8 $M_\odot$) also enrich the interstellar medium with C, N, O, Ne after dredge-up phases. A lot of the stellar ashes are buried in white dwarfs, so much of the heavier elements remain in the star for the most part, if I'm correct.
I've learnt that essentially all elements heavier than these are created in supernova events.
But according to the Astronomy Picture of the Day for 2015-01-25 a significant fraction of many elements (also) have another origin.
Are Li, Be, B on Earth produced in significant amounts through spallation by cosmic rays of C, N, O high in the atmosphere of the earth? (Not in stars: no stable nuclei with A=5 or A=8 and lithium undergoes fusion.)
Are the "green" elements in the diagram (e.g. F, K, Zn, La) produced in the red (super)giant phase of moderately heavy stars and liberated through dregde-up and mass loss (stellar wind)? Or by novae of white dwarfs?
How is gold produced by collisions of neutron stars (text below the diagram)?
Elements up to Pu are produced through r-process neutron capture in supernovae, but why not Am, CM etc.? Or are they produced but too unstable ($\alpha$, $\beta$ decay) to survive long enough?